MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | #pragma strict_types |
| 2 | |
| 3 | inherit "/std/npc"; |
| 4 | |
| 5 | #include <properties.h> |
| 6 | #include <moving.h> |
| 7 | |
| 8 | void create() |
| 9 | { |
| 10 | if (!clonep(this_object())) return; |
| 11 | ::create(); |
| 12 | |
| 13 | SetProp(P_SHORT,"Ein Muellschlucker"); |
| 14 | SetProp(P_LONG,break_string( |
| 15 | "Der Muellschlucker gehoert zu Familie der Kleinsaurier und zeichnet "+ |
| 16 | "sich durch ein sehr grosses Maul und nahezu unbegrenzten Appetit aus. "+ |
| 17 | "Das einzige, was er nicht mag, sind Dinge, die materiellen Wert haben. "+ |
| 18 | "Alles andere kann man ihm mit 'fuettere muellschlucker mit <name>' "+ |
| 19 | "in den Rachen stopfen.",78)); |
| 20 | SetProp(P_INFO,break_string( |
| 21 | "Dieser Muellschlucker verschlingt auch lose herumliegende Dinge. Also "+ |
| 22 | "pass auf, was Du wegwirfst.",78)); |
| 23 | SetProp(P_NAME,"Muellschlucker"); |
| 24 | SetProp(P_GENDER, MALE); |
| 25 | SetProp(P_RACE,"saurier"); |
| 26 | SetProp(P_ARTICLE,1); |
| 27 | AddId(({"muellschlucker","schlucker","kleinsaurier","saurier"})); |
| 28 | create_default_npc( 1 ); |
| 29 | SetProp(P_XP,0); |
| 30 | SetProp(P_BODY,100); |
| 31 | SetProp(P_HANDS,({" mit dem alles verschlingenden Gebiss",20})); |
| 32 | SetProp(P_ALIGN, 0); |
| 33 | seteuid(getuid(this_object())); |
| 34 | SetProp(P_DEFAULT_INFO,"grunzt nur vor sich hin.\n"); |
| 35 | SetProp(P_MSGIN,"rollt herein"); |
| 36 | SetProp(P_MSGOUT,"rollt"); |
| 37 | SetProp(P_MAX_WEIGHT, 200000); |
| 38 | AddCmd(({"fuetter","fuettere"}),"haps"); |
| 39 | enable_commands(); |
| 40 | } |
| 41 | |
| 42 | int haps(string str) |
| 43 | { |
| 44 | string s1,s2; |
| 45 | object ob; |
| 46 | notify_fail("Syntax: fuettere muellschlucker mit <name>\n"); |
| 47 | if(!str)return 0; |
| 48 | if(sscanf(str,"%s mit %s",s1,s2)!=2)return 0; |
| 49 | if(!id(s1))return 0; |
| 50 | notify_fail("So etwas hast Du nicht.\n"); |
| 51 | if((!ob=present(s2,this_player())) && |
| 52 | (!ob=present(s2,environment()))) return 0; |
| 53 | if(ob->QueryProp(P_NODROP) || ob->QueryProp(P_NEVERDROP)){ |
| 54 | write("Das kannst Du nicht wegwerfen.\n"); |
| 55 | return 1; |
| 56 | } |
| 57 | if(living(ob)){ |
| 58 | write("Der Muellschlucker frisst keine Lebewesen.\n"); |
| 59 | return 1; |
| 60 | } |
| 61 | if(ob->QueryProp(P_VALUE)){ |
| 62 | write("Das ist zu wertvoll, das vertraegt der Muellschlucker nicht.\n"); |
| 63 | return 1; |
| 64 | } |
| 65 | if (ob->QueryProp(P_CURSED)) { |
| 66 | write("Verfluchte Dinge bekommen dem Muellschlucker nicht!\n"); |
| 67 | return 1; |
| 68 | } |
| 69 | ob->remove(); |
| 70 | if(ob){ |
| 71 | write("Aus irgendeinem Grund scheint das dem Muellschlucker nicht "+ |
| 72 | "zu schmecken.\n"); |
| 73 | return 1; |
| 74 | } |
| 75 | write("Mit einem lauten Ruelpsen verschlingt der Muellschlucker alles.\n"); |
| 76 | |
| 77 | return 1; |
| 78 | } |
| 79 | |
| 80 | void reset() |
| 81 | { |
| 82 | int i; |
| 83 | object *inv; |
| 84 | ::reset(); |
| 85 | |
| 86 | inv=all_inventory(this_object()); |
| 87 | if(inv && sizeof(inv)) |
| 88 | for(i=sizeof(inv)-1;i>=0;i--) |
| 89 | destruct(inv[i]); |
| 90 | command("nimm alles"); |
| 91 | } |
| 92 | |