NASC:
HTML:
AI:
Код:
class 1 subclass : citizen{
handler:
EventHandler TALKED(talker){
myself::ShowPage(talker,"subclass.htm");
}
EventHandler MENU_SELECTED(talker,ask,reply)
{
if(ask == 541 && reply == 1)
{
if(talker.level>75 && talker.subjob_id == 0)
{
myself::GiveItem1(talker, @mimirs_elixir, 1);
myself::GiveItem1( talker, @scrl_of_ench_wp_a, 1 );
myself::SetOneTimeQuestFlag( talker, @water_of_mimir, 1 );
myself::SoundEffect( talker, "ItemSound.quest_finish" );
myself::ShowPage(talker,"subclass_finish.htm");
}
else
{
myself::ShowPage(talker,"subclass_no.htm");
}
}
}
}
HTML:
<a action="bypass -h menu_select?ask=541&reply=1">subclass</a>
Код:
class 1 subclass : citizenhandler 3 13 // TALKED
variable_begin
"talker"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // myself
push_const 704
add
fetch_i
push_event // talker
push_const 40
add
fetch_i
S881. "noble_maker001.htm"
push_string S881
func_call 184680516 // func[ShowPage]
shift_sp -2
shift_sp -1
handler_end
handler 32 126 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // ask
push_const 160
add
fetch_i4
push_const 541
equal
push_reg_sp
fetch_i
branch_false L3
push_event // reply
push_const 164
add
fetch_i4
push_const 1
equal
and
L3
branch_false L2
L1
push_event // talker
push_const 40
add
fetch_i // level
push_const 1092
add
fetch_i4
push_const 75
greater
push_reg_sp
fetch_i
branch_false L6
push_event // talker
push_const 40
add
fetch_i // subjob_id
push_const 152
add
fetch_i4
push_const 0
equal
and
L6
branch_false L5
L4
push_event // myself
push_const 704
add
fetch_i
push_event // talker
push_const 40
add
fetch_i
push_const 6319
push_const 1
func_call 184746111 // func[GiveItem1]
shift_sp -3
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // talker
push_const 40
add
fetch_i
push_const 729
push_const 1
func_call 184746111 // func[GiveItem1]
shift_sp -3
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // talker
push_const 40
add
fetch_i
push_const 235
push_const 1
func_call 184746091 // func[SetOneTimeQuestFlag]
shift_sp -3
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // talker
push_const 40
add
fetch_i
S882. "ItemSound.quest_finish"
push_string S882
func_call 184680685 // func[SoundEffect]
shift_sp -2
shift_sp -1
push_event // myself
push_const 704
add
fetch_i
push_event // talker
push_const 40
add
fetch_i
S883. "subclass_finish.htm"
push_string S883
func_call 184680516 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L7
L5
push_event // myself
push_const 704
add
fetch_i
push_event // talker
push_const 40
add
fetch_i
S884. "subclass_no.htm"
push_string S884
func_call 184680516 // func[ShowPage]
shift_sp -2
shift_sp -1
L7
L2
handler_end
class_end