void init() { object ob; ::init(); if( interactive(ob = this_player()) && !is_fighting() ) { if( ob->query_temp("obstacle/have_gui")==1) { remove_call_out("greeting"); call_out("greeting", 1, ob); } } }
int force_open() { object room; if(!objectp( room = find_object(query("outroom"))) ) room = load_object(query("outroom")); if( !objectp(room) ) return 0; if( query_inside_person() <= 0 ) return 0; open_door(); room->open_door(__FILE__); message("vision","外面突然响起粗重的脚步声,由远而近,到门前停了下来...\n"+query("force_name")+"啪地把门打开,伸个头进来,一脸狐疑:呆大半天了还不出去,搞什么鬼?\n", room); remove_call_out("close_men"); call_out("close_men", 10); }
void init() { object me,ob; me = this_object () ; ob = this_player () ; ::init(); add_action("do_join","join"); if( interactive(ob) && !is_fighting() ) { remove_call_out("greeting"); call_out("greeting", 1, me, ob); } }
void init() { object me=this_player(); ::init(); if(!environment()->query("no_fight")) environment()->set("no_fight",1);//将此地设为不能战斗 if( interactive(me) && !is_fighting() ) { remove_call_out("greeting"); call_out("greeting", 1, me); } add_action("do_serve", "kaixi"); add_action("do_finish", "jieshu"); add_action("do_start", "kaishi"); add_action("do_kill", ({"kill","fight","hit","perform","yong","ge","touxi"}));
void init() { object ob, me; add_action("do_ketou","ketou"); ::init(); if (interactive(ob = this_player()) && !is_fighting()) { remove_call_out("greeting"); call_out("greeting", 1, ob); } if( !this_object()->query("waiting_target") && ob->query_temp("fengwait") ) ob->delete_temp("fengwait"); add_action("do_name","宰"); }
int do_finish() { object me=this_object(); object who=this_player(); if( !who->query_temp("host_of_party") ) return notify_fail(name()+"瞪了你一眼:别乱说话!\n"); if( !me->query_temp("party_start_already") ) return notify_fail(name()+"瞪了你一眼:不是已经结束了吗!\n"); message_vision("$N对$n说道:吃饱喝足,多谢老板招待!\n", who, me); remove_call_out("finish_party"); call_out("finish_party", 3, who); return 1; }
int do_finish() { object me=this_object(); object who=this_player(); if( !who->query_temp("host_of_party") ) return notify_fail(name()+"������һ�ۣ�����˵����\n"); if( !me->query_temp("party_start_already") ) return notify_fail(name()+"������һ�ۣ������Ѿ���������\n"); message_vision("$N��$n˵�����Ա����㣬��л�ϰ��д���\n", who, me); remove_call_out("finish_party"); call_out("finish_party", 3, who); return 1; }
int accept_fight(object ob) { object me = this_object(); int my_max_qi = me->query("max_qi"); if ( me->query("qi")*100 / my_max_qi <= 80 ) { call_out("checking", 1, me, ob); return 0; } remove_call_out("checking"); call_out("checking", 1, me, ob); return 1; }
int do_close(string arg) { if ( !is_open() ) return notify_fail("门已经是关着的了。\n"); if (!arg || (arg != "men" && arg != "door")) return notify_fail("你要关什么?\n"); message_vision("$N想把门关上。\n", this_player()); remove_call_out("close_men"); call_out("close_men", 0); return 1; }
int test_player () { object me = this_object(); object who = this_player(); if (who->query("combat_exp") < 10000) { message_vision ("$N��$n˵������������в��㣬���Ի��������\n",me,who); message_vision ("\n$N�����ҷԸ��˼��䡣\n",me); message_vision ("��λ�����ټ�����ò�ض�$Nһ��ͷ��ӵ��$N�߳���\n",who); who->move("/d/qujing/tianzhu/zhaoyang"); who->move("/d/qujing/tianzhu/wumen"); message_vision ("�������߽����š�\n",who); return 1; } if (who->query("obstacle/tianzhu")=="done") { message_vision ("$N��$n˵����Ŷ�����������Ϊ�β�Ը����ȡ����\n",me,who); return 1; } if (! who->query_temp("obstacle/tianzhu_thrown")) { message_vision ("$N��$n˵����������Ҳ��Ȼ�������������\n",me,who); message_vision ("\n$N�����ҷԸ��˼��䡣\n",me); message_vision ("��λ��λ�ټ�����ò�ض�$Nһ��ͷ��ӵ��$N�߳���\n",who); who->move("/d/qujing/tianzhu/zhaoyang"); who->move("/d/qujing/tianzhu/wumen"); message_vision ("�������߽����š�\n",who); return 1; } if (who->query_temp("obstacle/tianzhu_killed")) { object junji = present ("jun ji",environment(me)); message_vision ("$N��$n˵���������ͿҲ������������Ů��\n",me,who); if (! junji) { message_vision ("\n$N��ֵ����������ڣ�\n",me); return 1; } message_vision ("\n$N��$n�Ը��˼��䡣\n",me,junji); remove_call_out ("following"); call_out ("following",5,me,junji,who); return 1; } message_vision ("$N��$n˵��������β��ݼ�������\n",me,who); return 1; }
int do_search (string arg) { object me = this_player(); if (!arg || arg != "bone") { message_vision ("$N����ȥѰ��ʲô��\n",me); return 1; } if (!me->query_temp("know_palm_bone")) { message_vision ("$N����ȥ�ڿ���֦����ҷ���������\n",me); return 1; } if (me->query("combat_exp")<4000) { message_vision ("$N���в�����Ҳ�ڿ���֦��װģ�����ط�����ȥ��\n",me); return 1; } if (room_busy) { remove_call_out ("reset_room_busy"); call_out ("reset_room_busy",random(5)+5); message_vision ("$N�ڿ���֦��Ϲæ����\n",me); return 1; } if (no_bone) { // remove_call_out("reset_no_bone"); // call_out("reset_no_bone",2700); message_vision ("$N�����ѿ���֦������Ҳ�Ҳ���ʲô���ˡ�\n",me); return 1; } if (random(10) == 0) { object bone = new (__DIR__"obj/bone"); bone->move(me); message_vision ("$N�۾�һ�����Ž��ǣ�\n",me); message_vision ("\n$N��������û��ע��Ͻ��ѰŽ��Ǵ������\n",me); no_bone = 1; call_out ("reset_no_bone",3600); return 1; }
int test_player () { object me = this_object(); object who = this_player(); if (who->query("combat_exp") < 10000) { message_vision ("$N对$n说道:假驸马道行不足,何以混入禁宫?\n",me,who); message_vision ("\n$N对左右吩咐了几句。\n",me); message_vision ("几位伺卫官极有礼貌地对$N一点头,拥着$N走出大殿。\n",who); who->move("/d/qujing/tianzhu/zhaoyang"); who->move("/d/qujing/tianzhu/wumen"); message_vision ("伺卫官走进午门。\n",who); return 1; } if (who->query("obstacle/tianzhu")=="done") { message_vision ("$N对$n说道:哦,驸马何来?为何不愿西行取经?\n",me,who); return 1; } if (! who->query_temp("obstacle/tianzhu_thrown")) { message_vision ("$N对$n说道:何许人也居然斗胆混入禁宫?\n",me,who); message_vision ("\n$N对左右吩咐了几句。\n",me); message_vision ("几位伺位官极有礼貌地对$N一点头,拥着$N走出大殿。\n",who); who->move("/d/qujing/tianzhu/zhaoyang"); who->move("/d/qujing/tianzhu/wumen"); message_vision ("伺卫官走进午门。\n",who); return 1; } if (who->query_temp("obstacle/tianzhu_killed")) { object junji = present ("jun ji",environment(me)); message_vision ("$N对$n说道:朕真糊涂也,误将妖精当爱女!\n",me,who); if (! junji) { message_vision ("\n$N奇怪道:军机大臣何在?\n",me); return 1; } message_vision ("\n$N对$n吩咐了几句。\n",me,junji); remove_call_out ("following"); call_out ("following",5,me,junji,who); return 1; } message_vision ("$N对$n说道:驸马何不后宫拜见公主?\n",me,who); return 1; }
void init() { object ob; ::init(); if (interactive(ob = this_player()) && !is_fighting() && !wizardp(ob)) { if((int)ob->query("combat_exp") > 100000) return; else { remove_call_out("greeting"); call_out("greeting", 1, ob); } } add_action("do_job","job"); }
int stop_fishing(string str) { if(!str || str != "fishing") return 0; if(!fishing) { notify_fail("You are not fishing!\n"); return 0; } if(!fishing[(string)this_player()->query_name()]) { notify_fail("You are not fishing!\n"); return 0; } map_delete(fishing, (string)this_player()->query_name()); write("You stand up and pull in your line."); say(this_player()->query_cap_name()+" gives up on fishing for now.", this_player()); remove_call_out("catch_anything"); return 1; }
void init() { object ob, me = this_object(); ::init(); set_heart_beat(1); if ( interactive(ob = this_player()) ) { if ( ob->query("family/family_name") != "华山派" ) me->kill_ob(ob); remove_call_out("checking"); call_out("checking", 1, me, ob); } }
int do_use(string arg) { object me = this_player(); object ob = present("fire", me); if ( !arg || arg=="" ) return 0; if ( !ob ) return 0; if( arg=="fire" ) { write("���ȼ���ۣ��Ѷ���������һЩ��\n"); set("exits", query("hidden_exits")); message("vision", "��������һЩ�����Ļ��һ��һ���ġ�\n", environment(me)); remove_call_out("fire_out"); call_out("fire_out", 3, me, ob); return 1; } }
string ask_me() { object ob = this_player(), me = this_object(); mapping obfam; obfam = (mapping)ob->query("family"); if ( !obfam || obfam["family_name"] != "华山派" ) { if ( ob->query_temp("feilong") < 3 ) { command( "sneer" ); ob->add_temp("feilong", 1); return "咱们豪无渊源,你问这做什么?还是别太好奇的好。\n"; } else { message_vision("$N脸色微变,目中阴鹭一闪,发出一阵冷笑。\n", me); ob->delete_temp("feilong"); me->kill_ob(ob); remove_call_out("checking"); call_out("checking", 1, me, ob); return "你三番四次想探听华山剑法的奥密,居心叵测!是否想对本派不利?你即然对华山剑法如此憧景,只好用华山剑法送你上路了。\n"; } } command( "look "+ob->query("id") ); if ( ob->query_skill("huashan-jianfa", 1) < 100 ) return "你的华山剑法修为不够,学不了「天外飞龙」。"; if ( ob->query_skill("zixia-gong", 1) < 70 ) return "剑宗以剑为宗,以气为辅,并非弃气不用,你的紫霞功可得再下一番苦功。"; if ( ob->query_skill("zixia-gong", 1) > ob->query_skill("huashan-jianfa", 1) ) { command( "sneer" ); return "你是气宗的人,却来向我请教,教我如何担当得起?"; } if ( ob->query("huashan/feilong") ) return "咦,我不是传了你「天外飞龙」吗?多下功夫好好练习,别堕了华山剑宗的威名!"; command( "say 好!我便传你「天外飞龙」。看仔细了!" ); message_vision("$N剑走龙蛇,白光如虹,凝重处如山岳巍峙,轻灵处若清风无迹,变幻莫测。\n" +"舞到急处,$N一声大喝,长剑脱手飞出,化作一道惊虹,直没至柄插入一株树中。\n", me); ob->set("huashan/feilong", 1); return "你今后得要勤加练习,别辜负了我的一番教导。"; }
void kill_cisha_target() { object me = this_object(); object target; if (!me->query_temp("cisha_task")) return; target = present(me->query_temp("cisha_target_id"), environment(me)); if (!objectp(target)) return; message_vision("$N对着$n喝道:"+RANK_D->query_rude(target)+ "!今日不是你死就是我活!\n\n", me, target); me->kill_ob(target); target->kill_ob(me); remove_call_out("check_cisha_result"); call_out("check_cisha_result", 3); }
void init() { object ob; mapping myfam; ob = this_player(); ::init(); if( interactive(ob) && !is_fighting() ) { remove_call_out("greeting"); call_out("greeting", 1, ob); } add_action("do_buy", "buy"); add_action("do_list", "list"); }
int do_sleep (string arg) { object me = this_player(); int phase = get_current_day_phase(); if (me->query("combat_exp")<50000) return 0; if (phase > 0 && phase < 5) {tell_object(me,"大白天的睡什么觉?\n");return 1;} if (!is_drunk(me)) {tell_object(me,"你精神十足,不需要睡觉。\n");return 1;} if (me->query("dntg/hell")=="done") return 0; // if(!me->query("HellZhenPass")) return 0 if (me->query_temp("dntg_hell/next")) return 0; message_vision ("$N喝得酩酊大醉,倚在在铁板桥边松阴之下,霎时间睡着了。\n",me); remove_call_out ("go_hell"); call_out ("go_hell",2+random(5),me); return 1; }
void greeting(object me) { if (me->query("shen")<0) { command("say "+ RANK_D->query_rude(me) +"也来偷睽峨眉女侠的寝宫?小心" "大爷我宰了你!"); return ; } if (me->query_temp("miekou")) return; command("hi " + me->query("id")); command("say 小弟在此久候了。"); command("follow "+me->query("id")); me->set_temp("miekou",1); remove_call_out("miekou"); call_out("miekou", 3, this_object(), me); command("hehe song"); return ; }
void init() { object ob; ::init(); if( interactive(ob = this_player()) && !is_fighting() ) { remove_call_out("greeting"); call_out("greeting", 1, ob); } add_action("do_check", "check"); add_action("do_check", "wen"); add_action("do_convert", "convert"); add_action("do_convert", "duihuan"); add_action("do_convert", "huan"); add_action("do_deposit", "deposit"); add_action("do_deposit", "cun"); add_action("do_withdraw", "withdraw"); add_action("do_withdraw", "qu"); }
int valid_leave (object who, string dir) { if (who->query("combat_exp") < 2000 || random(2)) { if (! who->query_temp("fainted_yedu")) { message_vision ("一阵腥风吹来,$N顿时头重脚轻。\n",who); who->set_temp("fainted_yedu",1); remove_call_out ("fall_down"); call_out ("fall_down",1,who,environment(who)); who->start_busy(1,1); return notify_fail("你禁不住踉跄了几下,两腿突然一软。\n"); } } who->set_temp("fainted_yedu",0); return 1; }
varargs void revive(int quiet) { remove_call_out("revive"); set_temp("unconcious", 0); while( environment()->is_character() ) this_object()->move(environment(environment())); this_object()->enable_player(); if( !quiet ) { COMBAT_D->announce(this_object(), "revive"); set_temp( "block_msg/all", 0 ); set_temp( "block_cmd/all", 0 ); message("system", HIY "\n慢慢地你终于又有了知觉....\n\n" NOR, this_object()); } else set_temp( "block_msg/all", 0 ); set_temp( "block_cmd/all", 0 ); }
void init() { object me, ob; ::init(); ob = this_player(); me = this_object(); if (interactive(ob) && !environment(ob)->query("no_fight") && (ob->query("combat_exp") > 10000) && ( ob->query("party/party_name") == HIR "天地会" NOR )) { command("say 你这个天地会反贼,纳命来吧!!!\n"); me->set_leader(ob); remove_call_out("kill_ob"); call_out("kill_ob", 1, ob); } }
void greeting(object me) { object basket,food; if(!me->query("food_carrier")) return ; if(me->query("food_carrier")+60>time()) { message_vision(CYN"�����������һ�ۣ�˵��������ʹ������Ҫ�ٵ�һ�� \n"NOR,me); remove_call_out("make_food"); call_out("make_food",60+me->query("food_carrier")-time(),me); return ; } message_vision(CYN "��ϵ����ȥ��߶Ȱ����IJ˶���ɹ���� \n"NOR,me); basket=present("bamboo basket",this_object()); if(!basket) { basket=new(__DIR__"obj/zhulan"); basket->move(this_object()); }
void init() { delete("exits/out"); if(this_player()->query_temp("shendian/tumigong_kill") >= 2) { message_vision(HIC"\n刹那间你眼前的石头中间裂开了。\n\n"NOR,this_player()); set("exits/out", __DIR__"linwai"); } if (!((this_player()->query_temp("shendian/tumigong") == "begin") || (this_player()->query("id") == "shen jiang"))) { message_vision(HIW"\n岂有此理,$N是怎么进来的?出去!\n\n"NOR,this_player()); this_player()->move("/d/city/kezhan"); } if (this_player()->query_temp("shendian/tumigong") == "begin") { remove_call_out ("check_hp"); call_out ("check_hp", 3,this_player()); } add_action ("do_cast","cast"); }
void preparing (object who) { object where = this_object (); object king = present("guo wang",this_object()); if (king) return; if (! who || environment (who) != where) return; if (where->query("has_thrown")) { return; } message_vision ("彩楼上有人又高喊:公主临窗,伺女备球!\n",who); message_vision ("底下无数看客高声呐喊:抢绣球也!抢绣球也!\n",who); remove_call_out ("throwing"); call_out ("throwing",random(10)+10,who); }
void greeting(object ob) { object me, room1; me = this_object(); room1 = environment(me); // if(ob->query_temp("hastrystab")==6) return; if (room1->query("no_fight")) room1->set("no_fight", 0); if (interactive(ob)) // && !environment(ob)->query("no_fight")) { command("say 你这家伙不要跑,让大爷我宰了你!!!\n"); me->set_leader(ob); remove_call_out("kill_ob"); call_out("kill_ob", 1, ob); } }
void die() { object ob, me, killer; me = this_object(); if (! ob = find_player(me->query("waiting"))) find_living(me->query("waiting")); if (ob && ob->query("slough/task")) { killer = find_living(ob->query("slough/id")); if (killer) killer->set_temp("baixing_killed", 1); } message_vision(HIC "$N惨号一声,倒在地上死了!\n" NOR, me); remove_call_out("escape_me"); destruct(me); }