AI help- RANDOM chance to GIVE ITEM from AI
As topic says i need help with AI
I want to modify the code for s_quiver_of_arrow posted in this forum so mob doesnt always give the item when is despawned.
Actual code gives item ALWAYS when NPC despawns.
I need NPC to give item only SOMETIMES.
here is actual code if some1 can modify it accordying to my request i ll very much apreciate it. thanks a lot.
class summon_mithril_arrow : (null)
handler 13 // CREATED
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // master
push_const 2404
add
fetch_i
push_const 1344
shift_sp 1
push_const 1320
func_call 55 // func[Rand]
shift_sp -1
push_const 480
add
func_call 77 // func[GiveItem1]
shift_sp -3
shift_sp -1
shift_sp 1
func_call 175 // func[Despawn]
shift_sp -1
handler_end
class_end
|