コード例 #1
0
north() {
    call_other (this_player(), "move_player", "north#players/quantos/under/maze160");
    return 1;
}
コード例 #2
0
ファイル: _sacrifice.c プロジェクト: ehershey/pd
int cmd_sacrifice(string str)
{
 object ob, *all, mon;
 string *curr;
 int i, b, ammount;

 if (!str || str=="")
   {
    write("Sacrifice what?");
    return 1;
   }

 if(this_player()->query_current_attacker())
  {
   write("You cannot take the time in battle!");
   return 1;
  }
 if(this_player()->query_ghost())
  {
   write("You have no body to sacrifice with!");
   return 1;
  }

 ob = present(str, environment(this_player()));
 if (!ob)
  {
   write("You dont see that.");
   return 1;
  }

 if (!ob->query_corpse() && !ob->is_limb()) 
   {
    write("The gods reject your sacrifice.");
    return 1;
   }
 if (ob->is_limb())
   {
    write("You sacrifice "+definite_article(strip_color(ob->query_short()))+" to the gods.");
    this_player()->add_hp(2);
    ob->remove();
    return 1;

   }
 write("You sacrifice the corpse to the gods.");
 say(this_player()->query_cap_name()+" sacrifices the corpse to the gods.");
  ob->loot(this_player());

  /*
 all = all_inventory(ob);
 i = sizeof(all);
 
 while(i--)
 {
   if(all[i]->is_money_pile()) {
       mon = all[i];
       b = sizeof( curr = mon->query_currencies() );
       while(b--) {
           write("You find "+(ammount=mon->query_money(curr[b]))+" "+curr[b]+" "+
              (ammount>1?"coins":"coin")+" on the body.");
           this_player()->add_money(curr[b], ammount);
       }
       mon->remove();
       if(mon)
           destruct(mon);
   }
   else {
     if(all[i]->move(this_player()) == MOVE_NO_ROOM)
       write("You are too overburdened to take "+all[i]->query_short()+"%^RESET%^.");
     else if (sizeof(all[i]->query_short())) {
       write("You get "+all[i]->query_short()+" from the corpse.");
       if(this_player()->query_property("autobag"))
         this_player()->force_me("put "+all[i]->query_id()[0]+" in "+this_player()->query_property("autobag"));
     }
   }
 }
  */
 ob->remove();
 if(ob)
     destruct(ob);

 this_player()->add_hp(10);
 this_player()->add_sp(10);
 this_player()->add_mp(10);
 return 1;
}
コード例 #3
0
ファイル: chfn.c プロジェクト: arylwen/terebi
mixed cmd(string args) {
    function f;
    string rname;

    message("system", "Changing user information for " +
      (string)previous_object()->GetCapName() + ": ", previous_object());
    rname = (string)previous_object()->GetRealName();
    message("prompt", "Real name [" + rname + "] ", previous_object());
    f = function(string str, string old, object ob) {
        function g;

        if( !str || str == "" ) str = old;
        if( str != old ) {
            ob->SetRealName(str);
            message("system", "Real name changed to " + str, ob);
        }
        else message("system", "Real name unchanged.", ob);
        str = (string)ob->GetEmail();
        message("prompt", "Email (preceed with # to make admin only) ["
          + str + "] ", ob);
        g = function(string str, string old, object ob) {
            function h;

            if( !str || str == "" ) str = old;
            if( str != old ) {
                string a, b;

                if( sscanf(str, "%s@%s", a, b) != 2 ) {
                    message("system", "Invalid email.", ob);
                    return;
                }
                ob->SetEmail(str);
                message("system", "Email changed to " + str, ob);
            }
            else message("system", "Email unchanged.", ob);
            str = (ob->GetWebPage() || "");
            message("prompt", "Home Page [" + str + "]: ", ob);
            h = function(string str, object who) {
                if( str == "" ) {
                    str = 0;
                }
                else if( str ) {
                    if( strlen(str) < 5 ) {
                        str = "http://" + str;
                    }
                    else {
                        if( str[0..3] != "http" ) {
                            str = "http://" + str;
                        }
                    }
                }
                if( !str ) {
                    message("system", "Home paged unchanged.", who);
                }
                else {
                    who->SetWebPage(str);
                    message("system", "Home page changed.", who);
                    this_player()->save_player((string)this_player()->GetKeyName());
                    update("/secure/daemon/finger");
                }
            };
            input_to(h, 0, ob);
            this_player()->save_player((string)this_player()->GetKeyName());
            update("/secure/daemon/finger");
        };
コード例 #4
0
ファイル: xiaojing.c プロジェクト: heypnus/xkx2001
void init()
{
	this_player()->set_temp("marks/小", 1);
}
コード例 #5
0
ファイル: _dispell.c プロジェクト: ehershey/pd
int cmd_dispell(string str) {
    int which, skip, i, faith, wisdom, cost;
    string whom, cl;
    object tp, ob;
    object *inv;
    if (!spell()) {
        write("What?\n");
        return 1;
    }
    this_player()->set_magic_round();
    if(!str) {
        if(!(ob=(object)this_player()->query_current_attacker())) {
            notify_fail("Dispell whom?\n");
            return 0;
        }
    }
    tp = this_player();
    if((cl = (string)this_player()->query_subclass()) != "monk" &&
      cl != "cleric"  && cl !="paladin" && cl != "blue" && cl != "white") {
        notify_fail("You feel confused.\n");
        return 0;
    }
    if(!alignment_ok(this_player())) {
        notify_fail("You have betrayed the source of your powers.\n");
        return 0;
    }
    if (tp->query_disable())
        return notify_fail("You are busy.\n");
    if(tp->query_casting()) return 1;
    if(environment(tp)->query_property("no magic")) {
        notify_fail("Something is blocking your concentration.\n");
        return 0;
    }
    if(str == "all") return dispell_all(tp);
    if(!ob) ob = present(str, environment(tp));
    if(!ob) {
        inv = all_inventory(environment(tp));
        sscanf(str, "%s %d", whom, which);
        for(i=0, skip = 0; i<sizeof(inv) && !ob; i++) {
            if(inv[i]->id(whom)) {
                skip ++;
                if(skip == which) ob = inv[i];
            }
        }
        if(!ob) {
            notify_fail("Dispell whom?\n");
            return 0;
        }
    }
    if(!living(ob)) {
        notify_fail(ob->query_cap_name()+" is not a living thing!\n");
        return 0;
    }
    if(cl == "kataan" && (int)ob->query_alignment() < 0) {
        write(ob->query_cap_name()+" is not good!\n");
        tp->add_alignment(10);
        tp->add_mp(-5);
        return 1;
    }
    else if(cl != "kataan" && (int)ob->query_alignment() > 0) {
      write(ob->query_cap_name()+" is not evil!\n");
      this_player()->add_alignment(-10);
      this_player()->add_mp(-5);
      return 1;
    }
    if(!this_player()->kill_ob(ob)) {
        write(ob->query_cap_name()+" can't be attacked by you yet.");
       return 1;
    }
    faith = (int)tp->query_skill("faith");
    if (tp->query_subclass()=="paladin")
      faith += random(tp->query_level()*20/10);
    wisdom = (int)ob->query_stats("wisdom");
    faith -= wisdom;
    if(faith < 2) faith = 2;
    faith = random(faith)+faith;
    cost = faith/7;
    if((int)tp->query_mp() < cost) {
        notify_fail("Too low on magic power.\n");
        return 0;
    }
    tp->set_disable();
    tp->add_mp(-cost);
    tp->set_casting(faith);
    say("%^YELLOW%^"+tp->query_cap_name()+" mutters a prayer against enemies of the faith.");
    write("%^YELLOW%^You mutter a prayer against enemies of the faith.");
    tell_room(environment(tp), "%^ORANGE%^"+ob->query_cap_name()+" is struck by the force of "+tp->query_cap_name()+"'s faith!\n", ({tp, ob }) );
コード例 #6
0
ファイル: etherealarm.c プロジェクト: ehershey/pd
int query_auto_load() {
    if(this_player()->query_guild() != "ethereal") return 0;
    return 1;
}
コード例 #7
0
ファイル: room_item.c プロジェクト: Elohim/FGmud
int ShowRoomDesc(){
    this_player()->eventDescribeEnvironment();
    tell_room(environment(),this_player()->GetName()+" looks around.",({ this_player() }) );
コード例 #8
0
ファイル: sheshenya.c プロジェクト: aricxu/xkx100
int do_push(string who)
{
	object me = this_player();
	object victim, room, weapon;
	string attack_skill, dodge_skill, parry_skill;
	int ap, dp, pp;
	mapping prepare;

	victim = present(who, environment(me));
	if( !who )return notify_fail("你想推什么?\n");
	if( !victim ) return notify_fail("这个人不在这里吧。\n");
	if( victim==me ) return notify_fail("指令格式:jump cliff\n");
	if( me->is_busy() )
		return notify_fail("你现在自顾都不暇,还有心思害别人?\n");
	if( !victim->is_character() || victim->query("id") == "corpse" )
		return notify_fail("要推,也只能推人下去才有意思啊。\n");
	if( objectp(weapon = me->query_temp("weapon")) )
		return notify_fail("拿着"+weapon->name()+"怎么推人?\n");
	message_vision( CYN"\n$N一晃之际,已绕到$n身旁,突然劲贯双臂,猛的将$p向峭壁推去"NOR"!\n", me, victim);
	me->start_busy(1);

	if( !living(victim) )
	{
		message_vision("$n往山谷中直栽下去。\n", me, victim);
		victim->set_temp("last_damage_from", "被"+me->name()+"推下悬崖摔死了");
		fall_down(victim, "char", 0);
		victim->revive();
		return 1;
	}

	prepare = me->query_skill_prepare();
	if( !prepare ) prepare = ([]);

	switch( sizeof(prepare) )
	{
		case 0: attack_skill = "unarmed"; break;
		case 1: attack_skill = (keys(prepare))[0]; break;
		case 2: attack_skill = (keys(prepare))[random(2)]; break;
	}

	ap = COMBAT_D->skill_power(me, attack_skill, SKILL_USAGE_ATTACK);
	dp = COMBAT_D->skill_power(victim, "dodge", SKILL_USAGE_DEFENSE);
	if( victim->is_busy() ) dp /= 3;

	if( random(ap + dp) < dp )
	{
		dodge_skill = victim->query_skill_mapped("dodge");
		if( !dodge_skill ) dodge_skill = "dodge";
		message_vision(SKILL_D(dodge_skill)->query_dodge_msg(), me, victim);
		if( random( ap * 2 ) < dp && !random(10) )
		{
			message_vision("$N全身力道都用在这一推之上,不料竟被$n避开,身形一晃,踏了个空,从悬崖旁摔了下去。\n", me, victim);
			me->set_temp("last_damage_from", "从百尺高空掉下,摔成一团肉泥");
			fall_down(me, "char", 0);
			return 1;
		}
		else if( !victim->is_killing(me->query("id")) ) victim->kill_ob(me);
		return 1;
        }
        else
	{
		pp=COMBAT_D->skill_power(victim, "parry", SKILL_USAGE_DEFENSE);
		if( victim->is_busy() ) pp /= 2;
		if( random(ap + pp) < pp )
		{
			parry_skill = victim->query_skill_mapped("parry");
			if( !parry_skill || !SKILL_D(parry_skill)->parry_available() ) 
				parry_skill = "parry";
			message_vision(replace_string(SKILL_D(parry_skill)->query_parry_msg(victim->query_temp("weapon"), 
				victim), "$w", "双手"), me, victim);
			if( !victim->is_killing(me->query("id")) ) victim->kill_ob(me);
			return 1;
		}
		message_vision("$n一个没站稳,不由自主的往山谷中掉了下去。\n", me, victim);
		victim->set_temp("last_damage_from", "被"+me->name()+"推下悬崖摔死了");
		fall_down(victim, "char", 0);
                return 1;
        }
}
コード例 #9
0
int do_claim(string str) {
  set_owner(this_player());
  message("info", "Claimed Testmon.", this_player() );
  return 1;
}
コード例 #10
0
int query_auto_load()
{
if (this_player()->query_level() > 39) return 1;

}
コード例 #11
0
mixed cmd(string /* unused */) {
  this_player()->more_string(dump_socket_status());
  return 1;
}
コード例 #12
0
southeast() {
    call_other (this_player(), "move_player", "southeast#players/quantos/under/maze182");
    return 1;
}
コード例 #13
0
northwest() {
    call_other (this_player(), "move_player", "northwest#players/quantos/under/maze136");
    return 1;
}
コード例 #14
0
south() {
    call_other (this_player(), "move_player", "south#players/quantos/under/maze158");
    return 1;
}
コード例 #15
0
ファイル: bank.c プロジェクト: Hobbitron/tmi2_fluffos_v3
int withdraw (string str) {

	int number, i  ;
	int oldval, newval, newnum ;
	string type, word, newtype ;
	object card, coins ;
	string *types ;

	if (!str) {
		notify_fail ("Usage: withdraw <number> <type>\n") ;
		return 0 ;
	}
	if (sscanf(str,"%d %s",number,type)!=2) {
		notify_fail ("Usage: withdraw <number> <type>\n") ;
		return 0 ;
	}
	if (number<1) {
		notify_fail ("You can only withdraw positive numbers of coins.\n") ;
		return 0 ;
	}
	card = present("bank card", this_player()) ;
	if (!card) {
		notify_fail ("You don't have an account!\n") ;
		return 0 ;
	}
	if ((int)card->query_val(type)>=number) {
		coins = clone_object(COINS) ;
		coins->set_number(number) ;
		coins->set_type(type) ;
		if (coins->move(this_player())==MOVE_OK) {
			if (number==1) word = "coin" ; else word="coins" ;
			write ("The banker hands you "+number+" "+type+" "+word+".\n") ;
			say (this_player()->query("cap_name")+" withdraws some "+type+".\n") ;
			card -> add_val (type,-number) ;
			return 1 ;
		}
		notify_fail ("You cannot carry that many more coins.\n") ;
		return 0 ;
		}
// If the following lines (to the ending comment) are in place, if the player
// can't withdraw what he requests, the bank will give him the same amount
// of money in some other coinage if it can. For example, in the default
// coin system, if he requests 20 gold but doesn't have that, the bank will
// give him 2 platinum or 200 silver instead. This enables clever players
// to change coinage for free. If you have a coin exchange which charges
// a fee, you need to either rip this out, institute a fee on withdrawals,
// or allow smart players to get a free ride...
	types = cointypes() ;
	i = member_array(type,types) ;
	if (i==-1) {
		notify_fail ("You don't have that many "+type+" and the bank cannot convert them.\n") ;
		return 0 ;
	}
	oldval = coinvalue(type) ;
	for (i=0;i<sizeof(types);i++) {
                newtype = types[i] ;
                newval = coinvalue(newtype) ;
                newnum = number*oldval/newval ;
// Check to see if it's exact change.
		if ((number*oldval)-(newval*newnum)>0) continue ;
// Check to see if he's got that many of the new type.
                if ((int)card->query_val(newtype)>=newnum) {
			coins = clone_object(COINS) ;
			coins->set_number(number) ;
			coins->set_type(type) ;
			if (coins->move(this_player())==MOVE_OK) {
				if (number==1) word = "coin" ; else word="coins" ;
				write ("You don't have that many "+type+" but you do have "+newnum+" "+newtype+".\n") ;
				write ("The banker withdraws "+newnum+" "+newtype+" from your account and hands you "+number+" "+type+" "+word+".\n") ;
				say (this_player()->query("cap_name")+" withdraws some "+type+".\n") ;
				card -> add_val (newtype,-newnum) ;
				return 1 ;
			}
		}
	}
// Ending comment. If we get here, it means he didn't have enough of any
// kind of coin to make his requested withdrawal.
	notify_fail ("You don't have enough coins of any type to withdraw that amount of money.\n") ;
	return 0 ;
}
コード例 #16
0
ファイル: road5.c プロジェクト: gongfuPanada/mhxy2002
void init() {
  object me=this_player();

  me->start_busy(random(2)+1);
  call_out("greeting",1);
}
コード例 #17
0
ファイル: guangchang.c プロジェクト: gongfuPanada/jy
void init()
{
        add_action("do_enter", "enter");
	UPDATE_D->check_user(this_player());
}
コード例 #18
0
ファイル: dong101.c プロジェクト: aricxu/xkx100
int do_climb(object me)
{
    me= this_player();
    me->move("/d/migong/migong3");
 message_vision(   "$N手脚并用,一会儿功夫就爬出了洞。\n", this_player());
}
コード例 #19
0
ファイル: _turn.c プロジェクト: ehershey/pd
int cmd_turn(string str) {
    string whom;
    object *inv;
    object tp, ob;
    int which, skip, i, faith, wisdom;

   if (!spell()) {
      notify_fail("What?\n");
      return 0;
   }
    this_player()->set_magic_round();
    if(!str) {
        notify_fail("Turn what?\n");
        return 0;
    }
    tp = this_player();
    if((string)tp->query_subclass() != "cleric") {
        notify_fail("You appear puzzled.\n");
        return 0;
    }
    if(environment(tp)->query_property("no magic")) {
        notify_fail("Something is blocking your concentration.\n");
        return 0;
    }
    if(tp->query_casting()) return 1;
    if(!check_alignment(tp, (string)tp->query_class())) {
        notify_fail("You have betrayed the source of your powers!\n");
        return 0;
    }
    ob = present(str, environment(tp));
    if(!ob) {
        if(str == "all") return turn_all(tp);
        inv = all_inventory(environment(tp));
        sscanf(str, "%s %d", whom, which);
        for(i=0, skip =0; i<sizeof(inv) && !ob; i++) {
            if(inv[i]->id(whom)) {
                skip ++;
                if(skip == which) ob = inv[i];
            }
        }
        if(!ob) {
            notify_fail("Turn what?\n");
            return 0;
        }
    }
    faith = (int)tp->query_skill("belief");
    wisdom = (int)ob->query_stats("wisdom")*3/4;
    faith -= wisdom;
    if(faith < 2) faith = 2;
    faith = random(faith);
    if((int)tp->query_mp() < faith) {
        notify_fail("Too low on magic power.\n");
        return 0;
    }
    if((string)ob->query("race") != "undead" && (string)ob->query("race") != "lich" && (string)ob->query("race") != "vampire") {
        notify_fail(ob->query_cap_name()+" is not undead!\n");
        return 0;
    }
    tp->add_mp(-faith);
    if(!this_player()->kill_ob(ob)) {
        write(ob->query_cap_name()+" can't be attacked by you yet.");
       return 1;
    }
    say(tp->query_cap_name()+" mutters a prayer to turn the undead.\n", tp);
    if(faith > 65) {
        write("The undead being turns to dust.\n");
        say(ob->query_cap_name()+" turns to dust in response to "+tp->query_cap_name()+"'s prayer.\n", tp);
        ob->remove();
        tp->add_alignment(15);
        tp->add_skill_points("belief", 100);
    }
    else {
        tp->set_casting(faith);
        write("The undead writhes in response to your holy prayer.\n");
        say(ob->query_cap_name()+" writhes in response to "+tp->query_cap_name()+"'s prayer.\n", tp);
        tp->add_skill_points("faith", faith);
    }
    return 1;
}
コード例 #20
0
void help() {
  object tp=this_player();
  message("help","\nSyntax: <flamewall>\n"
    "This spell causes flames to spring up around the caster. "
    "The flames burn anything that tries to harm the caster.",tp);
}
コード例 #21
0
int readin(string str) {
    if(str != "writing") return 0;
    message("info", "\nLift this door if you wish, but be warned. \nThe beast contained herein is born of the shadow. \nOnly the light of the sun can contain it's malice. \nWithout this light %^BOLD%^BLACK%^death%^RESET%^ is the price you shall pay.", this_player(), );
    message("info", this_player()->query_cap_name()+" reads the writing on the trap door.", this_object(), this_player());
    return 1;
}
コード例 #22
0
ファイル: dime.c プロジェクト: shentino/simud
void on_split(object source)
{
   this_player()->msg_local("~CACTThe coins jingle as you manipulate them.~CDEF");
}
コード例 #23
0
#include <weapon.h>
#include <ansi.h>
inherit UNARMED;
object user=this_player();
object ob=this_object();
int be,bb,k,sp,qq,co,st;

void create()
{
 	        set_name(HIY"幻纹妖爪"NOR, ({ "ghost claw" ,"claw" }) );
	        set_weight(1500);
       		if( clonep() )
                set_default_object(__FILE__);
        	else {
        	set("long", "千年树妖-舞风扬妖力所幻化,带有些微的妖力和强大的杀伤力。\n");
                set("unit", "把");
                set("value", 300000);
                set("material", "blacksteel");
		set("sharp",9);
		set("type", 1);
		set("no_steal",1);
		set("no_give",1);
       		}
		init_unarmed(150);
 		set("wield_msg",HIY"$N"HIY"运起内力,缓缓将内力灌入$n"HIY",$n"HIY"感受到$N"HIY"的能力而放出炽热光茫!!\n"NOR);
		set("unwield_msg",HIY"$N"HIY"缓缓收回内力,$n"HIY"也渐渐变回一般不起眼的武器。\n"NOR);
		setup();
}

void init()
{
コード例 #24
0
int do_move(string arg)
{
  int way;
  object me=this_player();

  if (!arg)
     return notify_fail("选择一个你要去的方向吧。\n");
  if ((arg == "east") || (arg == "north") || (arg == "south"))
  {
//  	message_vision("$N感到一阵眼花撩乱,看来是走错方向了!\n", me);
    me->set_temp("flowrun",0);
    me->move(__DIR__"flowrm1.c");
    return 1;
  }
  if (arg == "west")
  {//表示方向正确
	if (me->query_temp("flowrun") > 9)
    {
      me->move(__DIR__"flowrm8.c");
      return 1;
    }
    else
	{
		way=random(6);
		me->add_temp("flowrun",1);
		switch (way)
		{
			case 0:
			{
				me->move(__DIR__"flowrm2.c");
				return 1;
			}
			case 1:
			{
				me->move(__DIR__"flowrm3.c");
				return 1;
			}
			case 2:
			{
				me->move(__DIR__"flowrm4.c");
				return 1;
			}
			case 3:
			{
				me->move(__DIR__"flowrm5.c");
				return 1;
			}
			case 4:
			{
				me->move(__DIR__"flowrm6.c");
				return 1;
			}
			case 5:
			{
				me->move(__DIR__"flowrm7.c");
				return 1;
			}
	}  //switch block
}
}  //检查正确方向的block
return notify_fail("挖勒,你移动的是哪一个方向呀!\n");
} //function block
コード例 #25
0
ファイル: _entangle.c プロジェクト: ehershey/pd
int cmd_entangle(string str)
{
    int a,b, i, clear, fl;
    string gen;
    object ob, tp;
    object *wield;
    if (!abil()) {
        write("What?\n");
        return 1;
    }
    tp = this_player();
    if ((!str || str=="") && !tp->query_current_attacker())
    {
        write("Syntax: <entangle [living]>");
        return 1;
    }
    if (this_player()->query_current_attacker())
        return notify_fail("You cannot find an opening to entangle "+str+".\n");

    if (environment(tp)->query_property("no attack"))
    {
        write("Greater powers prevent your malice.");
        return 1;
    }
    if(!b=sizeof(wield=(object *)tp->query_wielded())) {
        notify_fail("You must be wielding a weapon to do this.\n");
        return 0;
    }
    i = sizeof(wield);
    clear = 0;
    while (i--) {
        if (wield[i]->query_type() == "flail") {
            clear = 1;
            fl = i;
        }
    }
    if (!clear) return notify_fail("You must be wielding a flail type "
                                       "weapon to entangle your opponent.\n");

    if (tp->query_current_attacker() && str == "")
        ob = tp->query_current_attacker();
    else {
        ob = present(str, environment(tp));
        if (!ob)
        {
            write("You dont see that here.");
            return 1;
        }
        if (ob==tp)
        {
            write("Attack yourself?");
            return 1;
        }
    }
    if (tp->query_sp() < 50)
    {
        write("You are too tired.");
        return 1;
    }
    if(tp->query_disable()) return notify_fail(
                                           "You're too busy to be entangling people!\n");
    if(!this_player()->kill_ob(ob)) {
        write(ob->query_cap_name()+" can't be attacked by you yet.");
        return 1;
    }
    tp->set_disable();
    if (ob->query_gender()=="male") gen = "him";
    else gen = "her";
    a = tp->query_stats("dexterity");
    a -= (ob->query_stats("dexterity") / 2);
    if (a < 5)

    {
        write("You miss your opponent.");
        say( this_player()->query_cap_name()+" misses "+this_player()->query_possessive()+" entangle attempt.");
        return 1;
    }
    else if (a < 15)
    {
        write("You fail miserably and your "+wield[fl]->query_name()+" gets caught around "
              +ob->query_cap_name()+"'s foot!");
        message("info", tp->query_cap_name()+" fails miserably and "+tp->query_possessive()+" "
                +wield[fl]->query_name()+" gets caught around your foot!", ob);
        message("info", tp->query_cap_name()+" fails miserably and "+tp->query_possessive()+" "
                +wield[fl]->query_name()+" gets caught around "+ob->query_cap_name()+"'s foot!"
                ,environment(ob), ({ tp, ob }));
コード例 #26
0
int e()
{
  this_player()->move(this_player()->query("startroom"));
  return 1;
}
コード例 #27
0
ファイル: chfn.c プロジェクト: arylwen/terebi
                }
                if( !str ) {
                    message("system", "Home paged unchanged.", who);
                }
                else {
                    who->SetWebPage(str);
                    message("system", "Home page changed.", who);
                    this_player()->save_player((string)this_player()->GetKeyName());
                    update("/secure/daemon/finger");
                }
            };
            input_to(h, 0, ob);
            this_player()->save_player((string)this_player()->GetKeyName());
            update("/secure/daemon/finger");
        };
        input_to(g, 0, str, ob);
        this_player()->save_player((string)this_player()->GetKeyName());
        update("/secure/daemon/finger");
    };
    input_to(f, "" + rname, previous_object());
    this_player()->save_player((string)this_player()->GetKeyName());
    update("/secure/daemon/finger");
    return 1;
}

void help() {
    message("help", "Syntax: <chfn>\n\n"
      "Allows you to change your real life information.\n\n"
      "See also: passwd", this_player());
}
コード例 #28
0
int go(string str)
{
  if (str == "e" || str == "east")
    this_player()->move(this_player()->query("startroom"));
  return 1;
}
コード例 #29
0
ファイル: gueiwei.c プロジェクト: mudchina/sjsh
int do_error(string arg)
{
object who = this_player();
message_vision("不要捣蛋哦,小心被天界引起重视!\n",who);
return 1;
}
コード例 #30
0
ファイル: languages.c プロジェクト: Elohim/FGmud
#include <lib.h>
#include <talk_type.h>

inherit LIB_DAEMON;

mixed cmd(string str) {
    mapping FluencyMap = ([]);
    string *langs = this_player()->GetLanguages();

    if(str){
        mixed ret = this_player()->CanSpeak(0, TALK_LOCAL, "foo", str);
        if(intp(ret)) {
            this_player()->SetDefaultLanguage(str);
            write("You are now speaking in "+capitalize(lower_case(str))+".");
            return 1;
        }
        else return ret;
    }

    foreach(string lang in langs){
        FluencyMap[lang] = this_player()->GetLanguageLevel(lang);
    }

    if(this_player()->GetPolyglot()){
        write("You understand all languages with 100% proficiency.");
    }

    write("You speak: ");
    foreach(string key, int val in FluencyMap){
        write(capitalize(key)+" with "+val+"% proficiency.");
    }