int knifeGoPoof(){ object owner; if(environment()){ owner = environment(); if(this_object()->GetWielded()) this_object()->eventUnequip(owner); } message( "my_action", "%^BOLD%^The knife shimmers then vanishes!%^RESET%^", owner); if(owner->is_living()){ message( "other_action", "%^WHITE%^"+ owner->GetName()+" jumps in surprise at a " "shimmering light emitted from something "+ nominative(owner)+" was carrying.%^RESET%^", environment(owner), owner); this_object()->eventDestruct(); } return 1; }
int cmd_trip(string str) { int dmg; object ob, env, tp; if (!abil()) return notify_fail("What?\n"); env = environment(this_player()); tp = this_player(); if (!str) ob = this_player()->query_current_attacker(); else ob = present(str, env); if (!ob || !ob->is_living()) return notify_fail("You do not see that here.\n"); if (ob==this_player()) return notify_fail("You trip and fall down.\n"); if(this_player()->query_ghost()) return notify_fail("Hard to trip without a body..\n"); if (this_player()->query_disable()) return notify_fail("You are not oriented enough to do this.\n"); if (environment(this_player())->query_property("no attack")) return notify_fail("Greater powers prevent your malice.\n"); if ((int)this_player()->query_sp() < 20) return notify_fail("You are too tired.\n"); if (ob->query_rest_type() == SIT) return notify_fail(ob->query_cap_name()+" is already on the ground!\n"); if(!this_player()->kill_ob(ob)) { write(ob->query_cap_name()+" can't be attacked by you yet."); return 1; } tp->set_disable(); dmg = tp->query_stats("dexterity"); dmg -= (ob->query_stats("dexterity") / 2); if (dmg < random(25)) { write("You spin at "+ob->query_cap_name()+" and miss "+nominative(ob)+" and fall to the ground."); message("info", tp->query_cap_name()+" spins around on the ground and tries to trip you but misses and falls to the ground.", ob); message("info", tp->query_cap_name()+" spins around on the ground and tries to trip "+ob->query_cap_name()+" but misses and falls to the ground.",environment(ob), ({ tp, ob }));
mixed cmd(string str) { object target; int arch = adminp(this_player()); int ret, curr; if(!sizeof(str)) str = "me"; if(str == "me") str = this_player()->GetKeyName(); if(!target = present(str, environment(this_player()))){ if(arch && (target = find_player(str))){ write("User found."); } else { write("They're not here."); return 1; } } if(living(target) && !arch && target != this_player()){ write("You can only unanchor yourself with this command."); return 1; } if(!(curr = target->GetAnchored())){ if(target != this_player()) str = nominative(target)+"'s"; else str = "You're "; write(capitalize(str) + " already unanchored."); return 1; } ret = target->SetAnchored(0); if(ret == curr){ write("Nothing happens"); return 1; } if(target != this_player()){ tell_object(target, capitalize(this_player()->GetName())+ " unanchors you."); } else str = "yourself"; write("You unanchor "+str+"."); return 1; }
int cmd_palmread(string who) { object tp=this_player(); object tgt; object *inv; int skill, i; int deaths, age, marriages; int kills, quests, str, wis; if (!abil()) { message("info","What?",tp); return 1; } if (!who) { message("info","Read whose palm?",tp); return 1; } if (tp->query_mp() < 30) { message("info","Not enough magic.",tp); return 1; } if (tp->query_disable()) { message("info","You are busy.",tp); return 1; } if (tp->query_current_attacker()) { message("info","You are too busy fighting.",tp); return 1; } tgt=present(who,environment(tp)); if (!tgt) { message("info","You don't see "+who+" here.",tp); return 1; } if (!userp(tgt)) { message("info","You cannot read the palm of "+tgt->query_cap_name()+".", tp); return 1; } if (tgt->query_current_attacker()) { message("info",nominative(tgt)+" is too caught up in battle to show " "you "+possessive(tgt)+" palm.",tp); return 1; } // these races either don't have hands, or have some kind of hand // without normal skin on it if (tgt->query_race() == "dragon" || tgt->query_race() == "lich" || tgt->query_race() == "raknid") { message("info","That creature does not have a palm.",tp); return 1; } // if their hands are both severed we can't read them very well.. if (member_array("right hand",tgt->query_limbs()) == -1 && member_array("left hand",tgt->query_limbs()) == -1) { message("info",nominative(tgt)+" has only stumps where "+possessive(tgt)+ " hands should be.",tp); return 1; } if (tgt == tp) { message("info","You look over your own palm...\n",tp); message("info",tp->query_cap_name()+" examines "+possessive(tp)+" palm.", environment(tp), tp); } else { message("info","You look over "+tgt->query_cap_name()+"'s palm...\n",tp); message("info",tp->query_cap_name()+" examines the palm of your hand.",tgt); message("info",tp->query_cap_name()+" examines the palm of "+ tgt->query_cap_name()+"'s hand.", environment(tp), ({ tgt, tp }) ); }
inherit MONSTER; void set_trap(object to); void create() { mapping inv; ::create(); set_name("weimic hunter"); set_race("weimic"); set_body_type("weimic"); set_gender(({"male","female","female"})[random(3)]); set_id(({"weimic","hunter", "weimic hunter"})); set_short("weimic hunter"); set_long("A nomad of the plains, this weimic is clad in " "only a leather tunic that marks "+objective(query_gender())+ "as a hunter. "+nominative(query_gender())+" has a sleek " "feline body with sun-bleached yellow fur, and a muscular " "human torso."); set_property("autobag", "bag"); set_class("fighter"); set_subclass("ranger"); set_level(40+random(3)); set_skill("nature", 250); set_skill("stealth", 100); set_spells(({"throw spear", "spear", "impale", "spear"})); set_spell_chance(33); inv = ([