dog.c
来自「C实现的MUD,对大家基本入门网络游戏很有帮助!」· C语言 代码 · 共 80 行
C
80 行
//hapagou.c 哈巴狗#include <ansi.h>#include <command.h>string ask_me();inherit NPC;void create(){ set_name("哈巴狗", ({ "dog" }) ); set("title", "博饼屋宠物"); set("race", "野兽"); set("gender", "雄性" ); set("age", 15); set("str", 22); set("int", 30); set("dex", 30); set("con", 30); set("long","你看到的是博饼屋里的小哈巴狗。\n"); set("combat_exp", 2000000); set("attitude", "friendly"); set("max_qi", 10000); set("max_jing", 10000); set("inquiry", ([ "博饼屋" : "这儿就是,你要玩吗?\n", "博饼会" : (: ask_me :), "博饼" : "你(help bobing)就知道了。\n", ]) );setup();}string ask_me(){ object* ob; int i; ob = users(); if ( !wizardp(this_player()) ) return "你无权召开博饼会!\n"; for ( i=sizeof(ob); i>0; i-- ) { ob[i-1]->move("/d/city/bobing"); } command("chat 博饼屋要聚会了!大家快来!\n"); return "好,现在博饼会正式开始,全体集合!\n";}void init(){add_action("do_save","save");add_action("do_smash","smash");add_action("do_exert","call");add_action("do_exert","quit");add_action("do_exert","exert");add_action("do_exert","exercise");add_action("do_exert","dazuo");add_action("do_exert","respirate");add_action("do_exert","tuna");add_action("do_exert","practice");add_action("do_exert","lian");add_action("do_exert","study");add_action("do_exert","du");}int do_save(string arg){ command("say "+this_player()->query("name")+",这儿不许存盘的。\n"); return 1;}int do_smash(string arg){ command("say "+this_player()->query("name")+",巫师在这儿也不许杀人的。\n"); return 1;}int do_exert(string arg){ command("say "+this_player()->query("name")+",专心博饼吧!\n"); return 1;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?