Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Roy the cat: 0 HP bug (https://postpacific.loc-online.com/showthread.php?t=2673)

horyfilipe 29.11.2005 02:25

Roy the cat: 0 HP bug
 
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]

filrip 29.11.2005 11:38

in npcdata, undying=1 ?

bwgreen 29.11.2005 12:01

Why would that help? Try decreasing the damage the NPC makes.. that may help.

horyfilipe 29.11.2005 12:31

My npcdata:
[php:1:6370865cab]
npc_begin citizen 8228 [roy_the_cat] level=70 exp=429634524 acquire_exp_rate=8 undying=1 can_be_attacked=0 acquire_sp=100 race=human sex=female temper=100 safe_height=100 org_jump=15 skill_list={@s_full_magic_defence} magic_list={} max_item=80 item_make_list={} corpse_make_list={} additional_make_list={} additional_make_multi_list={} slot_chest=[] slot_rhand=[] slot_lhand=[] base_attack_type=fist base_can_penetrate=0 base_attack_range=40 base_damage_range={0;0;80;120} base_rand_dam=30 str=40 int=21 dex=30 wit=20 con=43 men=10 hp_increase=40 mp_increase=7 org_hp_regen=8 org_mp_regen=27 ground_low={80;0;10} ground_high={120;-30;30} underwater_low={50;0;10} underwater_high={0;0;30} fly_low={0;0;10} fly_high={0;-30;30} float_low={0;0;10} float_high={0;-30;30} org_earshot=100 sight={0;0;2500;120;5} agro_range=1000 org_hp=244446818899627 org_mp=1346 base_defend=29591597408024 base_magic_attack=470404627426724 base_magic_defend=216538467292763 base_physical_attack=699754851683855 physical_hit_modify=475 physical_avoid_modify=0 base_attack_speed=253 base_reuse_delay=0 base_critical=4 magic_use_speed_modify=0 status={normal} align=0 collision_radius=9 collision_height=16 category={} clan={} clan_help_range=300 guild={} pledge={} pledge_leader=0 alliance={} alliance_leader=0 ignore_clan_list={} ruler=0 ruling_domain={} npc_ai={[roy_the_cat];{[fnHi]=[eventmedal001.htm]}} corpse_time=7 no_sleep_mode=0 npc_end
npc_begin citizen 8229 [winnie_the_cat] level=70 exp=429634524 acquire_exp_rate=8 undying=1 can_be_attacked=0 acquire_sp=100 race=human sex=female temper=100 safe_height=100 org_jump=15 skill_list={@s_full_magic_defence} magic_list={} max_item=80 item_make_list={} corpse_make_list={} additional_make_list={} additional_make_multi_list={} slot_chest=[] slot_rhand=[] slot_lhand=[] base_attack_type=fist base_can_penetrate=0 base_attack_range=40 base_damage_range={0;0;80;120} base_rand_dam=30 str=40 int=21 dex=30 wit=20 con=43 men=10 hp_increase=40 mp_increase=7 org_hp_regen=8 org_mp_regen=27 ground_low={80;0;10} ground_high={120;-30;30} underwater_low={50;0;10} underwater_high={0;0;30} fly_low={0;0;10} fly_high={0;-30;30} float_low={0;0;10} float_high={0;-30;30} org_earshot=100 sight={0;0;2500;120;5} agro_range=1000 org_hp=244446818899627 org_mp=1346 base_defend=29591597408024 base_magic_attack=470404627426724 base_magic_defend=216538467292763 base_physical_attack=699754851683855 physical_hit_modify=475 physical_avoid_modify=0 base_attack_speed=253 base_reuse_delay=0 base_critical=4 magic_use_speed_modify=0 status={normal} align=0 collision_radius=9 collision_height=16 category={} clan={} clan_help_range=300 guild={} pledge={} pledge_leader=0 alliance={} alliance_leader=0 ignore_clan_list={} ruler=0 ruling_domain={} npc_ai={[winnie_the_cat];{[fnHi]=[winnie_the_cat001.htm]}} corpse_time=7 no_sleep_mode=0 npc_end
[/php:1:6370865cab]

Eliot 29.11.2005 13:16

lol

undying = 1

You look, but You dont see...
You are blindfoldly updating Your files with things that You download from PP.
Man, You showed us citizens,
as far as i remember these were used in some Cat quest posted by someone...and You used them, not knowing what You are doing actually.

horyfilipe 29.11.2005 13:46

Actualy im not the one who takes care of such things.. sorry for the blindness.. btw i thought all npcs(not mobs) should be undying to avoid users killing them.. err


All times are GMT. The time now is 15:09.