Thread: ≈ hp check in ai.obj
View Single Post
Old 09.11.2005, 14:11   #1
avatard
Архивный участник
 
Join Date: Feb 2005
Posts: 100
Default hp check in ai.obj

How do I go about checking if the mobile has more than 95% of hitpoints left in ai.obj?

I've tried this code, but it wouldn't parse the ai.obj :[


push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i // hp
push_const 344
add
fetch_d
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i // max_hp
push_const 1000
add
fetch_d
push_const 1xx.xx0000
div
push_const xx.xx0000
mul
greater
shift_sp 1
func_call 175 // func[Despawn]
shift_sp -1
avatard is offline