int heal_up() { if( environment() && !is_fighting() ) { call_out("leave", 1); return 1; } if( is_fighting() && (int) this_object()->query("kee") <= 100) backattack(); return ::heal_up() + 1; }
void heart_beat() { object me=this_player(); object ob=this_object(); mixed enemy; int i,j; if(!ob) return; if(!environment(ob)) return ; enemy=all_inventory(environment(ob)); i=sizeof(enemy); if( is_fighting() ){ if(random(100)>70) message_vision(HIC"雷姞儿眼神猛爆青光, 五雷鼎气游走全身!!\n"NOR,this_object()); if(random(5)>2) { message_vision(HIR"一道落雷猛然从天空落下,击中了在场的所有人!!\n"NOR,this_object()); for(j=0;j<i;j++) { if (!enemy[j]->is_fighting() && enemy[j]->is_character() && !enemy[j]->is_corpse() && living(enemy[j]) && enemy[j]!=ob) { enemy[j]->receive_wound("kee",500); enemy[j]->start_busy(2); } } } if(query_temp("ref_shield")!=1) command("conjure reflection"); } :: heart_beat(); }
string ask_me(object who) { int i; object *ob; if( query("revealed") ) { if( is_killing(who) ) return "你既然知道了我的身分,今日休想活命!\n"; else { kill_ob(who); who->fight_ob(this_object()); return "老子就是血手刘三,血手刘三就是你老子!纳命来!\n"; } } if( (random(10) < 5) || !is_fighting() ) return "我...不知道!\n"; set_temp("apply/attack", 70); set_temp("apply/dodge", 50); set_temp("apply/parry", 60); set_temp("apply/damage", 20); set("title", "野羊山寨二寨主"); set("nickname", HIR "血手刘三" NOR); message("vision", HIY "刘安禄眼中突然放出异样的光芒,颤声说道:看来...你都知道了?\n\n" "刘安禄大喝一声,叫道:既然如此,老子今天豁出去了,纳命来!\n" NOR "刘安禄使开单刀,招数精奇,沈猛狠辣,和刚才简直判若两人!\n", environment(), this_object() ); set("pursuer", 1); set("attitude", "aggressive"); set("vendetta/authority", 1); set("chat_msg_combat", ({ (: random_move :) }) );
string ask_job() { object obj, place, *inv, me = this_player(); if( is_fighting() || is_busy() ) return "我正忙着。"; if( (string)me->query("gender") != "男性" ) return "阿弥陀佛!善哉!善哉!女施主莫开老纳的玩笑。"; if( (string)me->query("class") != "bonze" ) return "阿弥陀佛!善哉!善哉!施主不是佛门弟子,还是请回吧。"; if( (int)me->query_skill("buddhism", 1) < 120 ) return "本寺只延请高僧前来讲经说佛。"; if( day_event() != "event_dawn" ) return "本寺撞钟诵经时辰已过," + RANK_D->query_respect(me) + "下次再来吧。"; if( me->query_condition("lyjob") ) return RANK_D->query_respect(me) + "已经在讲经说佛了。"; command("nod"); me->apply_condition("lyjob", 3 + random(3)); if( random((int)me->query_temp("lypoint")) > 1 && !(present("jiasha", me)) ) { obj = new("/d/hangzhou/obj/jiasha"); obj->move(me); message_vision("旁边一僧将一件红衣袈裟披在$N身上。\n", me); }
int heal_up() { object master; if (this_object()->query("end_tag") == 1) { if( environment() && !is_fighting() ) { call_out("dispell", 1); return 1; } } if( objectp(master = query("possessed")) && (int)master->query("atman") > 10 ) { message("tell", HIR + name() + "告诉你:我...需...要...你...的...力...量...\n" NOR, master ); master->add("atman", -10); master->receive_damage("gin", 1); ::heal_up(); return 1; // Always acquire power from master. } else { call_out("dispell", 1); return ::heal_up(); } }
int heal_up() { if( environment() && !is_fighting() ) { call_out("leave", 1); return 1; } return ::heal_up() + 1; }
void init() { ::init(); if(interactive(this_player()) && !is_fighting()) { call_out("greeting", 1, this_player()); } add_action("do_vendor_list", "list"); }
void init() { object ob; ::init(); if( interactive(ob = this_player()) && !is_fighting() ) { remove_call_out("greeting"); call_out("greeting", 1, ob); } }
void init(){ object ob; ::init(); if( interactive(ob = this_player()) && !is_fighting() ) { remove_call_out("greeting"); call_out("greeting", 2, ob); } add_action("do_killing", "kill"); }
int heal_up() { if (!is_fighting() ) { message_vision (HIW"系统:战斗停止,$N回收中,。\n"NOR, this_object ()); destruct(this_object()); return 1; } return ::heal_up() + 1; }
void init() { object me; ::init(); if( interactive(me = this_player()) && !is_fighting() && !random(5)) { add_action("do_accept", "accept"); call_out("greeting", 1, me); } }
mixed ask_opinion() { object me; object ob; me = this_player(); if (count_lt(me->query("combat_exp"), 200000)) return "哼!你这点武功也出来丢人现眼?"; if (me->query("opinion/" MY_OPINION) == ULTRA_OPINION) return "不必了,你内功方面的修为已经称得上是宗师了!"; if (is_fighting(me)) return "哈哈,废什么话,打赢了我,你自己给自己评价吧!"; if (me->is_fighting()) return "你等会儿吧!待我赶走他们。"; if (objectp(ob = query_temp("opinion"))) { if (ob == me) { command("say 你着什么急?不要烦我。"); return 1; } message_vision(CYN "$N" CYN "颇为恼怒的对$n" CYN "道:“没看我正忙着吗?”\n" NOR, this_object(), me); return 1; } switch(me->query_temp("want_opinion/shenni")) { case 0: command("say 好吧,咱们过一招,比拚一下内力。"); break; case 1: command("say 你准备好没有?好了就来吧。"); break; case 2: message_vision(CYN "$N" CYN "皱眉对$n" CYN "道:“我看你这人是够罗嗦的。”\n" NOR, this_object(), me); break; case 3: command("say 快给我闭上你的鸟嘴!"); return 1; } me->add_temp("want_opinion/shenni", 1); return 1; }
void init() { object ob; ::init(); if (interactive(ob = this_player()) && !is_fighting()) { remove_call_out("greeting"); call_out("greeting", 1, ob); } add_action("do_vendor_list", "list"); }
int heal_up() { if(environment() && !is_fighting() && query("startroom") && file_name(environment()) != query("startroom")) { // command("say ok"); return_home(query("startroom")); return 1; } return ::heal_up() + 1; }
void init() { object ob; ::init(); if (interactive(ob = this_player()) && !is_fighting() && (string)environment()->query("short") == "小树林") { remove_call_out("greeting"); call_out("greeting", 1, ob); } }
// This is the chat function dispatcher. If you use function type chat // message, you can either define your own functions or use the default // ones. int chat() { string *msg; int chance, rnd; if( !environment() ) return 0; if( !chance = (int)query(is_fighting()? "chat_chance_combat": "chat_chance") ) return 0; if( random(100) > chance ) return 0; if( arrayp(msg = query(is_fighting()? "chat_msg_combat": "chat_msg"))) { if (sizeof(msg) == 0) return 0; rnd = random(sizeof(msg)); if( stringp(msg[rnd]) ) say(msg[rnd]); else if( functionp(msg[rnd]) ) return evaluate(msg[rnd]); return 1; } }
void init() { object obj; ::init(); if(interactive(obj=this_player()) && !is_fighting()) { remove_call_out("greeting"); call_out("greeting",2,obj); add_action("do_say","say"); } }
int accept_fight(object who) { string att; att = query("attitude"); if( is_fighting() ) switch(att) { case "heroism": command("say 哼!出招吧!\n"); command("holdwith arrow"); break; default: command("say 想倚多为胜,这不是欺人太甚吗!\n"); return 0; } if( (int)query("gin") * 100 / (int)query("max_gin") >= 90 && (int)query("kee") * 100 / (int)query("max_kee") >= 90 && (int)query("sen") * 100 / (int)query("max_sen") >= 90 ) { switch(att) { case "friendly": command("say " + RANK_D->query_self(this_object()) + "怎么可能是" + RANK_D->query_respect(who) + "的对手?\n"); return 0; case "aggressive": case "killer": command("say 哼!出招吧!\n"); break; default: if( !is_fighting() ) command("say 既然" + RANK_D->query_respect(who) + "赐教," + RANK_D->query_self(this_object()) + "只好奉陪。\n"); } return 1; } else return 0; }
void init() { object ob; ob = this_player(); ::init(); if( interactive(ob) && !is_fighting() ) { remove_call_out("greeting"); call_out("greeting", 1, ob); } add_action("do_qiecuo","qiecuo"); }
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); } } }
void heart_beat() { if( random(4) < 1 ){ if( is_fighting() ){ if( query("kee") < query("eff_kee") ) command("exert recover"); } else{ if( query("eff_kee") < query("max_kee") ) command("exert heal"); } } :: heart_beat(); }
void heart_beat() { if( is_fighting() ){ if(query_temp("ref_shield")!=1) command("conjure reflection"); if( query("kee") < query("eff_kee") ) command("exert recover"); } else{ if( query("eff_kee") < query("max_kee") ) command("exert heal"); } :: heart_beat(); }
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"}));
// This function is called by the reset() of the room that creates this // npc. When this function is called, it means the room demand the npc // to return its startroom. int return_home(object home) { // Are we at home already? if( !environment() || environment()==home ) return 1; // Are we able to leave? if( !living(this_object()) || is_fighting() || !mapp(environment()->query("exits")) ) return 0; // Leave for home now. message("vision", this_object()->name() + "急急忙忙地离开了。\n", environment(), this_object()); return move(home); }
int chat() { string *msg; int chance, rnd; if( !environment() ) return 0; if( query_temp("is_unconcious") ) return 0; if(query("intellgent")) intellgent_behavor(); if( !chance = (int)query(is_fighting()? "chat_chance_combat": "chat_chance") ) return 0; if(arrayp(msg = query(is_fighting()? "chat_msg_combat": "chat_msg")) && sizeof(msg) != 0) { if( random(100) < chance ) { rnd = random(sizeof(msg)); if(stringp(msg[rnd])) { say(msg[rnd]); } else if(functionp(msg[rnd])) { return evaluate(msg[rnd]); } } return 1; } return 0; }
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 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","宰"); }
bool area_attack_advisable(struct creature *ch) { // Area attacks are advisable when there are more than one PC and // no other non-fighting NPCs int pc_count = 0; for (GList *it = first_living(ch->in_room->people);it;it = next_living(it)) { struct creature *tch = it->data; if (can_see_creature(ch, tch) && !(IS_NPC(tch) && is_fighting(tch))) pc_count++; } return (pc_count > 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"); }
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"); }