inherit "std/mnpc"; #include #include #include #include #include #include #include "../def.h" void create() { if (!is_clone(TO)) return; ::create(); SetProp(P_SHORT, ""); SetProp(P_LONG, ""); SetProp(P_NAME, ""); SetProp(P_GENDER, MALE); SetProp(P_TEMPERATURE_RANGE, ([T_RANGE_MIN:0,T_RANGE_MAX:30])); AddId(({"", "", ""})); set_living_name(""); create_default_npc(x); SetProp(P_HANDS, ({" mit seinen Haenden",QueryProp(P_HANDS)[1],DT_BLUDGEON})); SetProp(P_MAX_HP, ); SetProp(P_BODY, ); SetProp(P_XP, QueryProp(P_XP)+y*100); // Bonus fuer Spells SetProp(P_RACE, ""); SetProp(P_SIZE, 0); SetProp(P_ALIGN, 0); SetProp(P_MAX_HANDS, 2); SetProp(P_HEAL,0); SetProp(P_AGGRESSIVE,0); SetProp(P_WIMPY, 0); SetProp(P_RESISTANCE_STRENGTHS , ([DT_FIRE: 0.0, DT_COLD: 0.0, DT_WATER: 0.0, DT_AIR: 0.0, DT_LIGHTNING: 0.0, DT_EXPLOSION: 0.0, DT_SOUND: 0.0, DT_LIGHT: 0.0, DT_ELECTRIC: 0.0, DT_ACID: 0.0, DT_POISON: 0.0, DT_TERROR: 0.0, DT_HOLY: 0.0, DT_UNHOLY: 0.0, DT_MAGIC: 0.0 ]) ); // SetProp(P_ARTICLE, 0); SetProp(P_NOMAGIC,0); SetProp(P_MSGIN, "kommt an"); SetProp(P_MSGOUT, "geht"); SetProp(P_MMSGIN, "erscheint in einer Rauchwolke"); SetProp(P_MMSGOUT, "verschwindet mit Knall und Schwefelduft"); SetProp(P_MNPC_AREA, (ROOM) ); SetProp(P_MNPC_WAIT, ({ 10, 30, 30 })); SetProp(P_MNPC_DEFAULTROOM, ROOM ""); SetProp(P_MNPC_FLAGS, MOV_OUTDOORS + MOV_MOVES + MOV_BACKWARDS); SetProp(P_DIE_MSG, " faellt tot zu Boden.\n"); SetProp(P_NOCORPSE, 0 ); SetProp(P_MURDER_MSG, "Ich komme wieder!"); SetProp(P_KILL_NAME, "Killer-NPC"); SetProp(P_KILL_MSG, "Du hattest keine Chance!"); AddInfo(DEFAULT_INFO, "versteht Dich doch gar nicht.\n"); AddInfo("zordan", "Zordan hat mich erschaffen.","sagt: "); AddInfo( ({"",""}), ".", "sagt: "); SetProp(P_LOG_INFO, "npc_logfile"); SetProp( P_REJECT, ({ REJECT_DROP, " will Deine Sachen nicht tragen.\n" }) ); SetProp(P_SPELLRATE,0); AddSpell(1,0, ".\n", ".\n", DT_,([SP_SHOW_DAMAGE:1])); SetChats(3, ({ ".\n"}) ); SetAttackChats(10, ({ ".\n"}) ); SUID; CLONEME(WEAPON "" ); command("zuecke waffe"); CLONEME(ARMOUR "" ); command("trage alles"); } // Mitloggen wenn einen Spieler den NPC killt: void die(int poisondeath) { write_file(LOG "npc.kills", ctime()+": "+CAP(getuid(PL))+" killt den NPC.\n"); ::die(poisondeath); } void NotifyPlayerDeath(object player, object killer, int lostexp) { if(killer == ME) write_file(LOG "npc.deads", ctime()+": Der NPC hat gerade "+CAP(getuid(player))+" umgebracht.\n"); } // int _query_wimpy() { return 0; } // Reactions void StartReaction(string verb, string gruppe, string adverb, int touch) { if (find_call_out("reaction") != -1) return; switch (gruppe) { case "aengstlich": call_out("reaction", 0, TP, "", ""); break; case "aergerlich": call_out("reaction", 0, TP, "", ""); break; case "albern": call_out("reaction", 0, TP, "", ""); break; case "fies": call_out("reaction", 0, TP, "", ""); break; case "frech": call_out("reaction", 0, TP, "", ""); break; case "froh": call_out("reaction", 0, TP, "", ""); break; case "intim": call_out("reaction", 0, TP, "", ""); break; case "nett": call_out("reaction", 0, TP, "", ""); break; case "neutral": call_out("reaction", 0, TP, "", ""); break; case "traurig": call_out("reaction", 0, TP, "", ""); break; } } void StartReactionAll(string verb, string gruppe, string adverb, int touch) { return StartReaction(verb, gruppe, adverb, touch); } void reaction(object ob, string macher, string andere) { if (present(ob, ENV(TO))) { tell_object(ob, BS(Name(WER, 1)+" "+macher)); tell_room(ENV(TO), BS(Name(WER, 1)+" "+andere), ({ob})); } }