#include <config.h>#include <properties.h>#include <ansi.h>#include <wizlevels.h>#include <living.h>#include <language.h>#include <attributes.h>#include <defines.h>#include <health.h>#include <npc.h>#include <moving.h>#include <guard.h>
gehe zum Quellcode dieser Datei
Funktionen | |
| static int | _set_level (int arg) |
| protected void | create () |
| protected void | create_super () |
| void | reset () |
| varargs void | create_default_npc (int level, int maxhp) |
| protected void | heart_beat () |
| void | give_notify (object ob) |
| int | command_me (string cmd) |
| void | init () |
| void | catch_tell (string str) |
| protected void | NotifyMove (object dest, object oldenv, int method) |
| string | _query_race () |
Variablen | |
| inherit std thing | properties |
| inherit std | hook_provider |
| inherit std living | description |
| inherit std living | life |
| inherit std living | attributes |
| inherit std living | moving |
| inherit std living | skill_attributes |
| inherit std living | skills |
| inherit std living | clothing |
| inherit std npc | combat |
| inherit std npc | chat |
| inherit std npc | comm |
| inherit std container | restrictions |
| inherit std thing | commands |
| inherit std thing | language |
| inherit std npc | info |
| inherit std npc | put_and_get |
| inherit std npc | items |
| inherit std thing | envchk |
| string _query_race | ( | ) |
| static int _set_level | ( | int | arg | ) | [static] |
Definiert in Zeile 110 der Datei npc.c.
Benutzt A_CON, A_DEX, A_INT, A_STR, P_LEVEL, Set() und SetAttr().
00111 { 00112 Set(P_LEVEL, arg); 00113 SetAttr(A_CON, arg); 00114 SetAttr(A_DEX, arg); 00115 SetAttr(A_INT, arg); 00116 SetAttr(A_STR, arg); 00117 return(arg); //Rueckgabewert noetig! 00118 }

| int command_me | ( | string | cmd | ) |
| protected void create | ( | ) |
Definiert in Zeile 50 der Datei npc.c.
Benutzt add_put_and_get_commands(), add_team_commands(), create(), heartbeat, NEUTER, NO_TPORT_IN, P_ALCOHOL, P_DRINK, P_FOOD, P_GENDER, P_GUARD, P_HANDS, P_HP, P_LIGHT_MODIFIER, P_MAX_ALCOHOL, P_MAX_DRINK, P_MAX_FOOD, P_MAX_HANDS, P_MAX_HP, P_MAX_SP, P_MAX_WEIGHT, P_MMSGIN, P_MMSGOUT, P_MSGIN, P_MSGOUT, P_NAME, P_NO_TPORT, P_NPC, P_RACE, P_SP, P_WEIGHT, P_WEIGHT_PERCENT und SetProp().
00051 { 00052 seteuid(getuid()); 00053 properties::create(); 00054 restrictions::create(); 00055 commands::create(); 00056 description::create(); 00057 attributes::create(); 00058 clothing::create(); 00059 life::create(); 00060 enable_commands(); 00061 comm::create(); 00062 combat::create(); 00063 info::create(); 00064 put_and_get::add_put_and_get_commands(); 00065 add_team_commands(); 00066 items::create(); 00067 envchk::create(); 00068 add_action("UseSpell","",1); 00069 00070 SetProp(P_LIGHT_MODIFIER, 1); 00071 SetProp(P_WEIGHT_PERCENT, 100); 00072 SetProp(P_NAME, "Niemand"); 00073 SetProp(P_MSGIN, "kommt an"); 00074 SetProp(P_MSGOUT, "geht"); 00075 SetProp(P_MMSGIN, "erscheint in einer Rauchwolke"); 00076 SetProp(P_MMSGOUT, "verschwindet mit Knall und Schwefelduft"); 00077 SetProp(P_GENDER, NEUTER ); 00078 SetProp(P_WEIGHT, 75000); 00079 SetProp(P_MAX_WEIGHT, 50000); 00080 SetProp(P_RACE, "Npc"); 00081 SetProp(P_MAX_HP,100); 00082 SetProp(P_MAX_SP,100); 00083 SetProp(P_HP,50); 00084 SetProp(P_SP,50); 00085 SetProp(P_MAX_ALCOHOL,100); 00086 SetProp(P_MAX_DRINK,100); 00087 SetProp(P_MAX_FOOD,100); 00088 SetProp(P_DRINK, 0); 00089 SetProp(P_FOOD, 0); 00090 SetProp(P_ALCOHOL, 0); 00091 SetProp(P_HANDS, ({ "", 30 }) ); 00092 SetProp(P_MAX_HANDS, 2); 00093 SetProp(P_NPC, 1); 00094 SetProp(P_GUARD,100); 00095 SetProp(P_NO_TPORT,NO_TPORT_IN); 00096 00097 set_heart_beat(1); 00098 heartbeat=1; 00099 }

| varargs void create_default_npc | ( | int | level, | |
| int | maxhp | |||
| ) |
Definiert in Zeile 120 der Datei npc.c.
Benutzt P_BODY, P_HANDS, P_LEVEL, P_MAX_HP, P_MAX_SP, P_XP und SetProp().
Wird benutzt von create().
00121 { 00122 if(level < 1) return; 00123 SetProp(P_LEVEL, level); 00124 if (maxhp<=0) maxhp = 42 + level*8; 00125 SetProp(P_MAX_HP, maxhp); 00126 SetProp(P_MAX_SP, maxhp); 00127 SetProp(P_HANDS, ({" mit blossen Haenden", level*10 }) ); 00128 SetProp(P_BODY, (level*20)/3); 00129 SetProp(P_XP, level * maxhp * 50); 00130 }


| protected void create_super | ( | ) |
Definiert in Zeile 101 der Datei npc.c.
Benutzt set_next_reset().
00101 { 00102 set_next_reset(-1); 00103 }

| void give_notify | ( | object | ob | ) |
Definiert in Zeile 140 der Datei npc.c.
Benutzt give_notify().
00141 { 00142 put_and_get::give_notify(ob); 00143 }

| protected void heart_beat | ( | ) |
Definiert in Zeile 132 der Datei npc.c.
Benutzt heart_beat().
00133 { 00134 if( environment() ) life::heart_beat(); 00135 if (!this_object()) return; // Evtl. an Gift gestorben... 00136 combat::heart_beat(); 00137 chat::heart_beat(); 00138 }

| void init | ( | ) |
Definiert in Zeile 148 der Datei npc.c.
Benutzt init().
00149 { 00150 combat::init(); 00151 info::init(); 00152 commands::init(); 00153 // description::init(); 00154 }

| protected void NotifyMove | ( | object | dest, | |
| object | oldenv, | |||
| int | method | |||
| ) |
Definiert in Zeile 160 der Datei npc.c.
Benutzt _clone_items(), F_VALUE, NotifyMove(), NPC_NEEDS_ITEM_INIT und Query().
00160 { 00161 00162 ::NotifyMove(dest, oldenv, method); 00163 // gestorben? 00164 if (!objectp(this_object())) return; 00165 00166 if ( Query(NPC_NEEDS_ITEM_INIT, F_VALUE)) 00167 _clone_items(); 00168 }

| void reset | ( | void | ) |
Definiert in Zeile 105 der Datei npc.c.
Benutzt reset().
00105 { 00106 items::reset(); 00107 combat::reset(); 00108 }

| inherit std living attributes |
Definiert in Zeile 25 der Datei npc.c.
Wird benutzt von clear_tell_history() und tmhist().
| inherit std living description |
| inherit std hook_provider |
| inherit std thing properties |
| inherit std npc put_and_get |
| inherit std container restrictions |
| inherit std living skill_attributes |
| inherit std living skills |
Definiert in Zeile 22 der Datei npc.c.
Wird benutzt von AddSkill(), AddSpell(), austreten() und SkillListe().
1.6.3