horyfilipe
29.11.2005, 02:25
Since i made a "enchant wipe" on my server, ppl started to hit roy the cat and with this, they found a bug: they get 0 HP and get imortal, even restarting game..
I dont understand AI well, so I thought there is something weird on this setstr, setint stuff that may be causing this?
My ai:
[php:1:5ec3be0991]
class roy_the_cat : citizen
handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"fhtml0"
"i0"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // ask
push_const 100
add
fetch_i
push_const 1
negate
equal
push_reg_sp
fetch_i
branch_false L41913
push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
and
L41913
branch_false L41932
L41914
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6399
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
push_reg_sp
fetch_i
branch_true L41915
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6400
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
or
push_reg_sp
fetch_i
branch_true L41915
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6401
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
or
push_reg_sp
fetch_i
branch_true L41915
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6402
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
or
L41915
branch_false L41930
L41916
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8889. "eventmedal004.htm"
push_string S8889
func_call 84 // func[FHTML_SetFileName]
shift_sp -2
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6399
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
branch_false L41922
L41917
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8890. "event_level"
push_string S8890
S8891. "rabbit"
push_string S8891
func_call 87 // func[FHTML_SetStr]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8892. "sellid"
push_string S8892
push_const 22
func_call 85 // func[FHTML_SetInt]
shift_sp -3
shift_sp -1
jump L41929
L41922
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6400
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
branch_false L41924
L41923
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8893. "event_level"
push_string S8893
S8894. "hyena"
push_string S8894
func_call 87 // func[FHTML_SetStr]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8895. "sellid"
push_string S8895
push_const 23
func_call 85 // func[FHTML_SetInt]
shift_sp -3
shift_sp -1
jump L41928
L41924
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6401
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
branch_false L41926
L41925
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8896. "event_level"
push_string S8896
S8897. "fox"
push_string S8897
func_call 87 // func[FHTML_SetStr]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8898. "sellid"
push_string S8898
push_const 24
func_call 85 // func[FHTML_SetInt]
shift_sp -3
shift_sp -1
jump L41927
L41926
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8899. "event_level"
push_string S8899
S8900. "wolf"
push_string S8900
func_call 87 // func[FHTML_SetStr]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8901. "sellid"
push_string S8901
push_const 25
func_call 85 // func[FHTML_SetInt]
shift_sp -3
shift_sp -1
L41927
L41928
L41929
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_event // fhtml0
push_const 316
add
fetch_i
func_call 88 // func[ShowFHTML]
shift_sp -2
shift_sp -1
jump L41931
L41930
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S8902. "eventmedal005.htm"
push_string S8902
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L41931
L41932
handler_end
class_end
[/php:1:5ec3be0991]
I dont understand AI well, so I thought there is something weird on this setstr, setint stuff that may be causing this?
My ai:
[php:1:5ec3be0991]
class roy_the_cat : citizen
handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"fhtml0"
"i0"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
push_event // ask
push_const 100
add
fetch_i
push_const 1
negate
equal
push_reg_sp
fetch_i
branch_false L41913
push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
and
L41913
branch_false L41932
L41914
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6399
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
push_reg_sp
fetch_i
branch_true L41915
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6400
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
or
push_reg_sp
fetch_i
branch_true L41915
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6401
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
or
push_reg_sp
fetch_i
branch_true L41915
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6402
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
or
L41915
branch_false L41930
L41916
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8889. "eventmedal004.htm"
push_string S8889
func_call 84 // func[FHTML_SetFileName]
shift_sp -2
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6399
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
branch_false L41922
L41917
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8890. "event_level"
push_string S8890
S8891. "rabbit"
push_string S8891
func_call 87 // func[FHTML_SetStr]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8892. "sellid"
push_string S8892
push_const 22
func_call 85 // func[FHTML_SetInt]
shift_sp -3
shift_sp -1
jump L41929
L41922
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6400
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
branch_false L41924
L41923
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8893. "event_level"
push_string S8893
S8894. "hyena"
push_string S8894
func_call 87 // func[FHTML_SetStr]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8895. "sellid"
push_string S8895
push_const 23
func_call 85 // func[FHTML_SetInt]
shift_sp -3
shift_sp -1
jump L41928
L41924
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 6401
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
not_equal
branch_false L41926
L41925
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8896. "event_level"
push_string S8896
S8897. "fox"
push_string S8897
func_call 87 // func[FHTML_SetStr]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8898. "sellid"
push_string S8898
push_const 24
func_call 85 // func[FHTML_SetInt]
shift_sp -3
shift_sp -1
jump L41927
L41926
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8899. "event_level"
push_string S8899
S8900. "wolf"
push_string S8900
func_call 87 // func[FHTML_SetStr]
shift_sp -3
shift_sp -1
shift_sp 1
push_event // fhtml0
push_const 316
add
fetch_i
S8901. "sellid"
push_string S8901
push_const 25
func_call 85 // func[FHTML_SetInt]
shift_sp -3
shift_sp -1
L41927
L41928
L41929
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_event // fhtml0
push_const 316
add
fetch_i
func_call 88 // func[ShowFHTML]
shift_sp -2
shift_sp -1
jump L41931
L41930
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S8902. "eventmedal005.htm"
push_string S8902
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L41931
L41932
handler_end
class_end
[/php:1:5ec3be0991]