#include <properties.h>#include <moving.h>
gehe zum Quellcode dieser Datei
Funktionen | |
| void | create () |
| int | haps (string str) |
| void | reset () |
Variablen | |
| inherit std | npc |
| void create | ( | ) |
Definiert in Zeile 8 der Datei entsorg.c.
Benutzt AddCmd(), AddId(), break_string(), create(), create_default_npc(), MALE, P_ALIGN, P_ARTICLE, P_BODY, P_DEFAULT_INFO, P_GENDER, P_HANDS, P_INFO, P_LONG, P_MAX_WEIGHT, P_MSGIN, P_MSGOUT, P_NAME, P_RACE, P_SHORT, P_XP und SetProp().
00009 { 00010 if (!clonep(this_object())) return; 00011 ::create(); 00012 00013 SetProp(P_SHORT,"Ein Muellschlucker"); 00014 SetProp(P_LONG,break_string( 00015 "Der Muellschlucker gehoert zu Familie der Kleinsaurier und zeichnet "+ 00016 "sich durch ein sehr grosses Maul und nahezu unbegrenzten Appetit aus. "+ 00017 "Das einzige, was er nicht mag, sind Dinge, die materiellen Wert haben. "+ 00018 "Alles andere kann man ihm mit 'fuettere muellschlucker mit <name>' "+ 00019 "in den Rachen stopfen.",78)); 00020 SetProp(P_INFO,break_string( 00021 "Dieser Muellschlucker verschlingt auch lose herumliegende Dinge. Also "+ 00022 "pass auf, was Du wegwirfst.",78)); 00023 SetProp(P_NAME,"Muellschlucker"); 00024 SetProp(P_GENDER, MALE); 00025 SetProp(P_RACE,"saurier"); 00026 SetProp(P_ARTICLE,1); 00027 AddId(({"muellschlucker","schlucker","kleinsaurier","saurier"})); 00028 create_default_npc( 1 ); 00029 SetProp(P_XP,0); 00030 SetProp(P_BODY,100); 00031 SetProp(P_HANDS,({" mit dem alles verschlingenden Gebiss",20})); 00032 SetProp(P_ALIGN, 0); 00033 seteuid(getuid(this_object())); 00034 SetProp(P_DEFAULT_INFO,"grunzt nur vor sich hin.\n"); 00035 SetProp(P_MSGIN,"rollt herein"); 00036 SetProp(P_MSGOUT,"rollt"); 00037 SetProp(P_MAX_WEIGHT, 200000); 00038 AddCmd(({"fuetter","fuettere"}),"haps"); 00039 enable_commands(); 00040 }

| int haps | ( | string | str | ) |
Definiert in Zeile 42 der Datei entsorg.c.
Benutzt notify_fail(), ob(), P_CURSED, P_NEVERDROP, P_NODROP und P_VALUE.
00043 { 00044 string s1,s2; 00045 object ob; 00046 notify_fail("Syntax: fuettere muellschlucker mit <name>\n"); 00047 if(!str)return 0; 00048 if(sscanf(str,"%s mit %s",s1,s2)!=2)return 0; 00049 if(!id(s1))return 0; 00050 notify_fail("So etwas hast Du nicht.\n"); 00051 if((!ob=present(s2,this_player())) && 00052 (!ob=present(s2,environment()))) return 0; 00053 if(ob->QueryProp(P_NODROP) || ob->QueryProp(P_NEVERDROP)){ 00054 write("Das kannst Du nicht wegwerfen.\n"); 00055 return 1; 00056 } 00057 if(living(ob)){ 00058 write("Der Muellschlucker frisst keine Lebewesen.\n"); 00059 return 1; 00060 } 00061 if(ob->QueryProp(P_VALUE)){ 00062 write("Das ist zu wertvoll, das vertraegt der Muellschlucker nicht.\n"); 00063 return 1; 00064 } 00065 if (ob->QueryProp(P_CURSED)) { 00066 write("Verfluchte Dinge bekommen dem Muellschlucker nicht!\n"); 00067 return 1; 00068 } 00069 ob->remove(); 00070 if(ob){ 00071 write("Aus irgendeinem Grund scheint das dem Muellschlucker nicht "+ 00072 "zu schmecken.\n"); 00073 return 1; 00074 } 00075 write("Mit einem lauten Ruelpsen verschlingt der Muellschlucker alles.\n"); 00076 00077 return 1; 00078 }

| void reset | ( | void | ) |
Definiert in Zeile 80 der Datei entsorg.c.
Benutzt command, destruct(), i, inv() und reset().
00081 { 00082 int i; 00083 object *inv; 00084 ::reset(); 00085 00086 inv=all_inventory(this_object()); 00087 if(inv && sizeof(inv)) 00088 for(i=sizeof(inv)-1;i>=0;i--) 00089 destruct(inv[i]); 00090 command("nimm alles"); 00091 }

1.6.3