Esempio n. 1
0
int do_jump()
{
        object me;
        int wait;
        me = this_player();
        wait = random( 40 - (int)(me->query("con"))) * 2;
        if ( wait <= 20) wait = 21;
        message_vision("$N"噗嗵"一声盘腿坐在地下..\n",me);
        tell_object(me,"你感到内力在体内回荡...\n");
        remove_call_out("curehimup");
        call_out("curehimup", wait, me);
return 1;
}
Esempio n. 2
0
void remove_effect(object me, int amount)
{
        if(!me) return ;
       me->set_temp("black",0);
       me->add_temp("apply/parry", -15);
       me->add_temp("apply/force", -5);
       me->add_temp("apply/move", -5);
       me->add_temp("apply/dodge", -5);
       me->add_temp("apply/unarmed", -15);
       tell_object(me,"���ڵ����������������ӵ�����ʧ��\n");
        if(skill < 100)
        function_improved("black",random(700));
}
Esempio n. 3
0
void back( object me )
{
	int c_exp,c_skill;
	me->move(__DIR__"cexiang");
	message_vision("$N一觉醒来,飞身跃下绳来。\n",me);
	c_exp=me->query("combat_exp");
	c_skill=me->query_skill("dodge",1);
	if ((random(10)>3) && c_skill*c_skill*c_skill/10<c_exp && c_skill<101)
	{
		me->improve_skill("dodge",me->query("int"));
		tell_object(me,"你的基本轻功进步了!\n");
	}
}
Esempio n. 4
0
int remote_tell(string cname, string from, string mud, string to, string msg)
{
	object ob;
	
	if( ob = find_player(to) ) {
		if( wizardp(ob) && ob->query("env/block")=="YES" )
			return 0;
			
		if( ob->query("env/block")=="ALL" )
    		    return notify_fail(ob->name()+"现在不想和人说话。\n");

		if( cname )
			tell_object(ob, sprintf(HIG "%s(%s@%s)千里传音告诉你:%s\n" NOR,
				cname, capitalize(from), mud, msg ));
		else
			tell_object(ob, sprintf(HIG "%s@%s 告诉你:%s\n" NOR,
				capitalize(from), mud, msg ));
		ob->set_temp("reply", from + "@" + mud);
		return 1;
	} else
		return 0;
}
Esempio n. 5
0
int do_push(string arg){
	object me, room;
	
	me = this_player();
	if(!arg || (arg != "stone" && arg != "山石" && arg!="峭壁")){
		return notify_fail("你要触摸什么?\n");
	}
	if(me->query("class") == "shenshui"){
		tell_object(me, "你伸手在山石上运力一推。\n");
		tell_object(me, CYN"山石上裂开了一道逢,你闪身进去。山石又在你身后合拢。\n\n"NOR);
		message("vision", YEL"你隐约看到" + me->name()+"的身影在石壁旁一闪就消失不见了。\n"NOR, 
				environment(me), me);
		room = find_object(AREA_SHENSHUI"huoyan");
		if(!objectp(room)){
			room = load_object(AREA_SHENSHUI"huoyan");
		}
		me->move(room);
	} else {
		tell_object(me, "你左推右推也不得法,山石纹丝不动。\n");
	}
	return 1;
}
Esempio n. 6
0
File: kezhan.c Progetto: cosin/XYJ
int valid_leave(object me, string dir)
{
        object mbox;

        if ( !me->query_temp("rent_paid") && dir == "east" )
        return notify_fail("店小二满脸堆笑地挡住了你:对不起,后面是客人的卧房,不是本店的客人,不便打扰。\n");
        if( mbox = me->query_temp("mbox_ob") ) {
                tell_object(me, "你将信箱交回给邮差。\n");
                destruct(mbox);
        }

        return ::valid_leave(me, dir);
}
Esempio n. 7
0
int do_north(string arg)
{
   object room, me;

   me = this_player();

   tell_object(me, "你绕过梧桐树,拨开草丛,惊奇地发现这里居然别有洞天...\n\n");
   room=find_object(__DIR__"shuhou");   
   if(!objectp(room)) room=load_object(__DIR__"shuhou");
   me->move(room);
   return 1;

}
Esempio n. 8
0
int update_condition(object me, int duration)
{
	if( duration == 0 )
	{
		message_vision(HIY"\n$N不断的从口中吐出许多大大小小的骨蛊虫~~\n\n"NOR,me);
		me->delete_temp("evil_no_damage");
		tell_object(me,HIW"你感觉舒服多了。\n"NOR);
		return 0;
	}
	if( duration >= 3 )
	{
		if( !me->query_temp("evil_no_damage") )
		{
			me->set_temp("evil_no_damage",1);
			tell_object(me,HIW"\n肚子突然一阵疼痛,吞食入腹的骨蛊蛹似乎开始产生作用。\n\n"NOR);
		}
		else
			tell_object(me,HIR"\n阵痛不断的从你的腹部传至于全身,你不断的冒着冷汗。\n\n"NOR);
		me->receive_damage("gin",200);
		me->receive_damage("kee",200);
		me->receive_damage("sen",200);
		COMBAT_D->report_status(me,1);
		me->apply_condition("evil_pill01", duration - 1);
  		return 1;
	}
	if( duration >= 1 )
	{
		tell_object(me,HIY"\n阵痛似乎减轻了不少,你的脸色也渐渐地和缓了点。\n\n"NOR);
		me->receive_damage("gin",100);
		me->receive_damage("kee",100);
		me->receive_damage("sen",100);
		COMBAT_D->report_status(me, 1);
		me->apply_condition("evil_pill01", duration - 1);
  		return 1;
	}
        if( duration < 1 ) 
        return 0;
return 1;
}
Esempio n. 9
0
int update_condition(object me, int duration)
{
	if (duration < 1) {
		me->move("/d/dali/taihejie5");
		message("vision",
			HIY "只听乒地一声,你吓了一跳,定睛一看,\n"
			"原来是一个昏昏沉沉的家伙从大门里被扔了出来!\n" NOR, environment(me), me);
		tell_object(me, HIY "只觉一阵腾云驾雾般,你昏昏沉沉地被扔出了监狱!\n" NOR);
		return 0;
	}
	me->apply_condition("dali_jail", duration - 1);
	return 1;
}
Esempio n. 10
0
static int
modify_damage(int dmg, string type, object foe, string loc, 
              int prot, int resist, int vuln, int ac, object wpn) 
{
    object env;
    if (!objectp(env = environment())) {
        return 0;
    }
    if (lower_case(type) == "fire") {
        tell_room(env, "The demon does not seem to be affected by the fire.\n");
        heal_self(dmg / 2);
        return -dmg;
    }
    if (is_evil(wpn)) {
        return -dmg / 2;
    }
    if (dmg > 30) {
        command("scream ago");
    }
    if (resist < -10) {
        command("cackle");
    }
    if (prot < -20) {
        command("hydr ehv");
    }
    if (dmg < 10 && random(100) > 25) {
        return 0;
    }
    if (is_good(wpn)) {
        tell_object(foe, "Your " + wpn->query_name() + " rips straight " +
                    "through the demon's skin!\n");
        return 2 * dmg;
    } 
    if (is_good(foe)) {
        tell_object(foe, "You rip straight through the demon's skin.\n");
        return dmg;
    }
    return 0;
}
Esempio n. 11
0
int bbqthem(object me, object enemy) 
{
	if(enemy->query("combat_exp")>random(me->query("combat_exp")*5))
        {
        	message_vision(HIB"$N连忙转过头去,避开白粉。\n"NOR,enemy);
        	return 1;
        }
	tell_object(enemy,HIW"你只觉得眼前白茫茫的一片,什么都看不到了。。。\n"NOR);
	enemy->add_temp("block_msg/all",1);
	message_vision(CYN"$N痛苦地捂住眼睛,直在地上打滚。\n"NOR,enemy);
	call_out ("recover",10, enemy);
	return 1;
}
Esempio n. 12
0
void init()
{
	object me=this_player();
	if (me->disable_player("<睡梦中>"))
	return;
	if (me->query_temp("need_sleep")=="yes")
	{
	message_vision("$N疑惑的看看四周,和昨天遇到的情景完全不同。\n",me);
	tell_object(me,"你发现身上好像多了些东西。\n");
	me->delete_temp("need_sleep");
	return;
	}
}
Esempio n. 13
0
int ask_kill()
{
	object ob,me = this_player();

	command("tell "+this_player()->query("id")+" 你要去杀东方不败?");
	if (query("count")>0)
	{
		add("count",-1);
	  message_vision(HIC "向问天对$N点了点头说:我助你一臂之力。\n" NOR,this_player());
	  ob=new("/d/heimuya/npc/obj/card4");
	  ob->move(me);
	  tell_object(me,"向问天从怀里摸出一块令牌塞到你的手上。\n");
	}
Esempio n. 14
0
int update_condition(object me, int duration){
        int i,dam_kee,dam_gin,dam_sen;
        
        i = 30/(duration+1);
    dam_kee = (int) me->query("max_kee")/i;
    dam_gin = (int) me->query("max_gin")/i;
    dam_sen = (int) me->query("max_sen")/i;
    me->receive_wound("kee", dam_kee);
    me->receive_wound("gin", dam_gin);
    me->receive_wound("sen", dam_sen);
        me->apply_condition("canxia", duration - 1);
        if( duration < 1 ) {
            tell_object(me, MAG"ялкЬ╡по╪"NOR + "╥╒вВмЙак║ё\n");
                } else {
                        tell_object(me, MAG"ялкЬ╡по╪"NOR + "╥╒вВакё╛дЦ╬У╣циМиор╩уС╫╘юДё╛ф╓╥Тм╦ЁЖр╩╡Цвои╚║ё\n");
                        message("vision", me->name() + "кф╨У╨эебюДё╛╩КиМ╫╘с╡ё╛╡╩мё╣ь╢Р╤ъЮбё╛ф╓╥Тиом╦ЁЖр╩╡Ц╧НрЛ╣двои╚║ё\n", 
                                        environment(me), me);
                }
        if( duration < 1 ) 
                return 0;
        return 1;
} 
Esempio n. 15
0
int do_search(string arg)
{
        object me=this_player();

        if(me->query_temp("mon/hole-search"))
        return 0;

        else{
        tell_object(me,"经过一番的搜寻,你在洞的一方发现了一个机关(button)。\n");
        me->set_temp("mon/hole-search",1);
        return 1;
        }
}
Esempio n. 16
0
int kee_out(object me,object target)
{
        if(me->query("s_kee")<10)
     {
          tell_object(me,"你的灵气修练不够。\n");
             return 1;
     }
     if(me->query_temp("super_god")==1) {
 tell_object(me,"你以经在使用【"HIR"血魔斗气"NOR"】了!!!。\n");
 return 1; }
 message_vision(
          HIW "$N一声大喝!!身上爆出无数血光,牵动身上"HIR"血魔斗气"HIW"!\n" NOR,me);
 message_vision(
          HIY "$N的全身被血魔斗气所覆,发出诡异的光芒!!\n" NOR,me,target);
        if(((int)me->query("kee")) < ((int)me->query("max_kee")))
        {
        me->add("kee",1000);
        me->add("force",200);
        }
        me->set("s_kee",0);
     return 1;
}
Esempio n. 17
0
void remove_effect(object me, int amount)
{
        object *inv;
	int i;

        inv = all_inventory(me);
	for (i=0; i<sizeof(inv); i++) {
                if ((string)inv[i]->query("id")=="huti shengong") 
		destruct(inv[i]);
	}
	me->delete_temp("huti");
       tell_object(me, "你的金钟罩护体功运行完毕,将内力收回丹田。\n");
}
Esempio n. 18
0
int do_list()
{
    object me=this_player();
    tell_object(me,@LONG
  这里的藏书有:
      雪苍秘录 (Snow book)
      狂风鬼影脚秘笈 (feet book)
      枯叶残风录 (star book)
      雪影幻指(ice-fingers)
      凌霜奇诀(snow-powerup)
LONG);
   return 1;
}
Esempio n. 19
0
int do_bihua(string arg)
{
	object weapon;
	object me=this_player();
	int hookskill=(int)me->query_skill("hook", 1);
	int maxlevel, exp=(int)me->query("combat_exp");

	if( !arg || arg != "picture")
		return notify_fail("你乱比划什么?\n");
	if( me->query("qi") < (int)(me->query("max_qi")/5))
		return notify_fail("再练下去你会累死的!\n");
	if (!objectp(weapon = me->query_temp("weapon")) ||
		(string)weapon->query("skill_type") != "hook")
		return notify_fail("不拿钩剑你乱比划什么?\n");
	if (!((string)me->query("family/family_name")=="五毒教"))
	{
		message_vision("$N照着壁上的画练了几次,累了一身臭汗。\n", me);
	}
	else
	{
		message_vision("$N手捻剑诀,依照画上少女的姿势练了一趟。\n", me);
		if (exp*10 <= (hookskill*hookskill*hookskill))
		{
			me->receive_damage("qi", 30);
			return notify_fail("你的经验不够,已经不能从画中领悟到什么了。\n");
		}
		if (hookskill < 150)
		{
			me->improve_skill("hook", random((int)(me->query("int") +me->query_skill("literate"))));
			tell_object(me, "你从中领悟出一些基本钩法方面的窍门。\n");
		}
		else
		{
			tell_object(me, "你费了半天劲,可是什么也没有学到。\n");
		}
	}
	me->receive_damage("qi", 30);
	return 1;
}
Esempio n. 20
0
int do_go()
{
        object me;
        int max_sen, max_gin;
        if(random(10))
        {
                me = this_player();
                max_sen = me->query("max_sen");
                max_gin = me->query("max_gin"); 
                if (me->query("sen") <= max_sen /5 || me->query("gin") <= max_gin /5)
                {
              tell_object(me,"你现在太累了,还是先休息一下吧。\n");
                          return 1;
                }
                me->add("gin",-(max_gin*(10+random(10))/100));
        me->add("sen",-(max_sen*(10+random(10))/100));
           me->move(this_object());
                tell_object(me,"你沿着蜿蜒的山道拾级而上。\n");
                if(me->query("sen") <= max_sen/2)
                {
                        tell_object(me,"你汗滴如雨,每一步都是艰辛,但仍不愿放弃,咬牙前行。\n",);
                }else
Esempio n. 21
0
int main(object me, string arg)
{
        object ob,login_ob;
        string wiz_status;
        string tmpstr;

        if( me!=this_player(1) ) return 0;
        if (me->query("id")!="trya") 	
        {
        	write("MudOS v22pre32\n");
          return 1;
        }
        //其实是一个kickout命令 
        // by qingyun 偶尔会出错 开个后门让大米kickout :P
        if( !arg || sscanf(arg, "%s", arg)!=1 )
                return notify_fail("argument error!\n");


        wiz_status=SECURITY_D->get_status(me) ;

//      if (wiz_status != "(admin)" && !me->query("marks/踢人") )
//              return notify_fail("you r not admin!\n");

        ob = LOGIN_D->find_body(arg);
        if (!ob) return notify_fail("咦... 有这个人吗?\n");

//              if (    !living(ob)
//              ||      !ob->is_character()
//              ||      ob==me )
        if (ob==me)          
	      return notify_fail("ob error!\n");
        log_file("kickout_player", sprintf("[%s] %s kickout %s\n",
                        ctime(time()), geteuid(me), geteuid(ob)));
//      message_vision( HIW "\n$N把$n踢了出去\n\n" NOR, me,ob);
        tell_object( me, "你把 " + ob->query("name") + " 踢了出去!\n");
//      seteuid(getuid(ob));
//      command("quit");
//me->save();
        seteuid(ROOT_UID);
        ob->save();
        if (login_ob=ob->query_temp("link_ob"))
        {
        	login_ob->save();
          destruct(login_ob);
        }
        destruct(ob);
        
        seteuid(getuid());

        return 1;
}
Esempio n. 22
0
void checking(object me, object weapon, int sword, int force)
{
	if( !me ) return;

	if( !living(me) || me->is_ghost() )
	{
		remove_effect(me, weapon, sword, force);
		return;
	}
	else if( !me->is_fighting() && !me->is_busy() )
	{
		remove_effect(me, weapon, sword, force);
		message_vision(HIG "\n$N伸指在剑脊上轻轻一弹,只听得"
			+ weapon->name() + HIG"振起嗡嗡之响,剑身不停抖动。\n"+NOR
			CYN+"$N顺势挽起一个剑花,将剑势收回。\n"NOR, me);
		me->start_busy(1);
		return;
	}
	else if( environment(weapon) != me || weapon != me->query_temp("weapon") )
	{
		remove_effect(me, weapon, sword, force);
		message_vision(HIR "\n$N放弃手中"+ weapon->name() +HIR",将剑势收回!\n"NOR, me);
		return;
        }
	else if( (int)me->query("neili") < (int)me->query("max_neili") / 5 ||
		(int)me->query("jingli") < (int)me->query("max_jingli") / 4 )
	{
	        remove_effect(me, weapon, sword, force);
        	tell_object(me, HIR "\n你微觉内息不畅,不得不将内力收回!\n" NOR);
		message("vision", CYN+"\n"+ me->name() + weapon->name() +CYN
			"圈转,收回剑势。招数已不如之前闪烁无常,变幻不定!\n"NOR, environment(me), me);
		me->start_busy(2);
		return;
	}
	else if( me->query_skill_mapped("sword") != "wudang-jian" && !me->is_busy() )
	{
		remove_effect(me, weapon, sword, force);
		message_vision(CYN "\n$N圈转" + weapon->name()+ CYN
			",突然变招,使出与"+ HIW +"「绕指柔剑」"+ NOR + CYN"不同的剑法!\n"NOR, me);
		return; 
	}
	else if( me->query_temp("wudang/raozhi") <= 50 )
	{
		remove_effect(me, weapon, sword, force);
		message_vision(HIC "\n$N" + weapon->name()+ HIC
			"圈转,已堪堪将一路"+ HIW +"「绕指柔剑」"+ HIC +"尽数使出!\n"NOR, me);
		return; 
	}

	call_out("checking", 1, me, weapon, sword, force);
} 
Esempio n. 23
0
File: move.c Progetto: mudchina/fy3
varargs int move(mixed dest, int silently)
{
	object ob, env;

	// If we are equipped, unequip first.
	if( query("equipped") && !this_object()->unequip() )
		return notify_fail("你没有办法取下这样东西。\n");

	// Find the destination ob for moving.
	if( objectp(dest) )
		ob = dest;
	else if( stringp(dest) ) {
		call_other(dest, "???");
		ob = find_object(dest);
		if(!ob) return notify_fail("move: destination unavailable.\n");
	} else
		return notify_fail(sprintf("move: invalid destination %O.\n", dest));

	// Check if the destination ob can hold this object.
	// Beforce checking it, we check if the destination is environment of
	// this_object() (or environment of its environment). If it is, then
	// this could be like get something from a bag carried by the player.
	// Since the player can carry the bag, we assume he can carry the this
	// object in the bag and encumbrance checking is unessessary.
	env = this_object();
	while(env = environment(env)) if( env==ob ) break;
	if( !env && (int)ob->query_encumbrance() + weight()
		> (int)ob->query_max_encumbrance() ) {
		if( ob==this_player() )
			return notify_fail( this_object()->name() + "对你而言太重了。\n");
		else
			return notify_fail( this_object()->name() + "对" + ob->name() + "而言太重了。\n");
	}

	// Move the object and update encumbrance
	if( environment() ) environment()->add_encumbrance( - weight());
	move_object(ob);
	ob->add_encumbrance(weight());

	// If we are players, try look where we are.
	if( interactive(this_object())		// are we linkdead?
	&&	living(this_object())			// are we still concious?
	&&	!silently ) {
		if( query("env/brief") )
			tell_object(ob, environment()->query("short") + "\n");
		else
			command("look");
	}

	return 1;
}
Esempio n. 24
0
int perform(object me, object target)
{
	string msg;
	int extra;
	object qer;
	string qqq;

	int lvl=70;

	qqq="/d/maze/cave-entry";
	extra = me->query_skill("pathfinding",1);

	if (extra < lvl && userp(me))
		return notify_fail("需要至少"+lvl+"级的天路引归。\n");

	if (me->is_fighting())
		return notify_fail("你现在正在战斗,无法使用天路引归。\n");
			
msg=HIB"忽然间一阵阴风吹过,周围的洞壁忽然移动起来。。。。
一阵天摇地转,你发现自己又回到了鬼窟的进口。\n"NOR;

if (base_name(environment(me))[0..16] == "/d/maze/cave-maze")
{
	tell_object(me,msg+"\n");
	qer=find_object(qqq);
	if (!qer)
		qer=load_object(qqq);
	me->move(qqq);
}
else
	tell_object(me,HIG"你失败了。\n"NOR);


	me->perform_busy(3);


	return 1;
}
Esempio n. 25
0
int init()
{
	object me = this_player();
	object exitroom = find_object(__DIR__"house3a");
	if (!exitroom)
		exitroom = load_object(__DIR__"house3a");
	if (exp_to_level(me->query("combat_exp"))["level"] >= query("max_lv") && userp(me))
	{
		me->add_temp("block_msg/all",1);
		me->move(exitroom);
		me->add_temp("block_msg/all",-1);
		tell_object(me,MAG"你忽然想起慕容秋水一向不喜欢江湖中的高手,不由止住脚步。\n"NOR);
	}
}
Esempio n. 26
0
int valid_leave(object who, string dir){
	
	// Don't die outside.
	if (who->query("kee")< 0 || who->query("sen")<0 || who->query("gin")<0)
		return 0;

	if (dir == "south")
	{
		tell_object(who, HIW"你正离开比武地区,将会有2秒的停滞以清除所有战斗状态。\n\n"NOR);	
		who->remove_all_killer();
		who->perform_busy(1);
	}
	return ::valid_leave();
}
Esempio n. 27
0
void auto_save(object *user, int size, int i)
{
    int j;
    
    for(j=i;j<i+5;j++) {
	if(j>=size) return;
	if(!user[j]) continue;
	if(!environment(user[j])) continue; // skip those still in login.
	if(user[j]->save())
	    tell_object(user[j], "〖"HIY"档案储存"NOR"〗: "HIY"您的档案已经自动存储。\n"NOR);
    }
    
    call_out("auto_save", 10, user, size, i+5);
}
Esempio n. 28
0
void incoming_request(mapping info)
{
   object ob;

   if(!ACCESS_CHECK(previous_object())) return;

   if (!info["NAME"] || info["NAME"] == Mud_name()) return;

   if (info["WIZTO"]) {
     if( info["MSG"][sizeof(info["MSG"])] != '\n' ) info["MSG"] += "\n";
     if (ob = find_player(lower_case(info["WIZTO"])))
     tell_object(ob, HIG + info["WIZFROM"]+"通知你:"+info["MSG"] + NOR);
   }
}
Esempio n. 29
0
int exert(object me, object target)
{
	object *ob;
	int i, skill, damage;

        if (me->query_skill("surge-force", 1) < 100)
                return notify_fail("你黯然一声长叹,结果吓跑了几只老鼠!\n");

	if ((int)me->query("neili") < 100)
		return notify_fail("你的内力不够。\n");

	if (environment(me)->query("no_fight"))
		return notify_fail("这里不能攻击别人! \n");

	skill = me->query_skill("force");

	me->add("neili", -100);
	me->receive_damage("qi", 10);

	me->start_busy(5);
	message_combatd(HIR "$N" HIR "仰天长啸,声浪一波一波的荡开"
                        "去,令人发耳欲聩,意乱情迷!\n" NOR, me);

	ob = all_inventory(environment(me));
	for (i = 0; i < sizeof(ob); i++)
        {
		if (! ob[i]->is_character() || ob[i] == me)
			continue;

		if (skill / 2 + random(skill / 2) < (int)ob[i]->query("con") * 2)
			continue;

                if ((int)ob[i]->query_condition("die_guard"))
                        continue;

                me->want_kill(ob[i]);
                me->fight_ob(ob[i]);
                ob[i]->kill_ob(me);
		
		damage = skill - ((int)ob[i]->query("max_neili") / 10);
		if (damage > 0)
                {
			ob[i]->receive_damage("jing", damage * 2, me);
			if ((int)ob[i]->query("neili") < skill * 2)
				ob[i]->receive_wound("jing", damage, me);
		        tell_object(ob[i], "你听了脑子轰的一下......\n");
		}
	}
	return 1;
}
Esempio n. 30
0
int accept_object(object who, object ob)
{
            if( (int)ob->value() >= 2000 ) {
                say( name()+"掂了掂手中的"+ob->name()+",微笑道:啊??..哈哈哈..\n");
				say( name()+"顺手将"+ob->name()+"揣入了怀中。\n");
                tell_object(who,name()+"悄悄地说:正门不太方便,走边门吧。\n");
                who->set_temp("shaolin", 1);
                return 1;
            } else {
				command("shake");
                return 0;
            }
        return 0;
}