LOCAL EVENT (LE)
RECEIVER

Used to modify the attributes of a local (placed) event in the specified position on the map.

If you want a script to occur when an event is activated, use an event TRIGGER
Note: v998/v999/v1000 variables will store the location of the current event visited. Also, you can refer to it easily with an indirect reference (for example: !!LE998:...; )

Now you can use the !!LE receiver to program Pandora's Box.
All LE commands should work. To trigger it, use !?OB trigger with any
kind of syntax. Note: you still can't change the number of secondary skills, artifacts, or spells (same as an event), only change existing ones.

 
!!LE#1/#2/#3:XXXX;    #1 = x
   #2 = y
   #3 = Level
!!LE$:XXXX; Coordinates are in v[$],v[$+1],v[$+2]

OPTIONS
A#1/$2; Set/Check/Get artifact
$2 (Format A1) in position #1 of the table of artifacts given by the event. You can only CHANGE the artifact present by another one. If there is no artifact in that position it will not be set.
A$; Get the number of artifacts
You can use a set syntax but it will change nothing.
B1/$;
B2/#/$;

B3/$;

B4/$;

Control artifacts.
B1/$; - get/check number of artifacts in the bonus list (you cannot set it).
B2/#/$; - get/set/check an artifact $ at position # (0...) in the bonus list.
B3/$; - add an artifact $ to the end of the bonus list.
B4/$; - remove artifact at position $ (0...) in the bonus list.
Comments:
We have the LE:A command already but it allows only to change artifacts in the bonus list. This new command lets you set, add and remove new artifacts from Local Events and Pandora's Boxes, like the CB:A command does for Creature Banks.
You can make an almost unlimited list of artifacts for any Local Event or Pandora's Box.
You cannot set a spell scroll as an artifact; the game will treat it wrong and then crash.
C#1/$2/$3; Set/Check/Get a "gift" monster
in position #1 (from 0 to 6) of type $2 (Format C) and number $3.
D#1/#2;

Disable/Enable event for human
Disable: #2=1or Enable: #2=0
event for gamer #1 (0...7) (Format E1)

E$; Set/Check/Get experience to $.
F#1/$2/$3/$4; Set/Check/Get four primary skills.
(See Format PK)
G#1/$2/$3; Set/Check/Get the guardian monster
in position #1 (from 0 to 6) of type $2 (Format C) and number $3.
Comments:
This only saves the guardians but does not turn them on.
I#; Disable/Enable event for AI
Enable (#=1) or disable (#=0)
L#; Cancel (#=1) or do not cancel (#=0) event after first visit
M^TEXT^; Set message text to TEXT. It may contain any symbols except ^ or the semicolon (;).
M#; Set message text to that of the timed event number #.
M-1; Do not show the message on the screen.
Mz#; Set/Get message text from string variable
M1/$ ;
M1/-1
;
Set and  get the string parameters.
You can use it when M command is used to set name/message.
  
M1/$ - $ = index of string var
  
M1/-1 - Disable (restore default) message.
Comments:
Now you can not only set but also get the string parameters. You can use it when M command is used to set name/message.
N#1/$2/$3; Set/Check/Get secondary skill
$2 (Format SS), level $3 (0 = basic, 1 = advanced, 2 = expert) in position #1 of the table of secondary skill given by the event. You can only CHANGE the skill present for another one. If there is no skill in that position it will not be set.
N$; Get the number of secondary skills
You can use a set syntax but it will change nothing.
O$; Set/Check/Get morale (from -3 to 3).
P$; Set/Check/Get spell points (may be negative).
R#1/$2; Set/Check/get the amount of resource #1 (Format R) to $2 (may be negative).
S#1/$2; Set/Check/Get spell
$2 (Format SP) in position #1 of the table of spells given by the event. You can only CHANGE the spell present by another one. If there is no spell in that position it will not be set.
S$; Get the number of spells
You can use a set syntax but it will change nothing.
U$; Set/Check/Get luck (from -3 to 3).
X#; Turn the guardians on if # is non-zero, otherwise turn them off.
The check for the presence of the guardians is not made. So it must be set by G#1/$2/$3 option or preset with the map editor.

Comments:
If an Event was set to cancel after being visited and was visited already, you cannot bring it back to life. It is completely gone. So we recommend you always set it to be not cancelled and play with the enable/disable player command.

There is now a check to see if a local event being referenced with ERM exists. If it does, Flag 999 will be set to 0 and all commands executed.
If it does not exist, Flag 999 will be set to 1 and all LE commands skipped.

Last Update: 23:38 GMT +4 September 07, 2004