PDA

View Full Version : [Share] SP scrolls via Event Manager NPC


duante
28.09.2005, 10:24
Code is as is not really any explenation for it it takes sp scrolls and gives the player sp... duh?

duante

AI Patch Code

Event Manager Class:
class event_people : default_npc
parameter_define_begin
string ShopName ""
string fnHi "mhi.htm"
string fnUnableItemSell "muib.htm"
string fnEventPage "event_human001.htm"
parameter_define_end
handler 3 // TALKED
variable_begin
"talker"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_parameter fnHi
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
handler_end

handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"i0"
"i1"
"i2"
"i3"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // ask L4095 to L4300
push_const 100
add
fetch_i
push_const 1
negate
equal
branch_false L4095 //reply not -1

L40960
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 5593
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 1
less
branch_false L409601

shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 5594
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 1
less
branch_false L409602

shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 5595
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 1
less
branch_false L409603

jump L4095 //no items so end

L409601
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 5593
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
shift_sp -1

shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 500
func_call 171 // func[IncrementParam]

jump L4095 //took item gave sp so end

L409602
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 5594
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
shift_sp -1

shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 5000
func_call 171 // func[IncrementParam]

jump L4095 //took item gave sp so end

L409603
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 5595
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
shift_sp -1

shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 100000
func_call 171 // func[IncrementParam]

jump L4095 //took item gave sp so end


L4095 //this is the end leave it that way
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_parameter fnEventPage
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1

handler_end

class_end

event_human001.htm
<html><head><body>

Hell Spawn Event Manager:



Let me guess... your trying to turn in some of our <font color="LEVEL">event items</font> for
<font color="LEVEL">rewards?</font> Well then youve come to the right place!
Just tell me what find you have and ill see about the <font color="LEVEL">rewards...</font>



<font color="LEVEL">Item List:</font>

<a action="bypass -h menu_select?ask=-1"> Skill Point Scroll (low, med, high)</a>

+ Low SP Scroll: <font color="LEVEL">500sp</font>

+ Med SP Scroll: <font color="LEVEL">5000sp</font>

+ High SP Scroll: <font color="LEVEL">100000sp</font>




</body></html>

event_elf001.htm
event_orc001.htm
event_darkelf001.htm
<html><head><body>

Hell Spawn Event Manager:



Let me guess... your trying to turn in some of our <font color="LEVEL">event items</font> for
<font color="LEVEL">rewards?</font> Well then your going to have to travel to our main office...
Where is that you ask? Its in the merchant square in Giran just infront of the church.
Dont worry its well worth your trip to get your <font color="LEVEL">rewards...</font>



</body></html>