View Single Post
Old 27.03.2006, 19:31   #1
demon
Архивный участник
 
Join Date: May 2005
Posts: 367
Default [SHARE] NPC ANIMATION GREET, WAVE ETC

its simple

In AI.OBJ into CLASS default_npc adding handlers:


[php:1:eafcdb47f6]


handler 3 // TALKED
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
handler_end

handler 5 // SEE_CREATURE
variable_begin
"creature"
"i0"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_const 4
func_call 55 // func[Rand]
shift_sp -1
push_const 0
equal
branch_false L74001
L74000
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 2
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
L74001
handler_end


[/php:1:eafcdb47f6]

check for duplicate L branches

In all children classes (for all NPC) find "handler 3 // TALKED"
and before string "handler_end" in this handler insert "call_super"

if u make it correct ALL vendors will start cocial move greetings etc

its perfect for demo make an account to my server hehe :P
demon is offline