version 1.30 | | version 1.31 |
---|
| | |
/* | | /* |
* static char *rcsid_plugins_c = | | * static char *rcsid_plugins_c = |
* "$Id: plugins.c,v 1.30 2004/10/18 06:35:38 akirschbaum Exp $"; | | * "$Id: plugins.c,v 1.31 2004/10/19 20:31:32 akirschbaum Exp $"; |
*/ | | */ |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
int tmp = j; | | int tmp = j; |
HookParm.Value[0] = &tmp; | | HookParm.Value[0] = &tmp; |
HookParm.Value[1] = HookList[j]; | | HookParm.Value[1] = HookList[j]; |
/*switch(j) | | |
{ | | |
case HOOK_NONE: | | |
break; | | |
case HOOK_LOG: | | |
HookParm->Value[1] = &CFWLog; | | |
break; | | |
case HOOK_NEWINFOMAP: | | |
HookParm->Value[1] = &CFWNewInfoMap; | | |
break; | | |
case HOOK_SPRINGTRAP: | | |
HookParm->Value[1] = &CFWSpringTrap; | | |
break; | | |
case HOOK_CASTSPELL: | | |
HookParm->Value[1] = &CFWCastSpell; | | |
break; | | |
case HOOK_CMDRSKILL: | | |
HookParm->Value[1] = &CFWCmdRSkill; | | |
break; | | |
case HOOK_BECOMEFOLLOWER: | | |
HookParm->Value[1] = &CFWBecomeFollower; | | |
break; | | |
case HOOK_PICKUP: | | |
HookParm->Value[1] = &CFWPickup; | | |
break; | | |
case HOOK_GETMAPOBJECT: | | |
HookParm->Value[1] = &CFWGetMapObject; | | |
break; | | |
case HOOK_ESRVSENDITEM: | | |
HookParm->Value[1] = &CFWESRVSendItem; | | |
break; | | |
case HOOK_FINDPLAYER: | | |
HookParm->Value[1] = &CFWFindPlayer; | | |
break; | | |
case HOOK_MANUALAPPLY: | | |
HookParm->Value[1] = &CFWManualApply; | | |
break; | | |
case HOOK_CMDDROP: | | |
HookParm->Value[1] = &CFWCmdDrop; | | |
break; | | |
case HOOK_CMDTAKE: | | |
HookParm->Value[1] = &CFWCmdTake; | | |
break; | | |
case HOOK_CMDTITLE: | | |
HookParm->Value[1] = &CFWCmdTitle; | | |
break; | | |
case HOOK_TRANSFEROBJECT: | | |
HookParm->Value[1] = &CFWTransferObject; | | |
break; | | |
case HOOK_KILLOBJECT: | | |
HookParm->Value[1] = &CFWKillObject; | | |
break; | | |
case HOOK_LEARNSPELL: | | |
HookParm->Value[1] = &CFWDoLearnSpell; | | |
break; | | |
case HOOK_FORGETSPELL: | | |
HookParm->Value[1] = &CFWDoForgetSpell; | | |
break; | | |
case HOOK_CHECKFORSPELL: | | |
HookParm->Value[1] = &CFWCheckSpellKnown; | | |
break; | | |
case HOOK_ESRVSENDINVENTORY: | | |
HookParm->Value[1] = &CFWESRVSendInventory; | | |
break; | | |
case HOOK_CREATEARTIFACT: | | |
HookParm->Value[1] = &CFWCreateArtifact; | | |
break; | | |
case HOOK_GETARCHETYPE: | | |
HookParm->Value[1] = &CFWGetArchetype; | | |
break; | | |
case HOOK_UPDATESPEED: | | |
HookParm->Value[1] = &CFWUpdateSpeed; | | |
break; | | |
case HOOK_UPDATEOBJECT: | | |
HookParm->Value[1] = &CFWUpdateObject; | | |
break; | | |
case HOOK_FINDANIMATION: | | |
HookParm->Value[1] = &CFWFindAnimation; | | |
break; | | |
case HOOK_GETARCHBYOBJNAME: | | |
HookParm->Value[1] = &CFWGetArchetypeByObjectName; | | |
break; | | |
case HOOK_INSERTOBJECTINMAP: | | |
HookParm->Value[1] = &CFWInsertObjectInMap; | | |
break; | | |
case HOOK_READYMAPNAME: | | |
HookParm->Value[1] = &CFWReadyMapName; | | |
break; | | |
case HOOK_ADDEXP: | | |
HookParm->Value[1] = &CFWAddExp; | | |
break; | | |
case HOOK_DETERMINEGOD: | | |
HookParm->Value[1] = &CFWDetermineGod; | | |
break; | | |
case HOOK_FINDGOD: | | |
HookParm->Value[1] = &CFWFindGod; | | |
break; | | |
case HOOK_DUMPOBJECT: | | |
HookParm->Value[1] = &CFWDumpObject; | | |
break; | | |
case HOOK_LOADOBJECT: | | |
HookParm->Value[1] = &CFWLoadObject; | | |
break; | | |
case HOOK_REGISTEREVENT: | | |
HookParm->Value[1] = &RegisterGlobalEvent; | | |
break; | | |
case HOOK_UNREGISTEREVENT: | | |
HookParm->Value[1] = &UnregisterGlobalEvent; | | |
break; | | |
case HOOK_REMOVEOBJECT: | | |
HookParm->Value[1] = &CFWRemoveObject; | | |
break; | | |
case HOOK_ADDSTRING: | | |
HookParm->Value[1] = &CFWAddString; | | |
break; | | |
case HOOK_ADDREFCOUNT: | | |
HookParm->Value[1] = &CFWAddRefcount; | | |
break; | | |
case HOOK_FREESTRING: | | |
HookParm->Value[1] = &CFWFreeString; | | |
break; | | |
case HOOK_GETFIRSTMAP: | | |
HookParm->Value[1] = &CFWGetFirstMap; | | |
break; | | |
case HOOK_GETFIRSTPLAYER: | | |
HookParm->Value[1] = &CFWGetFirstPlayer; | | |
break; | | |
case HOOK_GETFIRSTARCHETYPE: | | |
HookParm->Value[1] = &CFWGetFirstArchetype; | | |
break; | | |
case HOOK_QUERYCOST: | | |
HookParm->Value[1] = &CFWQueryCost; | | |
break; | | |
case HOOK_QUERYMONEY: | | |
HookParm->Value[1] = &CFWQueryMoney; | | |
break; | | |
case HOOK_PAYFORITEM: | | |
HookParm->Value[1] = &CFWPayForItem; | | |
break; | | |
case HOOK_PAYFORAMOUNT: | | |
HookParm->Value[1] = &CFWPayForAmount; | | |
break; | | |
case HOOK_NEWDRAWINFO: | | |
HookParm->Value[1] = &CFWNewDrawInfo; | | |
break; | | |
case HOOK_MOVEPLAYER: | | |
HookParm->Value[1] = &CFWMovePlayer; | | |
break; | | |
case HOOK_MOVEOBJECT: | | |
HookParm->Value[1] = &CFWMoveObject; | | |
break; | | |
};*/ | | |
| | |
/* Serious bug, fix this in all local copies */ | | |
/* HookParm->dparm = 2044; */ | | |
PlugList[PlugNR].hookfunc(&HookParm); | | PlugList[PlugNR].hookfunc(&HookParm); |
}; | | }; |
}; | | }; |
| | |
int tmp = j; | | int tmp = j; |
HookParm.Value[0] = &tmp; | | HookParm.Value[0] = &tmp; |
HookParm.Value[1] = HookList[j]; | | HookParm.Value[1] = HookList[j]; |
/*switch(j) | | |
{ | | |
case HOOK_NONE: | | |
break; | | |
case HOOK_LOG: | | |
HookParm->Value[1] = &CFWLog; | | |
break; | | |
case HOOK_NEWINFOMAP: | | |
HookParm->Value[1] = &CFWNewInfoMap; | | |
break; | | |
case HOOK_SPRINGTRAP: | | |
HookParm->Value[1] = &CFWSpringTrap; | | |
break; | | |
case HOOK_CASTSPELL: | | |
HookParm->Value[1] = &CFWCastSpell; | | |
break; | | |
case HOOK_CMDRSKILL: | | |
HookParm->Value[1] = &CFWCmdRSkill; | | |
break; | | |
case HOOK_BECOMEFOLLOWER: | | |
HookParm->Value[1] = &CFWBecomeFollower; | | |
break; | | |
case HOOK_PICKUP: | | |
HookParm->Value[1] = &CFWPickup; | | |
break; | | |
case HOOK_GETMAPOBJECT: | | |
HookParm->Value[1] = &CFWGetMapObject; | | |
break; | | |
case HOOK_ESRVSENDITEM: | | |
HookParm->Value[1] = &CFWESRVSendItem; | | |
break; | | |
case HOOK_FINDPLAYER: | | |
HookParm->Value[1] = &CFWFindPlayer; | | |
break; | | |
case HOOK_MANUALAPPLY: | | |
HookParm->Value[1] = &CFWManualApply; | | |
break; | | |
case HOOK_CMDDROP: | | |
HookParm->Value[1] = &CFWCmdDrop; | | |
break; | | |
case HOOK_CMDTAKE: | | |
HookParm->Value[1] = &CFWCmdTake; | | |
break; | | |
case HOOK_CMDTITLE: | | |
HookParm->Value[1] = &CFWCmdTitle; | | |
break; | | |
case HOOK_TRANSFEROBJECT: | | |
HookParm->Value[1] = &CFWTransferObject; | | |
break; | | |
case HOOK_KILLOBJECT: | | |
HookParm->Value[1] = &CFWKillObject; | | |
break; | | |
case HOOK_LEARNSPELL: | | |
HookParm->Value[1] = &CFWDoLearnSpell; | | |
break; | | |
case HOOK_FORGETSPELL: | | |
HookParm->Value[1] = &CFWDoForgetSpell; | | |
break; | | |
case HOOK_CHECKFORSPELL: | | |
HookParm->Value[1] = &CFWCheckSpellKnown; | | |
break; | | |
case HOOK_ESRVSENDINVENTORY: | | |
HookParm->Value[1] = &CFWESRVSendInventory; | | |
break; | | |
case HOOK_CREATEARTIFACT: | | |
HookParm->Value[1] = &CFWCreateArtifact; | | |
break; | | |
case HOOK_GETARCHETYPE: | | |
HookParm->Value[1] = &CFWGetArchetype; | | |
break; | | |
case HOOK_UPDATESPEED: | | |
HookParm->Value[1] = &CFWUpdateSpeed; | | |
break; | | |
case HOOK_UPDATEOBJECT: | | |
HookParm->Value[1] = &CFWUpdateObject; | | |
break; | | |
case HOOK_FINDANIMATION: | | |
HookParm->Value[1] = &CFWFindAnimation; | | |
break; | | |
case HOOK_GETARCHBYOBJNAME: | | |
HookParm->Value[1] = &CFWGetArchetypeByObjectName; | | |
break; | | |
case HOOK_INSERTOBJECTINMAP: | | |
HookParm->Value[1] = &CFWInsertObjectInMap; | | |
break; | | |
case HOOK_READYMAPNAME: | | |
HookParm->Value[1] = &CFWReadyMapName; | | |
break; | | |
case HOOK_ADDEXP: | | |
HookParm->Value[1] = &CFWAddExp; | | |
break; | | |
case HOOK_DETERMINEGOD: | | |
HookParm->Value[1] = &CFWDetermineGod; | | |
break; | | |
case HOOK_FINDGOD: | | |
HookParm->Value[1] = &CFWFindGod; | | |
break; | | |
case HOOK_DUMPOBJECT: | | |
HookParm->Value[1] = &CFWDumpObject; | | |
break; | | |
case HOOK_LOADOBJECT: | | |
HookParm->Value[1] = &CFWLoadObject; | | |
break; | | |
case HOOK_REGISTEREVENT: | | |
HookParm->Value[1] = &RegisterGlobalEvent; | | |
break; | | |
case HOOK_UNREGISTEREVENT: | | |
HookParm->Value[1] = &UnregisterGlobalEvent; | | |
break; | | |
case HOOK_REMOVEOBJECT: | | |
HookParm->Value[1] = &CFWRemoveObject; | | |
break; | | |
case HOOK_ADDSTRING: | | |
HookParm->Value[1] = &CFWAddString; | | |
break; | | |
case HOOK_ADDREFCOUNT: | | |
HookParm->Value[1] = &CFWAddRefcount; | | |
break; | | |
case HOOK_FREESTRING: | | |
HookParm->Value[1] = &CFWFreeString; | | |
break; | | |
case HOOK_GETFIRSTMAP: | | |
HookParm->Value[1] = &CFWGetFirstMap; | | |
break; | | |
case HOOK_GETFIRSTPLAYER: | | |
HookParm->Value[1] = &CFWGetFirstPlayer; | | |
break; | | |
case HOOK_GETFIRSTARCHETYPE: | | |
HookParm->Value[1] = &CFWGetFirstArchetype; | | |
break; | | |
case HOOK_QUERYCOST: | | |
HookParm->Value[1] = &CFWQueryCost; | | |
break; | | |
case HOOK_QUERYMONEY: | | |
HookParm->Value[1] = &CFWQueryMoney; | | |
break; | | |
case HOOK_PAYFORITEM: | | |
HookParm->Value[1] = &CFWPayForItem; | | |
break; | | |
case HOOK_PAYFORAMOUNT: | | |
HookParm->Value[1] = &CFWPayForAmount; | | |
break; | | |
case HOOK_NEWDRAWINFO: | | |
HookParm->Value[1] = &CFWNewDrawInfo; | | |
break; | | |
case HOOK_SENDCUSTOMCOMMAND: | | |
HookParm->Value[1] = &CFWSendCustomCommand; | | |
break; | | |
};*/ | | |
PlugList[PlugNR].hookfunc(&HookParm); | | PlugList[PlugNR].hookfunc(&HookParm); |
}; | | }; |
}; | | }; |
| | |
/* 2 - direction; */ | | /* 2 - direction; */ |
/* 3 - spell object */ | | /* 3 - spell object */ |
/* 4 - optional args; */ | | /* 4 - optional args; */ |
/* */ | | |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWCastSpell(CFParm* PParm) | | CFParm* CFWCastSpell(CFParm* PParm) |
{ | | { |
static int val; | | static int val; |
CFParm *CFP; | | CFParm *CFP; |
CFP = (CFParm*)(malloc(sizeof(CFParm))); | | CFP = (CFParm*)(malloc(sizeof(CFParm))); |
/* int cast_spell(object *op, object *caster,int dir,object *spell_ob, char *stringarg)*/ | | |
val = cast_spell((object *)(PParm->Value[0]),(object *)(PParm->Value[1]), | | val = cast_spell((object *)(PParm->Value[0]),(object *)(PParm->Value[1]), |
*(int*)(PParm->Value[2]), (object*)(PParm->Value[3]), | | *(int*)(PParm->Value[2]), (object*)(PParm->Value[3]), |
(char *)(PParm->Value[4])); | | (char *)(PParm->Value[4])); |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* pick_up wrapper. */ | | /* pick_up wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* 0 - picker object; */ | | /* 0 - map */ |
/* 1 - picked object. */ | | /* 1 - x position */ |
| | /* 2 - y position */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWGetMapObject(CFParm* PParm) | | CFParm* CFWGetMapObject(CFParm* PParm) |
{ | | { |
| | |
/* do_forget_spell wrapper. */ | | /* do_forget_spell wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* 0 - object to affect; */ | | /* 0 - object to affect; */ |
/* 1 - spell index to forget. */ | | /* 1 - spell name to forget. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWDoForgetSpell(CFParm* PParm) | | CFParm* CFWDoForgetSpell(CFParm* PParm) |
{ | | { |
| | |
/* check_spell_known wrapper. */ | | /* check_spell_known wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* 0 - object to check; */ | | /* 0 - object to check; */ |
/* 1 - spell index to search. */ | | /* 1 - spell name to search. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWCheckSpellKnown(CFParm* PParm) | | CFParm* CFWCheckSpellKnown(CFParm* PParm) |
{ | | { |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWGetArchetype(CFParm* PParm) | | CFParm* CFWGetArchetype(CFParm* PParm) |
{ | | { |
/*object* get_archetype(char* name); */ | | |
CFParm *CFP; | | CFParm *CFP; |
object* val; | | object* val; |
| | |
| | |
{ | | { |
CFParm* CFP; | | CFParm* CFP; |
static char val[10240]; | | static char val[10240]; |
/* object* ob; not used */ | | |
CFP = (CFParm*)(malloc(sizeof(CFParm))); | | CFP = (CFParm*)(malloc(sizeof(CFParm))); |
dump_me((object *)(PParm->Value[0]),val); | | dump_me((object *)(PParm->Value[0]),val); |
CFP->Value[0] = (void *)(val); | | CFP->Value[0] = (void *)(val); |
| | |
remove_ob((object *)(PParm->Value[0])); | | remove_ob((object *)(PParm->Value[0])); |
return NULL; | | return NULL; |
}; | | }; |
| | |
| | /*****************************************************************************/ |
| | /* add_string wrapper. */ |
| | /*****************************************************************************/ |
| | /* 0 - string to add. */ |
| | /*****************************************************************************/ |
CFParm* CFWAddString(CFParm* PParm) | | CFParm* CFWAddString(CFParm* PParm) |
{ | | { |
CFParm* CFP; | | CFParm* CFP; |
| | |
return CFP; | | return CFP; |
}; | | }; |
| | |
| | /*****************************************************************************/ |
| | /* add_refcount wrapper. */ |
| | /*****************************************************************************/ |
| | /* 0 - string to increment refcount. */ |
| | /*****************************************************************************/ |
CFParm* CFWAddRefcount(CFParm* PParm) | | CFParm* CFWAddRefcount(CFParm* PParm) |
{ | | { |
CFParm* CFP; | | CFParm* CFP; |
| | |
CFP->Value[0] = (void*) add_refcount (val); | | CFP->Value[0] = (void*) add_refcount (val); |
return CFP; | | return CFP; |
}; | | }; |
| | |
| | /*****************************************************************************/ |
| | /* free_string wrapper. */ |
| | /*****************************************************************************/ |
| | /* 0 - string to free. */ |
| | /*****************************************************************************/ |
CFParm* CFWFreeString(CFParm* PParm) | | CFParm* CFWFreeString(CFParm* PParm) |
{ | | { |
/* CFParm* CFP; not used */ | | |
char* val; | | char* val; |
val = (char *)(PParm->Value[0]); | | val = (char *)(PParm->Value[0]); |
free_string (val); | | free_string (val); |
return NULL; | | return NULL; |
}; | | }; |
| | |
| | /*****************************************************************************/ |
| | /* first_map wrapper. */ |
| | /*****************************************************************************/ |
CFParm* CFWGetFirstMap(CFParm* PParm) | | CFParm* CFWGetFirstMap(CFParm* PParm) |
{ | | { |
CFParm* CFP; | | CFParm* CFP; |
| | |
return CFP; | | return CFP; |
}; | | }; |
| | |
| | /*****************************************************************************/ |
| | /* first_player wrapper. */ |
| | /*****************************************************************************/ |
CFParm* CFWGetFirstPlayer(CFParm* PParm) | | CFParm* CFWGetFirstPlayer(CFParm* PParm) |
{ | | { |
CFParm* CFP; | | CFParm* CFP; |
| | |
return CFP; | | return CFP; |
}; | | }; |
| | |
| | /*****************************************************************************/ |
| | /* first_archetype wrapper. */ |
| | /*****************************************************************************/ |
CFParm* CFWGetFirstArchetype(CFParm* PParm) | | CFParm* CFWGetFirstArchetype(CFParm* PParm) |
{ | | { |
CFParm* CFP; | | CFParm* CFP; |
| | |
CFP->Value[0] = (void*)(first_archetype) ; | | CFP->Value[0] = (void*)(first_archetype) ; |
return CFP; | | return CFP; |
}; | | }; |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* query_cost wrapper. */ | | /* query_cost wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
return CFP; | | return CFP; |
}; | | }; |
| | |
/*new_draw_info(int flags, int pri, object *pl, const char *buf); */ | | /*****************************************************************************/ |
| | /* new_draw_info wrapper. */ |
| | /*****************************************************************************/ |
| | /* 0 - flags */ |
| | /* 1 - pri */ |
| | /* 2 - pl */ |
| | /* 3 - buf */ |
| | /*****************************************************************************/ |
CFParm* CFWNewDrawInfo(CFParm* PParm) | | CFParm* CFWNewDrawInfo(CFParm* PParm) |
{ | | { |
new_draw_info(*(int *)(PParm->Value[0]), | | new_draw_info(*(int *)(PParm->Value[0]), |
| | |
(char *)(PParm->Value[3])); | | (char *)(PParm->Value[3])); |
return NULL; | | return NULL; |
}; | | }; |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* move_player wrapper. */ | | /* move_player wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
CFP->Value[0] = (void*) &val; | | CFP->Value[0] = (void*) &val; |
return(CFP); | | return(CFP); |
} | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* move_object wrapper. */ | | /* move_object wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
return(CFP); | | return(CFP); |
} | | } |
| | |
| | /*****************************************************************************/ |
| | /* send_plugin_custom_message wrapper. */ |
| | /*****************************************************************************/ |
| | /* 0 - player to send command to */ |
| | /* 1 - command to send */ |
| | /*****************************************************************************/ |
CFParm* CFWSendCustomCommand(CFParm* PParm) | | CFParm* CFWSendCustomCommand(CFParm* PParm) |
{ | | { |
send_plugin_custom_message((object *)(PParm->Value[0]),(char *)(PParm->Value[1])); | | send_plugin_custom_message((object *)(PParm->Value[0]),(char *)(PParm->Value[1])); |
return NULL; | | return NULL; |
}; | | }; |
| | |
| | /*****************************************************************************/ |
| | /* cftimer_create wrapper. */ |
| | /*****************************************************************************/ |
| | /* 0 - id */ |
| | /* 1 - delay */ |
| | /* 2 - object */ |
| | /* 3 - mode */ |
| | /*****************************************************************************/ |
CFParm* CFWCFTimerCreate(CFParm* PParm) | | CFParm* CFWCFTimerCreate(CFParm* PParm) |
{ | | { |
/*int cftimer_create(int id, long delay, object* ob, int mode) */ | | |
CFParm* CFP; | | CFParm* CFP; |
static int val; | | static int val; |
CFP = (CFParm*)(malloc(sizeof(CFParm))); | | CFP = (CFParm*)(malloc(sizeof(CFParm))); |
| | |
return CFP; | | return CFP; |
}; | | }; |
| | |
| | /*****************************************************************************/ |
| | /* cftimer_destroy wrapper. */ |
| | /*****************************************************************************/ |
| | /* 0 - id */ |
| | /*****************************************************************************/ |
CFParm* CFWCFTimerDestroy(CFParm* PParm) | | CFParm* CFWCFTimerDestroy(CFParm* PParm) |
{ | | { |
/*int cftimer_destroy(int id) */ | | |
CFParm* CFP; | | CFParm* CFP; |
static int val; | | static int val; |
CFP = (CFParm*)(malloc(sizeof(CFParm))); | | CFP = (CFParm*)(malloc(sizeof(CFParm))); |
| | |
CFP->Value[0] = (void *)(&val); | | CFP->Value[0] = (void *)(&val); |
return CFP; | | return CFP; |
}; | | }; |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* SET_ANIMATION wrapper. */ | | /* SET_ANIMATION wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
update_object(op, UP_OBJ_FACE); | | update_object(op, UP_OBJ_FACE); |
return(NULL); | | return(NULL); |
} | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* communicate wrapper. */ | | /* communicate wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
communicate (op,string); | | communicate (op,string); |
return NULL; | | return NULL; |
} | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* find_best_object_match wrapper. */ | | /* find_best_object_match wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
| | |
return(CFP); | | return(CFP); |
} | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* player_apply_below wrapper. */ | | /* player_apply_below wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
player_apply_below (op); | | player_apply_below (op); |
return NULL; | | return NULL; |
} | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* free_object wrapper. */ | | /* free_object wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* free wrapper. */ | | /* free wrapper. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* 0 - object */ | | /* 0 - pointer */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWFreeMemory(CFParm* PParm) | | CFParm* CFWFreeMemory(CFParm* PParm) |
{ | | { |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* 0 - object */ | | /* 0 - object */ |
/* 1 - type 0 = clone with inventory */ | | /* 1 - type 0 = clone with inventory */ |
/* 1 = only duplicate the object without it's content and op->more */ | | /* 1 = only duplicate the object without its content and op->more */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
CFParm* CFWObjectCreateClone (CFParm* PParm) | | CFParm* CFWObjectCreateClone (CFParm* PParm) |
{ | | { |
| | |
} | | } |
return CFP; | | return CFP; |
} | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* Sets a variable in a given object. */ | | /* set_variable wrapper -- Sets a variable in a given object. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* 0 - object to change */ | | /* 0 - object to change */ |
/* 1 - string describing the change to make. */ | | /* 1 - string describing the change to make. */ |
| | |
return NULL; | | return NULL; |
} | | } |
| | |
| | /*****************************************************************************/ |
| | /* decrease_ob_nr wrapper. */ |
| | /*****************************************************************************/ |
| | /* 0 - object to change */ |
| | /* 1 - nrof */ |
| | /*****************************************************************************/ |
CFParm* CFWDecreaseObjectNR(CFParm* PParm) | | CFParm* CFWDecreaseObjectNR(CFParm* PParm) |
{ | | { |
CFParm* CFP=(CFParm*)malloc(sizeof (CFParm)); | | CFParm* CFP=(CFParm*)malloc(sizeof (CFParm)); |
| | |
CFParm* CFWTeleportObject (CFParm* PParm) | | CFParm* CFWTeleportObject (CFParm* PParm) |
{ | | { |
object* current; | | object* current; |
/* char * mapname; not used | | |
int mapx; | | |
int mapy; | | |
int unique; not used */ | | |
current=get_object(); | | current=get_object(); |
EXIT_PATH(current)=add_string ((char*)PParm->Value[1]); | | EXIT_PATH(current)=add_string ((char*)PParm->Value[1]); |
EXIT_X(current)=*(int*)PParm->Value[2]; | | EXIT_X(current)=*(int*)PParm->Value[2]; |
| | |
/* When a specific global event occurs, this function is called. */ | | /* When a specific global event occurs, this function is called. */ |
/* Concerns events: BORN, QUIT, LOGIN, LOGOUT, SHOUT, MUZZLE, KICK for now. */ | | /* Concerns events: BORN, QUIT, LOGIN, LOGOUT, SHOUT, MUZZLE, KICK for now. */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* */ | | /* 0 - Number of the event */ |
/*****************************************************************************/ | | /*****************************************************************************/ |
void GlobalEvent(CFParm *PParm) | | void GlobalEvent(CFParm *PParm) |
{ | | { |