コード例 #1
0
void do_closed()
{
        delete_temp("have_turn");
        delete("exits/enter");
        tell_room(this_object(),"机关感受不到压力,石壁的门竟缓缓地自动关了起来。\n");
}
コード例 #2
0
ファイル: tidu.c プロジェクト: gongfuPanada/xyj2006
int do_huansu()
{
        if( !this_player()->query_temp("pending/leave_bonze") ) return 0;
	message_vision( HIC "$NмяобиМио╣дТбТдё╛╧╖╧╖╬╢╬╢╣ь╧Робю╢©дак╪╦╦ЖоЛм╥ё╛╢с╢к╩ж╦╢аквтсииМ║ё\n\n"NOR, this_player(), this_object() );
	this_player()->delete("class");
	this_player()->delete("bonze/class");
	this_player()->delete_skill("buddhism");
	command("say ╢с╫ЯртААдЦ╩ж╦╢ЁЖ╪рг╟╣дквцШ" +this_player()->query("bonze/old_name")+"║ё");
	this_player()->set("name", this_player()->query("bonze/old_name") );
	command("sigh");
        this_player()->delete_temp("pending/leave_bonze");
	this_player()->save();
	return 1;
}
コード例 #3
0
ファイル: apparel.c プロジェクト: shentino/simud
/// Have to take things off to drop them
int on_drop( object who ) {
   if (this_object()->query_worn())
      return this_object()->remove_armour();
   return 1;
}
コード例 #4
0
ファイル: light.c プロジェクト: quixadhal/discworld
int set_opaque() {
  if (!this_object()->query_property("opaque") && environment())
    environment()->adjust_light(-int_light);
  this_object()->add_property("opaque",1);
  return 1;
}
コード例 #5
0
ファイル: mudinfo.c プロジェクト: mudchina/nitan3
void create() { seteuid(getuid(this_object())); }
void dest_me() { destruct( this_object() ); }
コード例 #7
0
ファイル: poison.c プロジェクト: ClockworkSoul/MortalRemains
mixed query_auto_load()  {
    return 
    sprintf("%s:%d %d %d %d %d", base_name(this_object()),
      Duration, Damage, Interval, Number, Effect);
}
コード例 #8
0
ファイル: tent1.c プロジェクト: ehershey/pd
void reset() {
::reset();
if(!present("treggeth")) {
new(MOB "treggeth.c")->move(this_object());
}
コード例 #9
0
ファイル: yellama.c プロジェクト: huangleon/fy2005
smart_attack() {
	this_object()->ccommand("perform fuhu");	
	return;
}
コード例 #10
0
ファイル: damage_backup.c プロジェクト: heypnus/xkx2001
void die()
{
	object corpse, rum_ob;
	mixed killer;
	int i;

	if( environment()->query("no_death") && userp(this_object()) )
		{

//			if ( !objectp(rum_ob = find_object("/d/huashan/npc/referee")) )
//				rum_ob = load_object("/d/huashan/npc/referee");

//			killer = query_temp("last_damage_from");

//			if ( stringp(killer) )
//				CHANNEL_D->do_channel(rum_ob, "chat",
//					sprintf("%s被" + killer + "干掉了。", this_object()->name(1)));
//			else
//				CHANNEL_D->do_channel(rum_ob, "rumor",
//					sprintf("%s被干掉了。", this_object()->name(1)));
			unconcious();
			remove_call_out("revive");

			return;
		}

	if( !living(this_object()) ) revive(1);
	if( wizardp(this_object()) && query("env/immortal") ) return;


	// Clear all the conditions by death.
	this_object()->clear_condition();
	this_object()->delete("poisoner");

	COMBAT_D->announce(this_object(), "dead");

	if ( userp(this_object()) && !environment(this_object())->query("no_death"))
		COMBAT_D->death_penalty(this_object());

	if( objectp(killer = query_temp("last_damage_from"))){
		set_temp("my_killer", killer->query("id"));
		COMBAT_D->killer_reward(killer, this_object());
	} else  if (userp(this_object()))
	{
	if ( !objectp(rum_ob = find_object("/d/city/npc/aqingsao")) )
		rum_ob = load_object("/d/city/npc/aqingsao");

	if ( stringp(killer) )
		CHANNEL_D->do_channel(rum_ob, "rumor",
			sprintf("%s" + killer + "。", this_object()->name(1)));
	else
		CHANNEL_D->do_channel(rum_ob, "rumor",
			sprintf("%s莫名其妙地死了。", this_object()->name(1)));
	}

	if( ( !environment()->query("no_death") || !userp(this_object()) ) 
	 && objectp(corpse = CHAR_D->make_corpse(this_object(), killer)) )
		corpse->move(environment());

	this_object()->remove_all_killer();
	all_inventory(environment())->remove_killer(this_object());

	if( userp(this_object()) ) {
		if (this_object()->is_busy())
			this_object()->interrupt_me();
		set("jing", 1);	set("eff_jing", 1);
		set("qi", 1);	set("eff_qi", 1);
		set("jingli", 1);
		if (environment(this_object())->query("no_death")) {
			set("eff_jing", query("max_jing"));
			set("eff_qi", query("max_qi"));
			return;
		}
		this_object()->dismiss_team();
		this_object()->save();
		ghost = 1;
		this_object()->move(DEATH_ROOM);
		DEATH_ROOM->start_death(this_object());
		MARRY_D->break_marriage(this_object()); // added by [email protected]
		if( this_object()->query("family/master_id")=="feng qingyang" ) 							CHAR_D->break_relation(this_object()); //added by Qfy
	} else
		destruct(this_object());
}
コード例 #11
0
ファイル: damage_backup.c プロジェクト: heypnus/xkx2001
int heal_up()
{
	int update_flag, i;
	mapping my;

//	if( this_object()->is_fighting() ) return -1;

	update_flag = 0;

	my = query_entire_dbase();

	if( my["water"] > 0 ) { my["water"] -= 1; update_flag++; }
	if( my["food"] > 0 ) { my["food"] -= 1; update_flag++; }

	if( my["water"] < 1 && userp(this_object()) ) return update_flag;
	if( my["food"] < 1 && userp(this_object()) ) return update_flag;
	

	if( this_object()->is_fighting() )
		my["jing"] += my["con"] / 9 + my["max_jingli"] / 30;
	else
		my["jing"] += my["con"] / 3 + my["max_jingli"] / 10;

	if( my["jing"] >= my["eff_jing"] ) {
		my["jing"] = my["eff_jing"];
		if( my["eff_jing"] < my["max_jing"] ) { my["eff_jing"] ++; update_flag++; }
	} else update_flag++;


	if( this_object()->is_fighting() )
		my["qi"] += my["con"] / 9 + my["max_neili"] / 30;
	else
		my["qi"] += my["con"] / 3 + my["max_neili"] / 10;

	if( my["qi"] >= my["eff_qi"] ) {
		my["qi"] = my["eff_qi"];
		if( my["eff_qi"] < my["max_qi"] ) { my["eff_qi"] ++; update_flag++; }
	} else update_flag++;


	if( my["max_jingli"] && my["jingli"] < my["max_jingli"] ) {
		if( this_object()->is_fighting() )
			my["jingli"] +=  (my["str"] + my["dex"]) / 12;
		else
			my["jingli"] +=  (my["str"] + my["dex"]) / 4;

		if( my["jingli"] > my["max_jingli"]*2 ) my["jingli"] = my["max_jingli"]*2;
		update_flag++;
	}

	if( my["max_neili"] && my["neili"] < my["max_neili"] ) {
		if( this_object()->is_fighting() )
			my["neili"] += (int)this_object()->query_skill("force", 1) / 6;
		else
			my["neili"] += (int)this_object()->query_skill("force", 1) / 2;

		if( my["neili"] > my["max_neili"] ) my["neili"] = my["max_neili"];
		update_flag++;
	}

	return update_flag;
}
コード例 #12
0
void reset(){
 ::reset();
    if (!present("apu")){
       new(HOUSEMOB"apu.c")->move(this_object());
     }
コード例 #13
0
ファイル: self_destruct.c プロジェクト: gongfuPanada/mhxy2002
//Cracked by Roath
void self_dest()
{
    if(this_object())
	destruct(this_object());
}
コード例 #14
0
ファイル: road9.c プロジェクト: cosin/XYJ
void greeting() {
    object npc;
  if (present("little elf",this_object()) || present("monster",this_object())) return;
  if (random(2))  npc=new(__DIR__"npc/beauty");
  else   npc=new(__DIR__"npc/beast");
コード例 #15
0
ファイル: c_view2.c プロジェクト: szhowardhuang/fs2
void second( object *user , string str )
{
	int     i, count, state;
	string  list, CO, state_str, list2;
	user = sort_array(user, "sort_rank", this_object());
        i = sizeof(user);
        list = sprintf( HIG"《"HIY"%|10s"HIG"》"HIC" 线上帮众 "NOR"-\n", str );
	list+= "───────────────────────────────────────\n";
	count = 0;

        while( i-- )
        {
                switch(user[i]->query("clan/rank")) {
	case 1  :       CO = HIW + "Ψ";        break;
	case 2  :       CO = HIC + "ζ";        break;
        case 3  :       CO = HIY + "Φ";        break;
        case 4  :       CO = HIG + "卍";        break;
        case 5  :       CO = HIM + "Ξ";        break;
        case 6  :       CO = HIB + "∏";        break;
        case 7  :       CO = HIR + "Χ";        break;
		default :       CO = NOR + "?";        break;
		}

        if(this_player())
        if( wizardp(user[i]) && !wizardp(this_player()))
			continue;
		if( wiz_level(this_player())<6 && user[i]->query("env/隐身") && wiz_level(user[i]) && wiz_level(user[i]) > wiz_level(this_player()) )
		{
		 continue;
		}
		state = 0;
		state_str = "";
		count++;

                list = sprintf( "%s"HIC"【"NOR"%|10s"HIC"】"NOR"%s%|10s%s"NOR"",
			list,
                        area(user[i]),
                        CO,
                        (user[i]->query("clan/title") ? user[i]->query("clan/title") : "--无职衔--"), CO );
/*
		list2 = (user[i]->query("title") ? user[i]->query("title") : "" ) +
                        (user[i]->query("nickname") ? "「"+user[i]->query("nickname")+"”" : " " ) +
                        user[i]->query("name")+"("+user[i]->query("id")+")";
                if( strlen((list2))>80 )*/
                	list2 = (user[i]->query("nickname") ? "「"+user[i]->query("nickname")+"”" : " " ) +
                        	user[i]->query("name")+"("+user[i]->query("id")+")";
                list += list2;

		if( user[i]->query_temp("netdead") ) {
			state_str += HIR"(断线)"NOR;
			state = 1;
		}
		if( !environment(user[i]) ) {
			state_str += HIG"(异次元)"NOR;
			state = 1;
		}
		if( in_edit(user[i]) ) {
			state_str += HIY"(编辑)"NOR;
			state = 1;
		}
		if( in_input(user[i]) ) {
			state_str += HIC"(阅\读)"NOR;
			state = 1;
		}
		if( interactive(user[i]) && query_idle(user[i])>120 ) {
                	state_str += sprintf( "%s", HIM"(发呆 "+query_idle(user[i])/60+" 分钟)"NOR );
                	state = 1;
                }
                if( state ) list = list + /*"\t\t\t   " +*/ state_str;
                list += "\n";
        }

	list +=	"───────────────────────────────────────\n";
	list += sprintf( " 目前线上共有 %d 位帮众, 系统负担: %s\n\n", count, query_load_average() );

        this_player()->start_more(list);
}
コード例 #16
0
ファイル: stinger.c プロジェクト: ehershey/pd
int Destruct(string str) {
   if (!str) return 0;
   if (present(str, this_player()) != this_object()) return 0;
   this_object()->remove();
   return 1;
}
コード例 #17
0
ファイル: jinwuming.c プロジェクト: huangleon/fy2005
void attempt_apprentice(object me)
{
      	message_vision(CYN"$N冷冷地看了$n一眼,一语不发。\n"NOR, this_object(), me);
      	return;	
}
コード例 #18
0
int preview() {
 if (this_player()->query_class() != CLASS ||
     this_player()->query_subclass() != "none")  {
        message("info", "You have not the training to join.", this_player());
        return 1;
    }
    if(this_player()->query_subclass() == SUBCLASS){
        message("info", "You are already one of the chosen.", this_player());
        return 1;
    }
    message("info", (string)this_player()->query_cap_name()+" seeks to learn about jesters.", this_object(), ({ this_player() }));
void create()
{
  seteuid( (string)"/secure/master"->creator_file( file_name( this_object() ) ) );
} /* create() */
コード例 #20
0
ファイル: pinggu.c プロジェクト: mudchina/fy4
         (: auto_smart_fight() :),    
 }) );
  
 CHAR_D->setup_char(this_object());
 auto_npc_setup("guardian",150,150,1,"/obj/weapon/","fighter_w","taiji-sword");
 set_name("铁萍姑",({"tie pinggu","pinggu"}));
コード例 #21
0
ファイル: baixing.c プロジェクト: mudchina/nitan3
void unconcious()
{
        this_object()->die();
}
コード例 #22
0
ファイル: user_state.c プロジェクト: thindil/laeran-mud
static void pop_state(void) {
  user->pop_state(this_object());
}
コード例 #23
0
ファイル: light.c プロジェクト: quixadhal/discworld
int reset_opaque() {
  if (this_object()->query_property("opaque") && environment())
    environment()->adjust_light(int_light);
  this_object()->remove_property("opaque");
}
コード例 #24
0
   void reset() {                       
 
    if(!present("yetti"))
      {
      new("/wizards/detach/roston/yetti")->move(this_object());
      }
コード例 #25
0
ファイル: waist.c プロジェクト: huangleon/fy2005
void create() {
	if(clonep(this_object())) {
		destruct(this_object());
		return notify_fail("CAN NOT CLONE STARNDARD OBJECT!\n");
	}
}
コード例 #26
0
ファイル: heroine.c プロジェクト: huangleon/fy2005
void leave_room()
{
	message_vision(HIW"仿佛在白雪红梅间渐渐融化了一个淡淡的影子,白衣如雪的身影消失在视野中。 \n"NOR,this_object());
	destruct(this_object());
}
コード例 #27
0
ファイル: apparel.c プロジェクト: shentino/simud
int body_parts;     ///< body parts covered by this item
int layer;          ///< which layer this item is being worn on

/// Object editor information.
string apparel_info() {
  return "flexible\nsize\nbody_parts";
}

/****************************** Queries ****************************/

// Prototype
int query_worn();
varargs int remove_armour(int silent);

int query_flexible() {
   QBODY( "flexible", this_object()->query_default_flexible() )
}

int query_size() {
   QBODY( "size", this_object()->query_default_size() )
}

int query_worn() {
   if (environment() && !environment(this_object())->query_is_living())
      worn = 0;
   return worn;
}

int query_body_parts() { QBODY( "body_parts", this_object()->query_default_body_parts() ) }

int query_layer() {
コード例 #28
0
static void self_destruct()
{
	destruct_object(this_object());
}
コード例 #29
0
ファイル: apparel.c プロジェクト: shentino/simud
/* Prevent stupid items from magically being worn if somehow flagged as worn
 * by their container.
 */
int on_get( object who ) {
   int gettable = this_object()->query_gettable();
   if(gettable && this_object()->query_worn())
      this_object()->set_worn(0);
   return gettable;
}
コード例 #30
0
make_obliterator() {
    object special_sword, talker, thing;
      
    follow = 0;
    follow_name = 0;
    last_talker = 0;
    found_him = 0;
    vasques = 0;
      
    obliterator = clone_object("obj/monster");	/* NEW, IMPROVED monster class! */
    obliterator->set_name("obliterator");
    obliterator->set_alias("sir obliterator");
    obliterator->set_level(19);
    obliterator->set_hp(250);
    obliterator->set_al(-1000);
    obliterator->set_short("Sir Obliterator, the anti-paladin");
    obliterator->set_long("Sir Obliterator is an evil anti-paladin.\n" +
			  "He is dressed in black, has a grim look on his face, and is quite\n" +
			  "obviously very, very dangerous. You are lucky today, however,\n" +
			  "because he doesn't seem to be the least interested in you.\n" +
			  "Sir Obliterator is on an important mission -- a matter of life\n" +
			  "and death! Well, mostly death, really...\n");
    obliterator->set_aggressive(0);
    obliterator->set_spell_mess1("Sir Obliterator kicks his opponent hard with his combat boots.");
    obliterator->set_spell_mess2("Sir Obliterator kicks you hard with his combat boots.");
    obliterator->set_chance(20);
    obliterator->set_spell_dam(20);
    obliterator->set_dead_ob(this_object());
    move_object(obliterator, this_object());
    
    /* The NEW, IMPROVED monster calls: */
    if (!chat_str)
	setup_arrays();
    obliterator->load_chat(10, chat_str);
    obliterator->load_a_chat(20, a_chat_str);
    obliterator->set_match(this_object(), function, type, match);
    
    thing = clone_object("obj/treasure");
    thing->set_id("amulet");
    thing->set_alias("big black iron amulet");
    thing->set_short("A big black iron amulet");
    thing->set_long("This is Sir Obliterator's teleport device, a big and heavy black amulet\n" +
		    "made of iron, engraved with some evil-looking runes. You cannot use\n" +
		    "it to teleport, since it was made specifically for Sir Obliterator.\n");
    thing->set_weight(4);
    thing->set_value(20);
    move_object(thing, obliterator);
    
    thing = clone_object("obj/armour");
    thing->set_name("chainmail");
    thing->set_alias("armour");
    thing->set_type("armour");
    thing->set_ac(3);
    thing->set_value(500);
    thing->set_weight(5);
    thing->set_short("A suit of chainmail");
    move_object(thing, obliterator);
    obliterator->add_weight(5);
    obliterator->init_command("wear chainmail");
    
    thing = clone_object("obj/armour");
    thing->set_name("shield");
    thing->set_alias("big black shield");
    thing->set_type("shield");
    thing->set_ac(1);
    thing->set_value(100);
    thing->set_weight(5);
    thing->set_short("A big black shield with a picture painted on it");
    thing->set_long("The shield is big, black but not very beautiful.\n" +
		    "There is a picture painted on it, a picture of a dead\n" +
		    "person, called Vasques, being eaten by a black dragon.\n");
    move_object(thing, obliterator);
    obliterator->add_weight(6);
    obliterator->init_command("wear shield");
    
    thing = clone_object("obj/armour");
    thing->set_name("metal helmet");
    thing->set_ac(1);
    thing->set_weight(2);
    thing->set_value(75);
    thing->set_alias("helmet");
    thing->set_type("helmet");
    thing->set_short("A metal helmet");
    thing->set_long("A metal helmet.\n");
    move_object(thing, obliterator);
    obliterator->add_weight(2);
    obliterator->init_command("wear helmet");
    
    thing = clone_object("obj/armour");
    thing->set_name("combat boots");
    thing->set_ac(1);
    thing->set_weight(1);
    thing->set_value(75);
    thing->set_alias("boots");
    thing->set_type("boot");
    thing->set_short("A pair of combat boots");
    move_object(thing, obliterator);
    obliterator->add_weight(1);
    obliterator->init_command("wear boots");
    
    sword = clone_object("obj/weapon");
    sword->set_name("black longsword");
    sword->set_alt_name("longsword");
    sword->set_alias("sword");
    sword->set_class(16);
    sword->set_value(200);
    sword->set_weight(3);
    sword->set_short("A black longsword");
    sword->set_long("This is the black longsword of Sir Obliterator, the anti-paladin.\n" +
		    "As a weapon it's not really that impressing, but Sir Obliterator\n" +
		    "obviously thinks it is quite sufficient for the random encounters\n" +
		    "he will have while he is on his quest - those nerds who actually\n" +
		    "are stupid enough to attack him. Him!\n" +
		    "For his real mission, though, he has another weapon...\n");
    sword->set_hit_func(this_object());
    move_object(sword, obliterator);
    obliterator->add_weight(3);
    obliterator->init_command("wield sword");
    
    special_sword = clone_object("obj/weapon");
    special_sword->set_name("unholy avenger");
    special_sword->set_alt_name("avenger");
    special_sword->set_alias("sword");
    special_sword->set_class(WEAPON_CLASS);
    special_sword->set_value(8000);
    special_sword->set_weight(6);
    special_sword->set_short("An Unholy Avenger of Specified Annihilation");
    special_sword->set_long("What a horrible weapon! It is black as night, cold as ice and heavy\n" +
			    "as a gravestone soaked in blood. You shiver with fear just from\n" +
			    "looking at this evil, evil, evil thing.\n" +
			    "But you understand that this is a very special weapon, existing\n" +
			    "only for a single purpose. Somewhere, someone has made this sword,\n" +
			    "infested it with pure evil, and filled it with a hate that burns\n" +
			    "for a single being in the world...\n");
    move_object(special_sword, "players/padrone/outside/obli_hit_func");
    special_sword->set_hit_func(environment(special_sword));
    special_sword->set_wield_func(this_object());
    move_object(special_sword, obliterator);
      
    /* Adjusted for his extra strength and agility, to match Vasques: */
    obliterator->set_ac(9);
    obliterator->set_wc(30);
} /* make_obliterator */