Beispiel #1
0
void do_tests() {
    x = 0;
    set_heart_beat(0);
    ASSERT(!query_heart_beat(this_object()));
    set_heart_beat(1);
    ASSERT(query_heart_beat(this_object()) == 1);
}
Beispiel #2
0
void setup(object tp, object tgt, int time) {
  if (!tp || !time) return;
  owner=tp;
  rounds=time;
  target=tgt;
  set_heart_beat(1);
}
Beispiel #3
0
varargs int receive_wound(string type, int damage, mixed who)
{
	int val;

	if( damage < 0 ) error("F_DAMAGE: 伤害值为负值。\n");
	if( type!="jing" && type!="qi" )
		error("F_DAMAGE: 伤害种类错误( 只能是 jing, qi 其中之一 )。\n");

	set_temp("last_damage_from", who);
	
	
	if(living(this_object()) && objectp(who) && userp(who)) 
		set_temp("last_eff_damage_from", who->query("id"));
	
	val = (int)query("eff_" + type) - damage;

	if( val >= 0 ) set("eff_" + type, val);
	else {
		set( "eff_" + type, -1 );
		val = -1;
	}

	if( (int)query(type) > val ) set(type, val);

	set_heart_beat(1);

	return damage;
}
Beispiel #4
0
init() {
  set_heart_beat(1);  
  tplr=this_player();
  nam=call_other(tplr,"query_name",0);
  if(here_before(nam)) trig3=1;  /* ask mission */
  else trig=1;  /* first greet */
}
Beispiel #5
0
static void create() {
    daemon::create();
    SetNoClean(1);
    call_out((: eventReap :), 300);
    call_out((: CheckMem :), 60);
    set_heart_beat(5);
}
static void create() {
    string privs;
    privs = query_privs();
    if( privs ) privs = capitalize(privs);
    else privs = "a creator";
    room::create();
    SetClimate("indoors");
    SetAmbientLight(40);
    SetShort("Conference Room");
    SetLong((: ExtraDesc :));
    SetInventory(([
                      "/domains/town/obj/chair" : 4,
                      "/domains/town/obj/bbucket" : 1,
                      "/secure/npc/cambot" : 1
                  ]));
    SetExits(([
                  "west" : "/domains/town/room/adv_guild",
              ]));

    SetProperties(([
                       "no attack" : 1,
                       "nopeer" : 1,
                       "meeting room" : 1,
                   ]));
    SetNoClean(1);
    privacy=0;
    set_heart_beat(20);
    timer = 0;

}
Beispiel #7
0
void create()
{  
   
   set("short","农田");
   set ("long", @LONG
金黄色的麦穗低低的垂下来,四周还有用木头做
起来的小篱笆,还有稀疏的摆着几个稻草人,真是幅
美丽的农庄景致.                     
LONG);
   set("light_up", 1);
set("objects", ([ /* sizeof() == 2 */
  "/open/start/npc/hen" : 2,
  "/open/start/obj/bogle" : 1,
]));
        set_heart_beat(1);
 set("exits", ([ /* sizeof() == 4 */
 
   "west" : "/open/island/room/i6",
    "north" : "/open/island/room/i15",
   "east" : "/open/island/room/m1",

]));
   set("outdoors", "/open/main");

 setup();
}
heart_beat()
{
    if (next_out) {
	tell_object(next_dest, next_out);
	next_out = 0;
    }
    set_heart_beat(0);
}
Beispiel #9
0
void create() {
  ::create();
  set_heart_beat(1);
  set_short("");
  set_long("");
  set_weight(0);
  set_value(0);
  set_id(({"rage_ob_id"}));
Beispiel #10
0
class propiedad {
    mixed valor;
    int tiempo;
}

void create() {
    set_heart_beat(1);
}
Beispiel #11
0
void create() {
 ::create();
   set_name("drunk");
   set_short("");
   set_long("You're faded!");
   set_weight(0);
   set_value(0);
   set_heart_beat(1);
}
Beispiel #12
0
void create() {
    ::create();

    set_name("shield_object_duh_001");
    set_heart_beat(1);
    set_short("");
    set_long("psiblades shield blah");
    set_weight(0);
    set_value(0);
    set_id(({"psiblades_shield_object_001"}));
Beispiel #13
0
// setup: used to configure attributes that aren't known by this_object()
// at create() time such as living_name (and so can't be done in create()).
void setup()
{
	seteuid(getuid(this_object()));

	set_heart_beat(1);
	tick = 5 + random(10);
    enable_player();

	CHAR_D->setup_char( this_object() );
}
Beispiel #14
0
static void create() {
    room::create();
    SetClimate("indoors");
    SetAmbientLight(30);
    SetShort("off the mortal coil");
    SetLong( (:FunkyPic:) );
    SetObviousExits("no exit");
    set_heart_beat(10);
    SetNoModify(1);
}
Beispiel #15
0
void extra_create() 
{
    switch( random( 3 ) )
    {
      case 0 : colorname = "green"  ; color = GRN; break;
      case 1 : colorname = "blue"   ; color = BLU; break;
      case 2 : colorname = "purple" ; color = MAG; break;
    }
    
    set_name( "a slime" );
    add_alias( "slime" );
    add_alias( sprintf( "%s slime", colorname ) );
    
    set_short( sprintf( "a %s slime", colorname ) );
    set_ansi_short ( sprintf( "%sa %s slime", color, colorname )  );
    
    set_long( sprintf( "This slime oozes sloppily through the room absorbing "
      "bits and pieces off of the mushrooms around it. Inside of its "
      "%s colored body you can see quite a bit of material. "
      "Hopefully it doesn't try to digest you!", colorname ) );
    
    set_race( FRACE "slime" );
    set_alignment( NEUTRAL_AL );
    
    set_stat( "str" , 200 );
    set_stat( "con" , 300 );
    
    
    set_proficiency( "hands", 150 );
    set_skill( "dodge", 65 );
    
    set( NoStealP, 1 );
    set( NoStunP, 1 );
    
    set_natural_ac( 10 );
    
    set_heal_rate( 20 );
    set_heal_amount( 60 );
    
    set_chat_rate( 30 );
    set_chat_chance( 50 );
    
    add_phrase( "#emote squelches along." );
    add_phrase( "#emote jiggles wildly." );

    set_move_rate( 40 );
    set_move_chance( 50 );
    
    set_pick_up_rate( 60 );
    set_pick_up_chance( 0 );
    
    set_heart_beat( 30 );
    
    add_special_attack( "mimic", THISO, 30 );
}
Beispiel #16
0
/** Initializes the time object. This should happen when the MUD boots.
 * Since the time object is used to keep track of uptime, updating
 * it and reloading it will have a similar effect to resetting the uptime.
 */
void create() {
   debug("loading time daemon...");
   update_colors();
   boot_time = "/secure/master"->query_hold_var();
   if( !boot_time )
      boot_time = time();
   debug("  boot_time = "+boot_time);
   call_out("update_colors", query_time_until_hour() );
   load_object("/daemon/playerwipe");
   load_object("/daemon/escheat");
   set_heart_beat( 1 );
}
Beispiel #17
0
// setup: used to configure attributes that aren't known by this_object()
// at create() time such as living_name (and so can't be done in create()).
void setup()
{
	seteuid(getuid(this_object()));

	set_heart_beat(1);
	tick = 5 + random(10);
        enable_player();
	set_max_items(30);

	this_object()->update_age(); // mon 7/3/99
	CHAR_D->setup_char( this_object() );
}
Beispiel #18
0
void heart_beat() {
  object env = environment();
  object o_env;

  if (!owner || !(o_env = environment(owner)) || !env) {
    set_heart_beat(0);
    return;
  }

  if (o_env != env)
    move(o_env);
}
Beispiel #19
0
void create(){
#if WIZMAP
    SaveFile = save_file(SAVE_MAP);
    if(!file_exists(SaveFile) && file_exists(old_savename(SaveFile))){
        cp(old_savename(SaveFile), SaveFile);
    }
    if(file_exists(SaveFile)){
        RestoreObject(SaveFile, 1);
    }
    set_heart_beat(1);
#endif
}
Beispiel #20
0
void create() {
  ::create();

  set_properties( ([ "no store" : 1, ]) );
  set_type("flail");
  set_hands(1);
  set_weight(1);
  set_curr_value("gold", 0);

  owner = 0;
  if (clonep(this_object()))
    set_heart_beat(3);
}
Beispiel #21
0
/*
string query_gender() { if (this_player()) return this_player()->query_gender();
                        else return "male"; }

string query_race() { if (this_player()) return this_player()->query_race();
                      else return "human"; }
*/
void create() {
    ::create();
    set_name("tiriin");
    set_short("Tiriin");
    set_long("Tiriin looks like a strange mixture of everybody you have ever met. "
             "You feel an urge to <ask tiriin to "
             "sing>. You feel there is a message for you there.");
    set_level(100);
    set_heart_beat(1);
    set_body_type("human");
    set_gender("neuter");
    set_race("human");
}
Beispiel #22
0
void heart_beat() {
    x++;
    switch (x) {
    case 1:
	ASSERT(query_heart_beat(this_object()) == 1);
	set_heart_beat(2);
	ASSERT(query_heart_beat(this_object()) == 2);
	break;
    case 1:
	ASSERT(query_heart_beat(this_object()) == 2);
	set_heart_beat(-1);
	ASSERT(query_heart_beat(this_object()) == 2);
	break;
    case 2:
	ASSERT(query_heart_beat(this_object()) == 2);
	set_heart_beat(0);
	ASSERT(query_heart_beat(this_object()) == 0);
	break;
    default:
	ASSERT(0);
    }
}
Beispiel #23
0
void heart_beat()
{
  int i;
  if(!environment())
  {
    set_heart_beat(0);
    destruct(this_object());
    return;
  }
  if(living(environment()))
  {
    set_heart_beat(0);
    destruct(this_object());
    return;
  }
  if (!alter)
    tell_room(environment(), "Fuerchterlicher Gestank erfuellt den Raum.\n");
  alter++;
  if (!random(10))
  {
    i = random (5);
    if (i==0)
      tell_room(environment(), furzerWESSEN+" Furz stinkt wirklich grauenerregend.\n");
    if (i==1)
      tell_room(environment(), "Du haeltst Dir die Nase zu.\n");
    if (i==2)
      tell_room(environment(), "Widerliche Duenste erfuellen den Raum.\n");
    if (i==3)
      tell_room(environment(), "Der Furz riecht, als wuerde " + furzerWER +" innerlich verfaulen.\n");
    if (i==4)
      tell_room(environment(), "Du musst Dich beinah uebergeben, als " + furzerWESSEN + " Furz in Deine Nase kriecht.\n"); 
  }
  if (alter==45) {
      tell_room(environment(), furzerWESSEN + " widerlicher Furz hat sich endlich verzogen.\n");
      destruct(this_object());
    }
}
#include "../obj/living.h" /* Pell */
reset() {	       	/* Very tough, but no law against that... /Pell */
  set_heart_beat(1);
  weapon_class=28;
  max_hp=800;
  armour_class=12;		/* Pell */
  hit_point=800;
  alignment = -750;
  level=20;			/* Pell, was 18 (american inflation...) */
  experience=962500;
  is_npc=1;
  name = "minotaur";
  cap_name = "Minotaur";
  set_living_name(name);	/* Pell */
  enable_commands();
}
Beispiel #25
0
//Added by tie to deal with attribute damages boots
varargs int attr_change(string type, int change, object who)
{
    int val; 
    if( type!="strength" && type!="courage" && type!="intelligence" &&
        type!="spirituality" && type!="composure" && type!="personality" &&
        type!="constitution" && type!="karma" && type!="agility" &&
        type!="durability" && type!="flexibility" && type!="tolerance" ) 
        error("F_DAMAGE: 伤害种类错误( 只能是 strength,courage,intelligence,spirituality,composure,personality,
constitution,karma,agility,durability,flexibility,tolerance其中之一 )。\n"); 
    if( objectp(who) ) set_temp("last_attr_from", who);
    val = (int)query("attr_apply/"+type) +change; 
    set("attr_apply/"+type, val);
    set_heart_beat(1);
    return change;
} 
Beispiel #26
0
void init()
{
	object ob, me = this_object();

	::init();

	set_heart_beat(1);

	if ( interactive(ob = this_player()) ) {
	  if ( ob->query("family/family_name") != "华山派" )
		me->kill_ob(ob);

		remove_call_out("checking");
		call_out("checking", 1, me, ob);
	}
}
Beispiel #27
0
void create()
{  
   
   set("short","¾µÔµº");
   set ("long", @LONG
¹þ¹þ¹þ , ¾µÔµº»¹Ã»×öºÃÀ² !!


LONG);
   set("light_up", 1);
	set_heart_beat(1);
  set("outdoors", "/open/gblade");
  	

 setup();
}
Beispiel #28
0
void fish_loader() {
  tp=this_player();
  ob=this_object();

  message("info","A very HUNGRY angler fish charges at you!",tp);
  message("info","A very HUNGRY angler fish charges at "+(tp->query_cap_name())+"!",environment(tp),tp);

  monster=new(MOB2"angler_fish.c");
  monster->move(environment(tp));
  monster->force_me("kill "+(tp->query_name()));
  monster->kill_ob(tp);
  this_object()->move(ROOM_CACHE);
  set_heart_beat(0);
  call_out("remove", 0);

}
Beispiel #29
0
void create ()
{
    set ("short", "天外福地");
    set ("long", @LONG
         洞天之中,还有这样一块令人感觉清静的地方,一股幽香的味道
         隐隐的从一处花丛中传来,却不知有什么样的东西藏在里面,而在这
         福地之中,透出一股令人清爽的气味,令你忘怀一切不愉快。
         LONG);
    set("outdoors", "");
    set("exits", ([ /* sizeof() == 1 */
                      "west"     : __DIR__"mon30",

                  ]));
    setup();
    set_heart_beat(1);

}
Beispiel #30
0
void create()
{
  if(!clonep(this_object())) return;
  ::create();
  SetProp(P_SHORT, 0);
  SetProp(P_LONG, 0);
  SetProp(P_INVIS,1);
  SetProp(P_NAME, "Etwas");
  SetProp(P_GENDER, 1);
  SetProp(P_ARTICLE,0);
  SetProp(P_NOGET,"Haeh?\n");
  AddId("_furz_");
  if (this_player())
    AddId("Furz_"+getuid(this_player()));
  alter = 0;
  set_heart_beat(1);
}