Im trying to do a simple NPC that when a player clicks on a
Code:
<a action="bypass -h talk_select">Link</a>
it checks the level of the player and if level >= 30 show one html, if not show another. After searching a while i think this is the right code for it:
Code:
L####1
push_event // talker
push_const 32
add
fetch_i // level
push_const 888
add
fetch_i
push_const 30
greater_equal
branch_false L####2
L####2
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S###1. "IS_LVL_30.htm"
push_string S###1
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L#####
L###4
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S###2. "IS_NOT_LVL_30.htm"
push_string S###2
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
I think its correct but if somone finds errors in it please tell me. Anyway what i want to know is, since this is a complete new NPC (it has no AI.obj) what do i have to put in the rest of the AI so that when a player clicks on that "Link" it shows either 1 html or the other.