npcWatchList.inc Functions |
|
NPC_AddToWatchList |
|
Parameters | |
(npc, mobile) | |
Name | Type |
npc | NPC that will have its list added to. |
mobile | Mobile to add to the watch list. |
Explanation | |
Adds a mobile to the NPC's watch list. | |
Return Values | |
Returns 1 or error. | |
NPC_IsInWatchList |
|
Parameters | |
(npc, mobile) | |
Name | Type |
npc | NPC with the list to check. |
mobile | Mobile that will be checked for in the list. |
Explanation | |
Checks if a mobile is in an NPC's watch list. | |
Return Values | |
Returns 1 if the mobile is in the list. Returns 0 if the mobile is not in the list. |
|
NPC_LoadWatchList |
|
Parameters | |
(npc) | |
Name | Type |
npc | NPC to load the watch list from. |
Explanation | |
Loads the watch list on an NPC. | |
Return Values | |
Returns a dictionary. | |
NPC_RemoveFromWatchList |
|
Parameters | |
(npc, mobile) | |
Name | Type |
npc | NPC that will have its list modified. |
mobile | Mobile to remove from the watch list. |
Explanation | |
Removes a mobile from the NPC's watch list. | |
Return Values | |
Returns 0 if the mobile was not removed. Returns 1 if the mobile was removed. |
|
NPC_SaveWatchList |
|
Parameters | |
(npc, dict_list) | |
Name | Type |
npc | NPC to save the watch list on. |
dict_list | Dictionary containing serials the npc is watching. |
Explanation | |
Saves the NPC's watch list. | |
Return Values | |
Returns error if it could not be saved. Returns 1 if it was saved. |
|
NPC_ShouldWatch |
|
Parameters | |
(npc, mobile, byref settings, byref scripts) | |
Name | Type |
npc | NPC that will do the checking. |
mobile | Mobile to check to be added to the watch list. |
settings | Dictionary of the NPC's settings. |
scripts | Dictionary of the npcs script settings. |
Explanation | |
Checks if a mobile is in an NPC's watch
list. This uses the 'ShouldWatch' entry in the NPC's 'AIScript' entries. It will run the script critical and return its return value. If no script is present, it will always return 1. |
|
Return Values | |
Returns 0 if the mobile should be
ignored. Returns 1 if the mobile should be watched. |