Each handler have structure:
Code:
handler 3 0 // TALKED
variable_begin
"talker"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
handler_end
Where
handler - start word for handler
3 - handler id (full list sometime later)
0 - amount handler code lines (later)
TALKED - name of handler (this only commentarie)
variable_begin - start word for variable list
variable_end - end word for variable list
handler_end - end word for handler
Example
handler 10 0 // MY_DYING
handler_end
handler 11 0 // TIMER_FIRED
handler_end
variable_begin must be defined always. Guide to list of paramerer later.
Amount lines in handler
Example:
Code:
handler 3 6 // TALKED
variable_begin
"talker"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // myself
push_const 704
jump L4249
L4248
push_event // myself
push_const 704
handler_end
Where handler have 6 work lined, except Empty lines and Variable block.
Value for amount lines in handler define "How much memory required by server for working with this handler." If you have small value - your server can be crashed because memory not enought for working this npc. Or, if you have big value - your server can be use a lot memory and cause leak memory after sometimes.