int practice_skill(object me) { object weapon; if( !objectp(weapon = me->query_temp("weapon")) || (string)weapon->query("skill_type") != "blade" ) return notify_fail("你必须先找一把刀,才能练刀法。\n"); if( (int)me->query("kee") < 40 ) return notify_fail("你的体力不够练这门刀法,还是先休息休息吧。\n"); me->receive_damage("kee", 30); me->add("force", -5); return 1; }
int valid_leave(object me, string dir) { if (dir == "north" ) { if (me->query("family/family_name") == "蜀山剑派") { if (me->query("shushan/ask_zuidao_go")) return ::valid_leave(me, dir); return notify_fail("你忽然听到剑圣的话:“本派禁地,不怕被重罚吗!?”\n"); } if (objectp(present("jian tong", environment(me)))) return notify_fail("守山剑童客气地说:“后山乃本派禁地,还是请回吧!”\n"); } return ::valid_leave(me, dir); }
int practice_skill(object me) { object weapon; if (!objectp(weapon = me->query_temp("weapon")) || (string)weapon->query("skill_type") != "whip") return notify_fail("你使用的武器不对。\n"); if ((int)me->query("qi") < 50) return notify_fail("你的体力不够练日月鞭法。\n"); if ((int)me->query("neili") < 50 ) return notify_fail("你的内力不够练日月鞭法。\n"); me->receive_damage("qi",30); me->add("neili",-30); return 1; }
int do_jump(string arg){ object room, me; if(!arg || (arg != "down" && arg != "下")){ return notify_fail("你要往哪里跳?\n"); } me = this_player(); room = find_object(__DIR__"taihedian"); if(!objectp(room)){ room = load_object(__DIR__"taihedian"); } message_vision("$N踊身向下跳去。\n", me); tell_object(room, me->name()+"轻盈的落在你的身旁。\n"); me->move(room); return 1; }
int valid_leave(object me, string dir) { object ob,cloth; if( dir == "up" && ob=present("lao ban", this_object())) { cloth=present("waiter cloth",me); if(objectp(cloth)) if(cloth->query("equipped")) return 1; return notify_fail("老板双手一张挡住去路,恨声道:你个" + RANK_D->query_rude(this_player()) + ",不想活了啊,惊了狄小侯爷那还了得!\n"); } return 1; }
//Added by tie to deal with attribute damages boots varargs int attr_change(string type, int change, object who) { int val; if( type!="strength" && type!="courage" && type!="intelligence" && type!="spirituality" && type!="composure" && type!="personality" && type!="constitution" && type!="karma" && type!="agility" && type!="durability" && type!="flexibility" && type!="tolerance" ) error("F_DAMAGE: 伤害种类错误( 只能是 strength,courage,intelligence,spirituality,composure,personality, constitution,karma,agility,durability,flexibility,tolerance其中之一 )。\n"); if( objectp(who) ) set_temp("last_attr_from", who); val = (int)query("attr_apply/"+type) +change; set("attr_apply/"+type, val); set_heart_beat(1); return change; }
int perform(object me,object ob) { int lv; me=this_player(); lv=me->query("functions/make-dagger/level"); if(me->query("force") < 500 )return notify_fail("你的内力不够, 休息一下再用吧!!\n"); if(me->query("darkforce/make-ken/exp") > 0 )return notify_fail("你并非以匕首系为主的忍者!!\n"); if(me->query("class") !="killer" ) return notify_fail("你的职业无法使用!!\n"); if(objectp(ob = present("evil dagger", me))) return notify_fail("你身上已经有一把魔气匕了!!\n"); if(me->is_fighting()) me->start_busy(1); message_vision(HIB"$N凝聚体内内力转为魔气, 魔气渐渐在手中形成一把匕首!!\n"NOR,me); me->add("force",-500 ); call_out("maked",2,me); return 1; }
int main(object me, string str) { object ob; //int i; if (! str) return notify_fail("你要隐藏什么物品?\n"); if (! stringp(me->query("can_summon/" + str))) return notify_fail("你不知道如何隐藏这个物品。\n"); if (! objectp(ob = present(str, me)) && ! objectp(ob = present(str, environment(me)))) return notify_fail("你身边没有这个物品。\n"); if (! ob->hide_anywhere(me)) { message_vision(HIM "$N" HIM "举着" + ob->name() + HIM ",口中念念有词。\n然而" "什么也没有发生 :)\n", me); } return 1; }
int practice_skill(object me) { object weapon; if (!objectp(weapon = me->query_temp("weapon")) || (string)weapon->query("skill_type") != "sword") return notify_fail("你使用的武器不对。\n"); if ((int)me->query("jingli") < 50) return notify_fail("你的精力不够练回风拂柳剑。\n"); if ( me->query_skill("huifeng-jian", 1) < 100 ) me->receive_damage("jingli", 35); else me->receive_damage("jingli", 20); return 1; }
int practice_skill(object me) { object weapon; if( !objectp(weapon = me->query_temp("weapon")) || (string)weapon->query("skill_type") != "staff" ) return notify_fail("你必须先找一根木杖或者是类似的武器,才能练杖法。\n"); if( (int)me->query("kee") < 60 ) return notify_fail("你的体力不够练这门杖法,还是先休息休息吧。\n"); me->receive_damage("kee",50); return 1; }
int perform(object me, object target) { object weapon; int level, b; string msg; if (! target) target = offensive_target(me); if (! target || ! me->is_fighting(target)) return notify_fail("「天魔缠身」只能对战斗中的对手使用。\n"); if (! objectp(weapon = me->query_temp("weapon")) || (string)weapon->query("skill_type") != "sword") return notify_fail("你使用的武器不对。\n"); if (target->is_busy()) return notify_fail(target->name() + "目前正自顾不暇,放胆攻击吧!\n"); if (!living(target)) return notify_fail("对方已经不能战斗了!\n"); if ((level = me->query_skill("tianmo-jian", 1)) < 160) return notify_fail("你的天魔剑法不够娴熟,不会使用「天魔缠身」。\n"); if (me->query("neili") < 80) return notify_fail("你现在真气不够,无法使用「天魔缠身」。\n"); msg = HIM "$N" HIM "使出天魔剑法「天魔缠身」,默运口诀,将手中" + weapon->name() + HIM "一抖,立时发出一阵摄人心魂的声音。\n" NOR; me->add("neili", -60); if (random(level) > (int)target->query_skill("parry", 1) / 2) { msg += HIR "结果$p" HIR "顿觉神智不定,心燥意乱," "全然不知身在何处,呆立当场!\n" NOR; b = level / 20; if (b > 8) b = 8; target->start_busy(b); me->start_busy(1); } else { msg += CYN "可是$p" CYN "看破了$P" CYN "的企图,连忙" "运功将心神护住。\n" NOR; me->start_busy(2); } message_combatd(msg, me, target); return 1; }
/* int check_legal_name(string name); int check_legal_name(string name) { int i; i = strlen(name); if( (strlen(name) < 4) || (strlen(name) > 12 ) ) { write("对不起,中文名字必须是三到六个中文字。\n"); return 0; } while(i--) { if( name[i]<=' ' ) { write("对不起,中文名字不能用控制字元。\n"); return 0; } if( i%2==0 && !is_chinese(name[i..<0]) ) { write("对不起,名字必需是中文。\n"); return 0; } } return 1; } */ int main(object me, string arg) { object who; string uid, org_title; if(!arg || sscanf(arg,"%s %s",uid ,org_title) != 2) return notify_fail("指令格式 : entitle <id> <组织中的称号>\n"); if(me->query("organization/privs") != -1) return notify_fail("你没有这种权力。\n"); if(!objectp(who = present(uid, environment(me))) || !living(who) || !userp(who)) return notify_fail("这里没有这个玩家。\n"); if(who->query("organization/org_name") != me->query("organization/org_name")) return notify_fail( who->query("name") + "并不是" + me->query("organization/org_name") + "的一份子。\n"); if((int)me->query("score") < LEADER_SCORE_COST) return notify_fail( "你的评价不够"+ chinese_number(LEADER_SCORE_COST)+"点。\n"); if((int)who->query("score") < MEMBER_SCORE_COST) return notify_fail( who->query("name")+"的评价不够"+ chinese_number(MEMBER_SCORE_COST)+"点。\n"); if( strlen(org_title) > 20 ) return notify_fail("你取的称号太长了\n"); org_title = replace_string(org_title, "$BLK$", BLK); org_title = replace_string(org_title, "$RED$", RED); org_title = replace_string(org_title, "$GRN$", GRN); org_title = replace_string(org_title, "$YEL$", YEL); org_title = replace_string(org_title, "$BLU$", BLU); org_title = replace_string(org_title, "$MAG$", MAG); org_title = replace_string(org_title, "$CYN$", CYN); org_title = replace_string(org_title, "$WHT$", WHT); org_title = replace_string(org_title, "$HIR$", HIR); org_title = replace_string(org_title, "$HIG$", HIG); org_title = replace_string(org_title, "$HIY$", HIY); org_title = replace_string(org_title, "$HIB$", HIB); org_title = replace_string(org_title, "$HIM$", HIM); org_title = replace_string(org_title, "$HIC$", HIC); org_title = replace_string(org_title, "$HIW$", HIW); org_title = replace_string(org_title, "$NOR$", NOR); who->set("organization/org_title",org_title+NOR); me->add("score",-LEADER_SCORE_COST); who->add("score",-MEMBER_SCORE_COST); if (me != who) { message_vision("$N封$n为"+me->query("organization/org_name")+"的"+org_title+"\n"+NOR,me,who); }else message_vision("$N封$N自己为"+me->query("organization/org_name")+"的"+org_title+"\n"+NOR,me); return 1; }
int valid_learn(object me) { object weapon; if( (int)me->query("max_neili") < 300 ) return notify_fail("你的内力不足,没有办法练秋风尘法, 多练些内力再来吧。\n"); if ((int)me->query_skill("force", 1) < 50) return notify_fail("你的基本内功火候太浅。\n"); if ((int)me->query_skill("yunv-xinfa",1)<10) return notify_fail("你的玉女心法火候太浅。\n"); if ( !objectp(weapon = me->query_temp("weapon")) || ( string)weapon->query("skill_type") != "whip" ) return notify_fail("你必须先找一条拂尘才能练尘法。\n"); return 1; }
int do_update(object me){ if (!objectp(me) || me->is_ghost()) return 1; // ���¼��㾫����ֵ�������logind�еļ�����ͬ�� // �ĺ��к�ʽͳһ���� :: annie "/cmds/std/unwield.c"->main(me,"all"); "/cmds/std/remove.c"->main(me,"all"); "/feature/nada.c"->reset_player_status(me); me->save(); return 1; }
mixed member(mixed arg) { mixed *cur; mixed val; cur = query_head(); while (cur != NULL) { val = value(cur); if ((val == arg) || (objectp(val) && ((int)val->id(arg) || (int)val->key(arg)))) return val; else cur = next(cur); } return 0; }
VOID standard_hardware_clobber P1C(LVAL, object) { LVAL addr, oblist; if (! objectp(object)) xlerror("not an object", object); addr = slot_value(object, s_hardware_address); oblist = getvalue(s_hardware_objects); if (! listp(oblist)) xlerror("not a list", oblist); setvalue(s_hardware_objects, xlcallsubr2(xdelete, addr, oblist)); set_slot_value(object, s_hardware_address, NIL); send_callback_message(object, sk_clobber); }
int practice_skill(object me) { object weapon; if (!objectp(weapon = me->query_temp("weapon")) || (string)weapon->query("skill_type") != "whip") return notify_fail("你使用的武器不对。\n"); if ((int)me->query("jingli") < 50) return notify_fail("你的精力不够练断云鞭法。\n"); me->receive_damage("jingli", 10 ); if( me->query_skill("duanyun-bian",1) > 150 ) me->receive_damage("jingli", 5 ); if( me->query_skill("duanyun-bian",1) > 180 ) me->receive_damage("jingli", 10 ); if( me->query_skill("duanyun-bian",1) > 200 ) me->receive_damage("jingli", 15 ); return 1; }
varargs object carry_object(string file, mapping attr) { object ob; string *keyList; int i; if(!objectp(ob = new(file))) return 0; if(mapp(attr)) { keyList = keys(attr); for(i=0; i<sizeof(keyList); i++) { ob->set(keyList[i], attr[keyList[i]]); } } ob->move(this_object()); return ob; }
int main(object me, string arg) { object target; if(!arg || !objectp(target = present(arg, environment(me)))) return notify_fail("你想唤醒谁?\n"); if(target == me) return notify_fail("你不能自己唤醒自己!\n"); message_vision(HIY "$N拍了拍$n的头,喊道:“别装蒜了,起来!”\n$n睁开眼睛一脸不好意思地站了起来。\n" NOR, me, target ); target->receive_curing("qi", 10 ); target->remove_call_out("revive"); target->revive(); target->reincarnate(); return 1; }
int fliping(object me) { if (!objectp(me)) return 1; me->delete_temp("manglin/climb"); if(!interactive(me) || environment(me) != this_object()){ return 1; } if(!me->is_ghost()){ me->move(__DIR__"top4"); message_vision("$N顺着树杆爬了上来。\n", me); me->stop_busy(); } return 1; }
int practice_skill(object me) { object weapon; if (!objectp(weapon = me->query_temp("weapon")) || (string)weapon->query("skill_type") != "sword") return notify_fail("你使用的武器不对。\n"); if ((int)me->query("jingli") < 50) return notify_fail("你的精力不够练伏魔剑。\n"); if( (int)me->query_skill("qianye-shou", 1) < 100 ) return notify_fail("你的如来千叶手修为还不够。\n"); me->receive_damage("jingli", 35); return 1; }
string _a_short(mixed x) { if(objectp(x)) return x->a_short(); // Check for "a"/"an" prefix - if missing, add it if(stringp(x)) if(strsrch(lower_case(x), "a ") != 0) if(strsrch(lower_case(x), "an ") != 0) { if(member_array(x[0],vowels) == -1) return "a " + x; else return "an " + x; } return x; }
int valid_learn(object me) { object weapon; if( (int)me->query("max_force") < 100 ) return notify_fail("你的内力不足。\n"); if ((int)me->query_skill("force") < 30) return notify_fail("你的内功火候太浅。\n"); if ( !objectp(weapon = me->query_temp("weapon")) || ( string)weapon->query("skill_type") != "whip" ) return notify_fail("你必须先找一条鞭子才能练无为拂尘。\n"); return 1; }
mapping scan_objects(mixed src) { // Ermittelt zu jedem Typ (Waffe, Ruestungstyp...) alle Objekte diesen Typs // Gesucht wird: - Im Inventory, falls Objekt angegeben // - Im Array, falls Array angegeben object *obs; mapping res; mixed x; int i,cost,cost_limit; if (mappingp(src)) return src; res=([]); if (objectp(src)) src=all_inventory(src); if (!pointerp(src)) src=({src});
int valid_leave(object me, string dir) { if (dir == "south" ) { if (((string)me->query("family/family_name")=="将军府") || wizardp(me) || me->query_temp("pending/jiangjun_answer")) { return ::valid_leave(me, dir); } if(objectp(present("qin an", environment(me)))) { return notify_fail("秦安喝道:将军府岂是你乱闯之地!有何贵干(answer)?\n"); } return 1; } return 1; }
int do_push(string arg) { object me,m; me=this_player(); m=new("/d/4world/npc/niwawa"); if ( !arg &&(arg != "土地公公")&&(arg != "土地婆婆")&&(arg!="status") ) return notify_fail("你要推什么?\n"); if (objectp(present("mud baby", environment(me)))) return notify_fail("泥娃娃向你笑嘻嘻地说:我在这呢,推什么推?\n"); message_vision("$N使劲地推了推土地公公和土地婆婆的泥像。\n",me); m->move(environment(me)); write("「漱嗦」几声嫌诏,泥像后蹦出个泥娃娃来!\n"); return 1; }
string ob_path(mixed ob) { string file; string *dir; int i; if (objectp(ob)) file = base_name(ob); else if (stringp(ob)) file = ob; else return "/"; dir = explode(file, "/"); file = "/"; for (i=0; i<sizeof(dir)-1; i++) file += dir[i]+"/"; return file; }
void set_amount(int v) { object owner = environment(); if (v >= 0) { set("weapon_prop/damage", v * (int)query("base_weapon")); set("weapon_prop/dodge", v * (int)query("base_dodge")); set("weapon_prop/speed", v * (int)query("base_speed")); set("rigidity", v * query("base_rigidity")); if (query("equipped") && objectp(owner)) { owner->set_temp("apply/damage", query("weapon_prop/damage") ); owner->set_temp("apply/dodge", query("weapon_prop/dodge") ); owner->set_temp("apply/speed", query("weapon_prop/speed") ); } } ::set_amount(v); }
int board_ship(string str) { object ob; if(!str) return notify_fail("ÄãÒª´îʲô?\n"); if(!objectp(ob=present(str,environment(this_player())))) return notify_fail("¿´Çå³þµã , ÓÐÄÇÖÖ´¬Âð ?\n"); if(str=="ship") { message_vision("$N×ßµ½°¶±ß , ´îÉÏÁ˶ɴ¬ !\n",this_player()); this_player()->move("/open/gblade/port/room/ship"); return 1; } return 0; }
int main(object me, string arg) { object who; string *wives; mapping wiv; if(me->query("age") < 17) return notify_fail("小孩子一边玩儿去。\n"); if (!arg) return notify_fail("你要向谁求婚?\n"); if (me->query("gender")=="女性") return notify_fail("只有男人才能向别人求婚!\n"); if (!objectp(who=present(arg,environment(me)))) return notify_fail("这里没有这个人。\n"); if (!who->is_character()) return notify_fail("想清楚!"+who->name()+"是什么呀!\n"); if (who==me) return notify_fail("开什么玩笑?!?\n"); if (me->query("married")) return notify_fail("嘿嘿,不怕" + me->query("couple/name") + "揍你吗?\n"); if (!living(who)) return notify_fail("嗯...你还是先把"+who->name()+"弄醒吧。\n"); if (who->query("gender")=="男性") return notify_fail("嗯?你变态吗?!?\n"); if ((me->query("bonze/class")=="bonze")||(who->query("bonze/class")=="bonze")) return notify_fail("出家人四大皆空,婚嫁之事就免了吧。\n"); if (who->query("married")) return notify_fail("还是算了吧,"+who->name()+"是有夫之妇啦!\n"); message_vision("$N对着$n拍着胸脯说:只要你嫁给我,你叫我做什么我就做什么!\n", me, who); me->set("proposing",1); me->set("propose_target", getuid(who)); who->set("proposed",1); who->set("propose_man", getuid(me)); return 1; }