mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added a new hook: HOOK_ENCOUNTER
Added procedure and macros for unsigned integer comparison to lib.math.h.
This commit is contained in:
@@ -669,3 +669,17 @@ int arg2 - 1 when the target object is valid to attack, 0 otherwise
|
||||
Obj arg3 - the target object
|
||||
|
||||
mixed ret1 - overrides the target object, or pass -1 to prevent the player from attacking the object
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_ENCOUNTER (hs_encounter.int)
|
||||
|
||||
Runs whenever a random encounter occurs (except the Horrigan meeting and scripted encounters), or when the player enters a local map from the world map.
|
||||
You can override the map for loading or the encounter.
|
||||
|
||||
int arg1 - event type: 0 - when a random encounter occurs, 1 - when the player enters from the world map
|
||||
int arg2 - the map ID that the encounter will load (see MAPS.h or Maps.txt)
|
||||
int arg3 - 1 when the encounter occurs is a special encounter, 0 otherwise
|
||||
|
||||
int ret1 - overrides the map ID, or pass -1 to cancel the encounter and continue traveling (only for event type 0)
|
||||
int ret2 - pass 1 to cancel the encounter and load the specified map from the ret1 (only for event type 0)
|
||||
|
||||
Reference in New Issue
Block a user