MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | inherit "std/npc"; |
| 2 | #include <properties.h> |
| 3 | #include <language.h> |
| 4 | |
| 5 | int warte; |
| 6 | |
| 7 | create() |
| 8 | { |
| 9 | if (!clonep(this_object())) return; |
| 10 | ::create(); |
| 11 | SetProp(P_NAME, "Testmonster"); |
| 12 | SetProp(P_GENDER, NEUTER); |
| 13 | SetProp(P_SHORT, "Das Testmonster - nervtoetend -"); |
| 14 | SetProp(P_ALIGN, 100); |
| 15 | SetProp(P_LONG, |
| 16 | "Dies ist Testie, das Testmonster. Es hatte alle moeglichen, uebel aussehenden\n"+ |
| 17 | "Testgeraete dabei. Leg Dich lieber nicht mit ihm an ...\n"); |
| 18 | AddId("monster"); |
| 19 | AddId("testmonster"); |
| 20 | AddId("testie"); |
| 21 | SetProp(P_RACE, "tester"); |
| 22 | SetProp(P_LEVEL, 19); |
| 23 | SetProp(P_MAX_HP, 275); |
| 24 | SetProp(P_HP, 275); |
| 25 | SetProp(P_XP, 0); |
| 26 | SetProp(P_HANDS, ({" mit einem Spannungspruefer", 5}) ); |
| 27 | SetProp(P_AC, 1); |
| 28 | seteuid(getuid(this_object())); |
| 29 | AddSpell(1,5,"Ein Testmonster schlaegt Dir ein Testheft um die Ohren.\n", |
| 30 | "Ein Testmonster schlaegt @WEN mit einem Testheft.\n"); |
| 31 | AddSpell(1,8,"Ein Testmonster testet Deine Reaktion auf Hitze.\n", |
| 32 | "Ein Testmonster haelt ein Feuerzeug unter @WESSEN Hintern.\n"); |
| 33 | AddSpell(1,11,"Ein Testmonster testet Deine Reaktion auf elektrischen Strom.\n", |
| 34 | "Ein Testmonster verpasst @WEM einen Elektroschock.\n"); |
| 35 | AddSpell(1,15,"Ein Testmonster testet Deine Saeurebestaendigkeit.\n", |
| 36 | "Ein Testmonster ueberschuettet @WEN mit konzentrierter Saeure.\n"); |
| 37 | AddSpell(1,10,"Ein Testmonster nimmt eine Blutprobe von Dir.\n", |
| 38 | "Ein Testmonster sticht @WEN mit einer gigantischen Nadel.\n"); |
| 39 | SetProp(P_SPELLRATE,50); |
| 40 | warte=10; |
| 41 | } |
| 42 | |
| 43 | give_notify(obj) |
| 44 | { |
| 45 | write("Danke fuer "+obj->name(WEN, 1)+".\n"); |
| 46 | return 1; |
| 47 | } |
| 48 | |
| 49 | catch_tell(str) |
| 50 | { |
| 51 | string s1, s2; |
| 52 | |
| 53 | if (!str || str=="") return; |
| 54 | if (sscanf(str,"%s tritt%sTestmonster",s1,s2)) |
| 55 | { |
| 56 | say_str(capitalize(name())+" sagt: Aua, wieso trittst Du mich, "+s1+"?\n"); |
| 57 | return; |
| 58 | } |
| 59 | if (sscanf(str,"%s sagt: %s",s1,s2)) |
| 60 | { |
| 61 | if (!s2) s2=" "; |
| 62 | s2=old_explode(s2,"\n"); |
| 63 | if (sizeof(s2)) |
| 64 | s2=implode(s2," "); |
| 65 | else |
| 66 | return; |
| 67 | say_str(capitalize(name())+" sagt: Wieso sagst Du \""+s2+"\", "+s1+"? \n"); |
| 68 | return; |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | say_str(str) |
| 73 | { |
| 74 | call_out("do_say",0,str); |
| 75 | } |
| 76 | |
| 77 | do_say(str) |
| 78 | { |
| 79 | say(str); |
| 80 | } |
| 81 | |
| 82 | heart_beat() |
| 83 | { |
| 84 | ::heart_beat(); |
| 85 | warte--; |
| 86 | if (warte) return; |
| 87 | warte=8; |
| 88 | Flee(); |
| 89 | } |