User Tools

Site Tools


building:creatures:events

Creatures Event System

Sinfar creatures use these scripts Creatures Scripts.

If you want your NPC to behave differently or do some specific things for a given event (ex : say Hello! at spawn), you can use the AI event system to preceed the scripted event.

nw_c2_default1 - On Heartbeat event : EVENT_AI_HEARTBEAT (string) - Script name for pre-event use.

nw_c2_default2 - On Perception event : EVENT_AI_PERCEPTION (string) - Script name for pre-event use.

nw_c2_default3 - On Combat Round End event : EVENT_AI_ENDCOMBATROUND (string) - Script name for pre-event use.

nw_c2_default4 - On Conversation event : EVENT_AI_CONVERSATION (string) - Script name for pre-event use.

nw_c2_default5 - On Attacked event : EVENT_AI_ATTACKED (string) - Script name for pre-event use.

nw_c2_default6 - On Damaged event : EVENT_AI_DAMAGED (string) - Script name for pre-event use.

nw_c2_default7 - On Death event : EVENT_AI_DEATH (string) - Script name for pre-event use.

nw_c2_default8 - On Disturbed event : EVENT_AI_DISTURBED (string) - Script name for pre-event use.

nw_c2_default9 - On Spawned event : EVENT_AI_SPAWN (string) - Script name for pre-event use.

nw_c2_defaultb - On Spell Cast At event : EVENT_AI_CASTAT (string) - Script name for pre-event use.

nw_c2_defaulte - On Blocked event : EVENT_AI_BLOCKED (string) - Script name for pre-event use.



You can also register these events dynamically , see : PAGE INFO ALREADY TRANSFERRED TO THE NEW WIKI - Variable Based Events

Ex :

RegisterVariableEvent(oNPC, "EVENT_AI_SPAWN", "erfprefix_spawn_script");
UnregisterVariableEvent(oNPC, "EVENT_AI_SPAWN", "erfprefix_spawn_script");

Note : nw_c2_default9 uses the variable ENTIRE_APPEARANCE2 already.

authpdo: Statement did not return 'mail' attribute [auth.php:522]
building/creatures/events.txt · Last modified: 2022/12/08 09:14 by spankitty

phpBB Appliance - Powered by TurnKey Linux