Esempio n. 1
0
int main(string dest) {
   object ob,item;
   string buf;
   int age,x,ac,width;

   ob = this_player();

   if( dest && this_player()->query_level() >= WIZLEVEL ) {
      ob = find_player(dest);
      if( !ob ) ob = find_living( dest );
	  if( !ob ) {
         ob = single_present( dest, environment(this_player()) );
		 if( ob && !ob->query_is_living() )
            ob = 0;
	  }
      if (!ob) {
         msg(capitalize(dest)+" was not found.");
         return 1;
      }
   }

   age = ob->query_age()-ob->query_last_login();
   if( age ) age += time();
   width = this_player()->query_term_width();

   buf = "~CSC2"+tab("-",width-3)+"\n";
   buf += pad("~CSC3"+ob->query_pretitle()+"~CSC4 "+capitalize(""+ob->query_name())+" ~CSC3"+ob->query_title(),width+12,2)+"\n";
   buf += "~CSC2"+tab("-",width-3)+"\n";
   buf += "~CSC4Level: ~CSC3"+query_personal_title(ob);
   if (this_player()->query_level() >= WIZLEVEL)
     buf += " ("+(string)ob->query_level()+")";

   buf +=  "\n~CSC4Str: " + make_stat(ob, "strength");
   buf +=  "~CSC4Dex: " + make_stat(ob, "dexterity");
   buf +=  "~CSC4Con: " + make_stat(ob, "constitution");
   buf +=  "~CSC4Spd: " + make_stat(ob, "speed") + "\n";

   buf +=  "~CSC4Wil: " + make_stat(ob, "will");
   buf +=  "~CSC4Int: " + make_stat(ob, "intelligence");
   buf +=  "~CSC4Emp: " + make_stat(ob, "empathy");
   buf +=  "~CSC4Cha: " + make_stat(ob, "charm") + "\n";

   buf += "~CSC4Alignment: ~CSC3"+ob->query_alignment_string();
   if (this_player()->query_level() >= WIZLEVEL)
     buf += "~CSC2 (lawful: "+ob->query_lawful_alignment()+", good: "+ob->query_good_alignment()+")\n";
   else
     buf += "\n";

   if( age != 0 )
      buf += "~CSC4Age:    ~CSC3"+int_to_time(age)+"\n";
   buf += pad("~CSC4Sex:    ~CSC3"+gender_string(ob->query_gender()), 32, 0);
   buf += pad(" ~CSC4Race: ~CSC3"+capitalize(ob->query_race()), 31, 0);
   buf += " ~CSC4Deaths: ~CSC3"+ob->query_deaths()+"\n";
   buf += "~CSC4Weight: ~CSC3"+ob->query_us_weight()+" lbs";
   if (this_player()->query_level() >= WIZLEVEL)
     buf += "~CSC2 ("+ob->query_weight()+" grams)\n";
   else
     buf += "~CSC2 ("+(ob->query_weight()/1000)+" kg)\n";

   buf += "~CSC4Carried:  ~CSC3" + carry_string(ob) + "\n";

   buf += "/bin/hp"->hp_string(ob)+"\n";

   buf += "~CSC2Food:   " + meter( ob, "food" ) + "\n";
   buf += "~CSC2Water:  " + meter( ob, "drink" ) + "\n";

   buf += "~CSC4Defense: ~CSC3" + ac_string(ob) + "\n";
   buf += pad("~CSC4Form:    ~CSC3" + capitalize(ob->query_form()),32,0);

   if (ob->query_skill("other.endurance"))
     buf += pad(" ~CSC4Soak: ~CSC3" + (ob->query_soak()?"on":"off"),32,0);
   buf += "~CSC4Wimpy: ~CSC3" + (ob->query_wimpy()?ob->query_wimpy()+"%":"off") + "\n";

   if( find_objectref(ob->query_env_var("home")) ) {
       object home_room = find_objectref(ob->query_env_var("home"));
       object home_bldg = environment(home_room);
       object home_zone;
	   buf += "~CSC4Home:    ~CSC3"+home_room->query_short();
       if( home_bldg ) {
          home_zone = environment(home_bldg);
		  string owner;
          if( home_bldg->query_owner() )
            owner = capitalize(home_bldg->query_owner())+"'s";
          else
            owner = "An unowned";
          buf += ", "+owner+" "+home_bldg->query_name()+", "+home_zone->query_short();
       }
       buf += "\n";
   }

   // stance
   buf += "~CSC3"+pronoun_string(ob);
   switch (ob->query_stance()) {
     case ST_STANDING: buf += "standing up."; break;
     case ST_SITTING: buf += "sitting down."; break;
     case ST_LYING: buf += "lying down."; break;
     case ST_CROUCHING: buf += "crouching."; break;
     case ST_JUMPING: buf += "jumping."; break;
     case ST_FALLING: buf += "falling."; break;
	 case ST_FLYING: buf += "flying."; break;
     case ST_UNBALANCED: buf += "unbalanced."; break;
     default: buf += "tilted at some obnoxiously uncomfortable angle."; break;
   }

   // party
   if( ob->query_env_var("party") ) {
     string party = ob->query_env_var("party");
     string pupil = ob->query_env_var("mentoring");
     string leader = PARTY_DAEMON->query_party_leader(party);
     buf += "\n~CSC3" + pronoun_string(ob) +
            (leader == ob->query_name() ? "the leader" : "a member") +
            " of the party ~CSC2" + capitalize(party) + "~CSC3";
     if( pupil )
       buf += ", and are mentoring ~CSC2" + capitalize(pupil) + "~CSC3.";
     else if( pupil = PARTY_DAEMON->query_mentor(ob->query_name()) ) {
       buf += ", " + (ob==this_player()?"and":"is") +
			  " are being mentored by ~CSC2" + capitalize(pupil) + "~CSC3.";
	 } else
       buf += ".";
   }

   buf += "\n~CSC2"+tab("-",width-3);

   msg(buf+"~CDEF");
   return 1;
}
Esempio n. 2
0
File: sphp.c Progetto: aricxu/xkx100
int main(object me, string arg)
{
	object ob;
	mapping my;
	int flag = 0;
 
	seteuid(getuid(me));
 
	if(!arg || arg == me->query("id"))
		ob = me;
	else
		{
			ob = present(arg, environment(me));
			if (!ob) ob = find_player(arg);
			if (!ob) ob = find_living(arg);
			if (!ob)
			{
				ob = new(USER_OB);
				seteuid(arg);
				export_uid(ob);
				flag = 1;
				if (!ob->restore())
					return notify_fail("没有这个玩家。\n");
			}
		}

	if (!ob->is_character())
		return notify_fail("那不是活物。\n");

	my = ob->query_entire_dbase();
    printf(HIC"≡"HIY"──────────────────────────────"HIC"≡\n"NOR);
    printf(HIC"【 精 气 】 %s%4d/ %4d %s(%3d%)" HIC "   【 精 力 】 %s%4d / %4d (+%d)\n" NOR,
		status_color(my["jing"], my["eff_jing"]), my["jing"], my["eff_jing"],
		status_color(my["eff_jing"], my["max_jing"]),	my["eff_jing"] * 100 / my["max_jing"],
		status_color(my["jingli"], my["max_jingli"]),	my["jingli"], my["max_jingli"],
		my["jiajing"] );
    printf(HIC"【 气 血 】 %s%4d/ %4d %s(%3d%)" HIC "   【 内 力 】 %s%4d / %4d (+%d)\n" NOR,
		status_color(my["qi"], my["eff_qi"]), my["qi"], my["eff_qi"],
		status_color(my["eff_qi"], my["max_qi"]), my["eff_qi"] * 100 / my["max_qi"],
		status_color(my["neili"], my["max_neili"]), my["neili"], my["max_neili"],
		my["jiali"] );

	if (ob->query("shen") >=0)
		printf(HIR"【 正 气 】%8d" HIC "              【 体 力 】 %s%4d / %4d \n"NOR,
		ob->query("shen"), 
		status_color(my["tili"], my["max_tili"]), my["tili"], my["max_tili"]);
	else
		printf(HIG"【 戾 气 】%8d" HIC "              【 体 力 】 %s%4d / %4d \n"NOR,
		ob->query("shen"), 
		status_color(my["tili"], my["max_tili"]), my["tili"], my["max_tili"]);

	printf(HIW"【 食 物 】 %s%4d/ %4d      " HIW "     【 潜 能 】  %s%d\n" NOR,
		status_color(my["food"], ob->max_food_capacity()),
		my["food"], ob->max_food_capacity(), HIY,
		(int)ob->query("potential") - (int)ob->query("learned_points"));
	printf(HIW"【 饮 水 】 %s%4d/ %4d      " HIW "     【 经 验 】  %s%d\n" NOR,
		status_color(my["water"], ob->max_water_capacity()),
		my["water"], ob->max_water_capacity(), HIM,
		my["combat_exp"] );
	printf(HIC"≡"HIY"──────────────────────────────"HIC"≡\n"NOR);
	
	if (flag) {
		printf("该玩家目前不在线。\n");
		destruct(ob);
	}
	return 1;
}
Esempio n. 3
0
int main(object me, string arg)
{
   mapping list, tlist;
   mixed *klist, *tlist2;
   object ob, ob1;
   string text,*tmp, id, spec;
   int loop;

   seteuid(geteuid(me));

   if (arg) {
     sscanf (arg, "%s %s", spec, arg);
     if (arg == "-t" || arg == "-d") {
       spec = arg;
       arg = 0;
     }
     if (spec && spec != "-d" && spec != "-t") {
       arg = spec + " " + arg;
       spec = 0;
     }
   }
   if(!arg || arg == "")  ob=me;
   else if (sscanf (arg, "%s in %s", arg, id) == 2) {
     ob1=present(id, environment(me));
     if (!ob1) ob1 = present(id, me);
     if (!ob1) return
       notify_fail ("本地无此生物: "+id+"\n");
     if (!ob=present(arg, ob1)) return
       notify_fail ("该生物身上无此物件: "+arg+"\n");
   }
   else if (arg == "here") {
     ob = environment(me);
   }
   else {
     arg = lower_case(arg);

     ob = present(arg, environment(me));
     if (!ob) ob = find_player(arg);
     if (!ob) ob = find_living(arg);
     if (!ob) ob = present(arg, me);
     if(!ob) return notify_fail("Data: 无法找到此物件: "+arg+"。\n");
   }
 
   list = (mapping)ob->query_entire_dbase();
   tlist = (mapping)ob->query_entire_temp_dbase();
   if( (!list || !mapp(list)) && (!tlist || !mapp(tlist)))
   	    return notify_fail("Data: 此物件并没有任何的资料。\n");
 
   if (sizeof(list))
   {
   	klist = keys(list);
   	klist = sort_array(klist, "sort_keys", this_object());
   }

   if (sizeof(tlist))
   {
    	tlist2 = keys(tlist);
   	tlist2 = sort_array(tlist2, "sort_keys", this_object());
   }
 
   // if(!member_group(geteuid(this_player()), "admin"))
//	klist = filter_array(klist, "filter_props", this_object(), ob);

   if(!klist || !sizeof(klist))
     return notify_fail("Data: 此物件并没有储存任何资料。\n");
 
   if (!spec || spec == "-d") {
     text = "Object : " + base_name(ob) + ".c\n";
 
     for(loop=0; loop<sizeof(klist); loop++)  {
 
       if(strlen(klist[loop]) > 7)  text += klist[loop] + "\t: ";
       else text += klist[loop] + "\t\t: ";
 
        text +=sprintf("%O \n",list[ klist[loop] ]);
     }
     text += "\n总共有 " + sizeof(klist) + " 个储存的资料。\n\n";
   }
   else text = "";
 
   if (!spec || spec == "-t") {

     text += "TEMP DATA :\n\n";
 
     for(loop=0; loop<sizeof(tlist2); loop++)  {
       if(strlen(tlist2[loop]) > 7)  text += tlist2[loop] + "\t: ";
       else text += tlist2[loop] + "\t\t: ";
         text +=sprintf("%O \n",tlist[ tlist2[loop] ]); 
     }
 
     text += "\n总共有 " + sizeof(tlist2) + " 个暂存的资料。\n\n";
   }
 
   me->start_more( text );
   // tmp = explode(text, "\n");
   // for(loop=0; loop<sizeof(tmp); loop++)   write(tmp[loop]+"\n");
   return 1;
}
Esempio n. 4
0
int main(object me, string arg)
{
	object obj, env;

	if(!arg) {
		string id = me->query_temp("accept");
		
		if(id)
			tell_object(me, GRN"你已接受(" + id + ")的公开邀请。\n"NOR);
		else
			tell_object(me, GRN"你未接受公开邀请。\n"NOR);
		return 1;
	}

	if(arg == "none") {		
		me->set_temp("accept", 0);
		return notify_ok("OK.\n");
	}

	if(me->is_ghost())
		return notify_fail("做了鬼了,就老实点吧!\n");

	if(me->is_fighting() || me->is_busy())
		return notify_fail("你很忙,不能接受公开邀请。\n");

	obj = find_player(arg);
	if(!obj) obj = find_living(arg);    
	if(!obj) obj = LOGIN_D->find_body(arg);

	if(!obj) return notify_fail("没有这个人。\n");

	if(wizardp(obj) && !wizardp(me)) return notify_fail("没有这个人。\n");

	if(obj->query_temp("invite") != "public")
		return notify_fail(obj->query("name") + "现在并没有公开邀请别人。\n");

	if( !wizardp(me) && userp(me) )
		if (env=environment(me))
			if(!env->query("outdoors"))
				return notify_fail("你还是到外面去接受"+obj->query("name")+"的邀请吧!\n");

	if( !wizardp(me) && userp(me) ){
		if( uptime()-me->query_temp("accept_time")<10)
			return notify_fail("请稍后再接受邀请吧。\n");

		me->set_temp("accept_time",uptime());
	}

	if (me->query_temp("accept") == obj->query("id"))
		return notify_fail("你已经接受"+obj->query("name")+"的公开邀请了。\n");

	if( !wizardp(me) && userp(me) ){
		if ((obj->query("id")=="zhenyuan_daxian")   && me->query("life/live_forever") )
			return notify_fail("你已经不堕轮回了,还是把机会留给新人吧。\n");

		if ((obj->query("id")=="zhenyuan_daxian") && me->query("combat_exp") <=100000 ) 
			return notify_fail("你的本事还不够,镇元大仙不打算请你。\n");
	}
	tell_object (me,GRN"你接受"GRN+obj->query("name")+NOR GRN"的公开邀请。\n"NOR);
	tell_object (obj, me->query("name")+GRN"现在接受你的公开邀请。\n"NOR);

	me->set_temp("accept",obj->query("id"));
	return 1;
}
Esempio n. 5
0
File: data.c Progetto: mudchina/fy4
int main(object me, string arg)
{
    mapping list, tlist;
    mixed *klist, *tlist2;
    object ob, ob1;
    string text,*tmp, id, spec;
    int loop; 
    //Security check??
    seteuid(geteuid(me));
    
    if (arg)
    {
        sscanf (arg, "%s %s", spec, arg);
        if (arg == "-t" || arg == "-d")
        {
            spec = arg;
            arg = 0;
        }
        if (spec && spec != "-d" && spec != "-t")
        {
            arg = spec + " " + arg;
            spec = 0;
        }
    }
    if(!arg || arg == "")  ob=me;
    else if (sscanf (arg, "%s in %s", arg, id) == 2)
    {
        ob1=present(id, environment(me));
        if (!ob1) ob1 = present(id, me);
        if (!ob1) return notify_fail ("Data:本地无此生物: "+id+"\n");
        if (!ob=present(arg, ob1))
            return notify_fail ("Data:该生物身上无此物件: "+arg+"\n");
    }
    else if (arg == "here") ob = environment(me);
    else
    {
        arg = lower_case(arg);
        
        ob = present(arg, environment(me));
        if (!ob) ob = find_player(arg);
        if (!ob) ob = find_living(arg);
        if (!ob) ob = present(arg, me);
        if(!ob) return notify_fail("Data:无法找到此物件: "+arg+"。\n");
    }
    
    list = (mapping)ob->query_entire_dbase();
    tlist = (mapping)ob->query_entire_temp_dbase();
    if( (!list || !mapp(list)) && (!tlist || !mapp(tlist)))
        return notify_fail("Data:此物件并没有任何的资料。\n");
    
    if (sizeof(list))
    {
        klist = keys(list);
        klist = sort_array(klist, "sort_keys", this_object());
    }
    
    if (sizeof(tlist))
    {
        tlist2 = keys(tlist);
        tlist2 = sort_array(tlist2, "sort_keys", this_object());
    }
    
    
    if(!klist || !sizeof(klist))
        return notify_fail("Data:此物件并没有储存任何资料。\n");
    
    if (!spec || spec == "-d")
    {
        text = HIW"物件:" + base_name(ob) + ".c"NOR"\n";
        
        for(loop=0; loop<sizeof(klist); loop++)
        {
            if(strlen(klist[loop]) > 7)  text += klist[loop] + "\t: ";
            else text += klist[loop] + "\t\t: ";
            
            text +=sprintf("%O \n",list[ klist[loop] ]);
        }
        text += "\n"HIW"总共有 " + sizeof(klist) + " 个储存的资料。"NOR"\n\n";
    }
    else text = "";
    
    if (!spec || spec == "-t")
    {
        text += HIW"暂存资料:"NOR"\n\n";
 
        for(loop=0; loop<sizeof(tlist2); loop++)
        {
            if(strlen(tlist2[loop]) > 7)  text += tlist2[loop] + "\t: ";
            else text += tlist2[loop] + "\t\t: ";
            text +=sprintf("%O \n",tlist[ tlist2[loop] ]); 
        }
        
        text += "\n"HIW"总共有 " + sizeof(tlist2) + " 个暂存的资料。"NOR"\n\n";
    }
    
    me->start_more("", text, 0);
    return 1;
}
Esempio n. 6
0
int main(object me, string arg)
{       object ob;
       object weapon;
       string line,skill_type;
        mapping my;
        int year, day, hour,anger,x;
       int attack_points, dodge_points, parry_points;
        int i;

        if(!arg)
                ob = me;
        else if (wizardp(me)) {
                ob = present(arg, environment(me));
                if (!ob) ob = find_player(arg);
                if (!ob) ob = find_living(arg);
        if (!ob) return notify_fail("你要察看谁的状态?\n");
                 if( !ob->is_character() || ob->is_corpse() )
                         return notify_fail("连" + ob->query("name") + "的状态都要查看?你真幽默。\n");
        } else
                return notify_fail("只有巫师能察看别人的状态。\n");
 
        my = ob->query_entire_dbase();
 //printf("─────────────────────────────────────\n");
        printf(HIC" 气血: %s%4d/ %4d %s(%3d%%)" +HIC 
                "         内力: %s%4d / %4d (%3d%%) (+%d)\n" NOR,
                status_color(my["kee"], my["eff_kee"]),my["kee"],my["eff_kee"],
                status_color(my["eff_kee"], my["max_kee"]),     
                my["eff_kee"] * 100 / my["max_kee"],
                status_color(my["force"], my["max_force"]),     
                my["force"], my["max_force"],
                my["maximum_force"] ?
                  my["max_force"] * 100 / my["maximum_force"] : 100,
                my["force_factor"] );

        printf(HIC" 精神: %s%4d/ %4d %s(%3d%%)"   +HIC 
                "         法力: %s%4d / %4d (%3d%%) (+%d)\n" NOR,
                status_color(my["sen"], my["eff_sen"]),my["sen"],my["eff_sen"],
                status_color(my["eff_sen"], my["max_sen"]),     
                my["eff_sen"] * 100 / my["max_sen"],
                status_color(my["mana"], my["max_mana"]), 
                my["mana"], my["max_mana"],
                my["maximum_mana"] ?
                  my["max_mana"] * 100 / my["maximum_mana"] : 100,
                my["mana_factor"] );
    
        printf(HIW" 食物: %s%4d/ %4d      " +HIW"          武学: %s%d\n" NOR,
                status_color(my["food"], ob->max_food_capacity()),
                my["food"], ob->max_food_capacity(),
                HIY,
                my["combat_exp"]);
        
        year = my["daoxing"] / 1000; 
        day = (my["daoxing"] - year * 1000) / 4;
        hour = (my["daoxing"] - year * 1000 - day * 4) * 3; 
    
        printf(HIW" 饮水: %s%4d/ %4d      "  +HIW"          道行: %s",
                status_color(my["water"], ob->max_water_capacity()),
                my["water"], ob->max_water_capacity(), HIM );
    
        if(year) printf("%s年", chinese_number(year));
        if(day) printf("%s天", chinese_number(day));
        if(hour) printf("%s时辰", chinese_number(hour));
        if(!year && !day && !hour)  printf("没有道行");
        printf("\n"NOR);

        printf(CYN" 潜能:  %s%6d         "  +CYN"          杀气:"+HIR" %s%4d\n"NOR,
              YEL,
                (int)ob->query("potential") - (int)ob->query("learned_points"),
                HIR,
              my["bellicosity"]);       

        if( objectp(weapon = ob->query_temp("weapon")) )
                skill_type = weapon->query("skill_type");
        else
                skill_type = "unarmed";

        attack_points = COMBAT_D->skill_power(ob, skill_type,SKILL_USAGE_ATTACK);
        parry_points = COMBAT_D->skill_power(ob, skill_type,SKILL_USAGE_DEFENSE);
        dodge_points = COMBAT_D->skill_power(ob, "dodge",SKILL_USAGE_DEFENSE);

       printf(CYN" 兵器:  "WHT"%4d           "  +CYN"          盔甲:"WHT" %4d\n"NOR,
                ob->query_temp("apply/damage"),ob->query_temp("apply/armor"));
 anger=ob->query("anger");
        printf(RED" 怒气:"NOR);

 if( !anger || anger==0 )
  printf(GRN"□□□□□□□□□□\n",NOR);
else {
 for( x=0;x<anger/10;x++)
 {
        printf(HIR+BLINK"■"NOR);
}
for( i=0;i<(100-anger)/10;i++)
{
        printf(GRN"□"NOR);
}}
 printf("\n");
// printf("──────────────────────────"HIC"梦幻西游"NOR"─────────\n");
        return 1;
}
Esempio n. 7
0
int main(object me, string arg)
{
    	object ob;
    	mapping my, exp_data;
 		int level, old_level, real_exp,pot_reward;
 		 		
    	seteuid(getuid(me));
 
    	if(!arg) ob = me;
    	else if (wizardp(me))
    	{
	        ob = present(arg, environment(me));
	        if (!ob) ob = find_player(arg);
	        if (!ob) ob = find_living(arg);
	        if (!ob) return notify_fail("��Ҫ�쿴˭��״̬��\n");
    	}
    	else 
    		return notify_fail("ֻ�й���Ա�ܲ쿴���˵�״̬��\n");
     
     	if (!living(ob))
     		return notify_fail("������ֻ���������\n");
     			
    	my = ob->query_entire_dbase();
/*    	    printf(HIC"��"HIY"��������������������������������������������������������"HIC"��\n"NOR);	
    	    printf(CYN"    			"+ my["name"] + "\n"NOR);	
    	    printf(HIC"��"HIY"��������������������������������������������������������"HIC"��\n"NOR);	*/
	    printf(" ��������%s%5d/ %5d %s(%3d%%)" NOR "    ��ʳ�%s%3d%%\n" NOR,
	           status_color(my["gin"], my["eff_gin"]),	my["gin"],	my["eff_gin"],
	           status_color(my["eff_gin"], my["max_gin"]),	my["eff_gin"] * 100 / my["max_gin"],
	           status_color(my["food"], ob->max_food_capacity()),
	           my["food"] * 100/ob->max_food_capacity()	
	        );
	    printf(" ����Ѫ��%s%5d/ %5d %s(%3d%%)" NOR "    ����ˮ��%s%3d%%\n" NOR,
	           status_color(my["kee"], my["eff_kee"]), my["kee"], my["eff_kee"],
	           status_color(my["eff_kee"], my["max_kee"]),     my["eff_kee"] * 100 / my["max_kee"],
	           status_color(my["water"], ob->max_water_capacity()),
	           my["water"] * 100/ob->max_water_capacity()
	        );

	    printf(" ������%s%5d/ %5d %s(%3d%%)" HIW "    �����ۡ� %d\n" NOR,
	           status_color(my["sen"], my["eff_sen"]), my["sen"], my["eff_sen"],
	           status_color(my["eff_sen"], my["max_sen"]),     my["eff_sen"] * 100 / my["max_sen"],
	           my["score"] 
	        );
	    printf(" ��������%s%5d/ %5d (%4d)" HIR "    ��ɱ���� %d\n" NOR,
	           status_color(my["atman"], my["max_atman"]),     my["atman"], my["max_atman"],
	           my["atman_factor"],
	           my["bellicosity"]
	        );
	    printf(" ��������%s%5d/ %5d (%4d)"  HIG "    ��DZ�ܡ� %d\n" NOR,
	           status_color(my["force"], my["max_force"]),     my["force"], my["max_force"],
	           my["force_factor"],
	           (my["potential"] - my["learned_points"])
	        );
	    if (userp(ob) && my["combat_exp"]>= 10000000) {

	    	real_exp = 10000000 + my["extra_exp"];
	    	exp_data = exp_to_level(real_exp);
	    	
			printf(" ��������%s%5d/ %5d (%4d)"HIM "    ���ȼ��� ��139+%d ��%d.%d����\n" NOR,
			           status_color(my["mana"], my["max_mana"]), my["mana"], my["max_mana"],
			            my["mana_factor"],
						exp_data["level"]-139,
			    		exp_data["sub"]/10,
			    		exp_data["sub"]%10,
			    	);    	
	    	    	
	    } else {	    
Esempio n. 8
0
int main(object me, string arg)
{
    	object ob;
    	mapping my, exp_data;
 	int level, old_level, pot_reward;
 	
    	seteuid(getuid(me));
 
    	if(!arg) ob = me;
    	else 
    	{
	        ob = present(arg, environment(me));
	        if (!ob) ob = find_player(arg);
	        if (!ob) ob = find_living(arg);
	        if (!ob) return notify_fail("─у╥к▓ь┐┤╦н╡─╫┤╠мг┐\n");
    	}
    	     
    	my = ob->query_entire_dbase();
/*    	    printf(HIC"б╘"HIY"йдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйд"HIC"б╘\n"NOR);	
    	    printf(CYN"    			"+ my["name"] + "\n"NOR);	
    	    printf(HIC"б╘"HIY"йдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйд"HIC"б╘\n"NOR);	*/
	    printf(" б╛╛л┴жб┐%s%5d/ %5d %s(%3d%%)" NOR "    б╛╩│╬яб┐%s%3d%%\n" NOR,
	           status_color(my["gin"], my["eff_gin"]),	my["gin"],	my["eff_gin"],
	           status_color(my["eff_gin"], my["max_gin"]),	my["eff_gin"] * 100 / my["max_gin"],
	           status_color(my["food"], ob->max_food_capacity()),
	           my["food"] * 100/ob->max_food_capacity()	
	        );
	    printf(" б╛╞°╤кб┐%s%5d/ %5d %s(%3d%%)" NOR "    б╛╥√╦об┐%s%3d%%\n" NOR,
	           status_color(my["kee"], my["eff_kee"]), my["kee"], my["eff_kee"],
	           status_color(my["eff_kee"], my["max_kee"]),     my["eff_kee"] * 100 / my["max_kee"],
	           status_color(my["water"], ob->max_water_capacity()),
	           my["water"] * 100/ob->max_water_capacity()
	        );
	    printf(" б╛╨─╔ёб┐%s%5d/ %5d %s(%3d%%)" HIW "    б╛╞└╝█б┐ %d\n" NOR,
	           status_color(my["sen"], my["eff_sen"]), my["sen"], my["eff_sen"],
	           status_color(my["eff_sen"], my["max_sen"]),     my["eff_sen"] * 100 / my["max_sen"],
	           my["score"]
	        );
	    printf(" б╛┴щ┴жб┐%s%5d/ %5d (%4d)" HIR "    б╛╔▒╞°б┐ %d\n" NOR,
	           status_color(my["atman"], my["max_atman"]),     my["atman"], my["max_atman"],
	           my["atman_factor"],
	           my["bellicosity"]
	        );
	    printf(" б╛─┌┴жб┐%s%5d/ %5d (%4d)"  HIG "    б╛╟▒─▄б┐ %d\n" NOR,
	           status_color(my["force"], my["max_force"]),     my["force"], my["max_force"],
	           my["force_factor"],
	           (my["potential"] - my["learned_points"])
	        );
	    exp_data = exp_to_level(my["combat_exp"]);    
	    
	    if (wizardp(me) && me->query("oldexp")) {	// ┤╦╧ю╘╩╨эWiz╙├╛╔╙╨╡─╛н╤щ╠х╧╡▓ь┐┤бг
	    	printf(" б╛╖и┴жб┐%s%5d/ %5d (%4d)"HIM "    б╛╛н╤щб┐%d\n" NOR,
	           status_color(my["mana"], my["max_mana"]), my["mana"], my["max_mana"],
	           my["mana_factor"],
	           my["combat_exp"]		    		
	        );
	    } else 
	    	    printf(" б╛╖и┴жб┐%s%5d/ %5d (%4d)"HIM "    б╛╡╚╝╢б┐ г╠%d ги%d.%dгегй\n" NOR,
		           status_color(my["mana"], my["max_mana"]), my["mana"], my["max_mana"],
		           my["mana_factor"],
				exp_data["level"],
		    		exp_data["sub"]/10,
		    		exp_data["sub"]%10,
		    	);
//	printf(HIC"б╘"HIY"йдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйдйд"HIC"б╘\n"NOR);
   	level = exp_data["level"];
	if (ob == this_player() && level > ob->query("achieved_level")) {
    		
    		old_level = ob->query("achieved_level");
    		me->set("level",level);
    		me->set("achieved_level",level);
    		
    		write(HIR"\n╣з╧▓гм─у╡─╛н╤щ╡╚╝╢╔╧╔¤╡╜"+chinese_number(me->query("level"))+"╝╢бг\n"NOR);
		
		// ├┐╡╚╝╢╜▒└°╥╗╢и╟▒─▄╓╡бг
		pot_reward = level_to_pot(level) - level_to_pot(old_level);
		me->add("potential",pot_reward);
		write(HIR"─у╡├╡╜┴╦"+pot_reward+"╡у╟▒─▄бг\n"NOR);
		
		write (WHT"╙╔╙┌─у╟┌╤з┐р┴╖гм─у╡─╛л╞°╔ё╓╡╘Ў╝╙┴╦бг\n\n"NOR);

		me->save();
		if (me->query("gender")==("┼о╨╘")) 
			message_vision(CYN"$N┐ь└╓╡╪╠°╞Ё╬ш└┤гб б╕ ╣■╣■╣■гм╔¤╝╢┴╦гбб╣\n"NOR,me);
		else 
			message_vision(CYN"$N╡├╥т╡╪╫ў│Ў╩д└√╡─╩╓╩╞ б╕ V б╣  ╦╡: б╕ ╣■╣■╣■гм╔¤╝╢┴╦гбб╣\n"NOR,me);
			
	}    	
    	return 1;
}
Esempio n. 9
0
int cmd_resurrect(string str)
{
    object ob, cor; 
    object *inv;
    int i, x, stat_charge;

    if (!spell()) {
	write("Only those strong in their faith may do this.");
	return 1;
    }
    if (!str || str=="")
    {
	write("Resurrect what?");
	return 1;
    }
    if (this_player()->query_mp() < 700) 
	return notify_fail("You do not have enough magical power to ressurect.\n");
    if (this_player()->query_ghost())
    {
	write("How about getting yourself a resurrect first?");
	return 1;
    }
    ob = find_living(str);
    if (!ob) 
    {
	write("Could not find anybody by that name.");
	return 1;
    }
    if (!ob->is_player()) {
	write("You cannot resurrect non-players.");
	return 1;
    }

    if (!ob->query_ghost())
    {
	write("You cannot resurrect the living.");
	return 1;
    }
    cor = present("corpse", environment(this_player()));
    if (!cor)
    {
	write("You must resurrect "+ob->query_cap_name()+" into a body.");
	return 1;
    }

    if (cor->query_old_race()=="lich")
	ob->move(environment( this_player() ));

    i = sizeof(unressable);
    while(i--)
    {
	if (cor->query_old_race() == unressable[i])
	{
	    write(capitalize(cor->query_old_race())+"s may not be ressurected.");
	    this_player()->set_mp(1);
	    return 1;
	}
    } 
    if (cor->query_old_race() != ob->query_race())
    {
	stat_charge = 1;
    } else {
	stat_charge = 0;
    }
    if(member_array(cor->query_old_race(), (string *)RACE_D->query_races()) == -1) {
	write("You failed to resurrect "+ob->query_cap_name()+".");
	this_player()->set_mp(1);
	return 1;
    }

    ob->move(environment( this_player() ));
    message("info", "%^YELLOW%^%^BOLD%^You have been resurrected from the dead!%^RESET%^", ob);
    write("%^YELLOW%^%^BOLD%^You resurrect "+ob->query_cap_name()+" from the dead!%^RESET%^");
    message("info", "%^YELLOW%^%^BOLD%^"+ this_player()->query_cap_name()+" resurrects "+ob->query_cap_name()+" from the dead!", environment(this_player()), ({ this_player(), ob }) );
Esempio n. 10
0
int main(object me, string arg)
{
        int goto_inventory = 0;
        object obj, ridee;
        string msg, ridemsg;

        if( !arg ) return notify_fail("你要去哪里?\n");

        if( me->over_encumbranced() )
                   return notify_fail("你负载太重了!\n");

        if( sscanf(arg, "-i %s", arg) ) goto_inventory = 1;

        if( !arg ) return notify_fail("你要去哪里?\n");

        obj = find_player(arg);
        if(!obj) obj = find_living(arg);
       
	if(!obj) obj = LOGIN_D->find_body(arg);
	/* added by mon. 2/23/97 */
	if(!obj) obj = find_object(arg);

	if(!obj || !me->visible(obj)) {
                arg = resolve_path(me->query("cwd"), arg);
                if( !sscanf(arg, "%*s.c") ) arg += ".c";
                if( !(obj = find_object(arg)) ) {
                        if( file_size(arg)>=0 )
                                return me->move(arg);
                        return notify_fail("没有这个玩家、生物、或地方。\n");
                }
        }

        if(!goto_inventory && environment(obj))
                obj = environment(obj);

        if( !obj ) return notify_fail("这个物件没有环境可以 goto。\n");

      if(!me->query("env/invisibility")) {
        if( stringp(msg = me->query("env/msg_mout")) ) {
           msg = replace_string(msg, "$BLK$", BLK);
           msg = replace_string(msg, "$RED$", RED);
           msg = replace_string(msg, "$GRN$", GRN);
           msg = replace_string(msg, "$YEL$", YEL);
           msg = replace_string(msg, "$BLU$", BLU);
           msg = replace_string(msg, "$MAG$", MAG);
           msg = replace_string(msg, "$CYN$", CYN);
           msg = replace_string(msg, "$WHT$", WHT);
           msg = replace_string(msg, "$HIR$", HIR);
           msg = replace_string(msg, "$HIG$", HIG);
           msg = replace_string(msg, "$HIY$", HIY);
           msg = replace_string(msg, "$HIB$", HIB);
           msg = replace_string(msg, "$HIM$", HIM);
           msg = replace_string(msg, "$HIC$", HIC);
           msg = replace_string(msg, "$HIW$", HIW);
           msg = replace_string(msg, "$NOR$", NOR);
           if (msg != "") message_vision(msg+NOR+"\n", me);
        }
        else
                message_vision("只见一阵烟雾过后,$N的身影已经不见了。\n", me);
      }

	if (ridee = me->ride())
        {
          ridemsg = ridee->query("ride/msg")+"着"+ridee->name();
	  ridee->move(obj);
	}  
	else
	  ridemsg = "";
        me->move(obj);

      if(!me->query("env/invisibility")) {
        if( stringp(msg = me->query("env/msg_min")) )
        {
           msg = replace_string(msg, "$BLK$", BLK);
           msg = replace_string(msg, "$RED$", RED);
           msg = replace_string(msg, "$GRN$", GRN);
           msg = replace_string(msg, "$YEL$", YEL);
           msg = replace_string(msg, "$BLU$", BLU);
           msg = replace_string(msg, "$MAG$", MAG);
           msg = replace_string(msg, "$CYN$", CYN);
           msg = replace_string(msg, "$WHT$", WHT);
           msg = replace_string(msg, "$HIR$", HIR);
           msg = replace_string(msg, "$HIG$", HIG);
           msg = replace_string(msg, "$HIY$", HIY);
           msg = replace_string(msg, "$HIB$", HIB);
           msg = replace_string(msg, "$HIM$", HIM);
           msg = replace_string(msg, "$HIC$", HIC);
           msg = replace_string(msg, "$HIW$", HIW);
           msg = replace_string(msg, "$NOR$", NOR);
           if (msg != "") message_vision(msg+NOR+"\n", me);
        }
        else
                message_vision("$N"+ridemsg+"突然出现在一阵烟雾之中。\n", me);
      }

        return 1;
}