Jump to content

[EventAI][7863] New event type: EVENT_T_SPAWN_AT_MAP


Alex

Recommended Posts

This small patch allows to easily add creatures such as Defias Prisoner that i.e. must be hostile at one map and friendly at another. Or that must have different looks/stats/etc. on different maps but must have same template ID.

Patch version 3: do not use new event type, extend existing EVENT_T_SPAWNED instead with its own conditions.

Patch: http://pastebin.ca/1428824

SQL: http://pastebin.ca/1428821

The condition codes for EVENT_T_SPAWNED are stored in parameter 1. Codes are:

0: works always

1: works on map in parameter2

2: works on zone in parameter2

3: works on area in parameter2

Tested on [7859]

Link to comment
Share on other sites

Why not use existing already EVENT_T_SPAWNED, avoid duplicate event and instead create condition for event? We already use enum ConditionType in code, no reason to not use this in my opinion.

if EVENT_T_SPAWNED && CONDITION_ZONEID==your zoneId

->

ACTION_T_SET_FACTION

Link to comment
Share on other sites

Patch version 2: do not use new event type, extend existing EVENT_T_SPAWNED instead with conditions.

Note: only CONDITION_NONE, CONDITION_ZONEID and CONDITION_ACTIVE_EVENT are valid for EVENT_T_SPAWNED, others will not fire because they require acting player.

Patch here: http://pastebin.ca/1428720

SQL line here: http://pastebin.com/m32017bb8

Tested on [7851]

Link to comment
Share on other sites

Obsoleted by [7852].

I do not know how to check zone in SPAWNED type event using this condition code verification style, sorry. We have no player object in EVENT_T_SPAWNED.

I will post third version of the patch soon that will extend SPAWNED with a map/zone check in another way.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use