drzoom
05.02.2006, 07:23
Ok, i just interested, if i use item_skill=[s_soul_crystal] on soul crystal,
would such ai work or not? If no, how to realize it?
Ai.obj
class mob_sa_quest_st_1 : default_npc
{
handler:
EventHandler CREATED()
{
myself.i_ai0 = 0;
myself.c_ai0 = 0;
}
EventHandler SPELLED(speller, skill_name_id)
{
if(skill_name_id == @s_soul_crystal && myself.sm.hp <= myself.sm.maxhp/2)
{
myself.c_ai0=speller;
}
}
}
Would mob understand that i cast soul crystal skill or not?
Thanks.
would such ai work or not? If no, how to realize it?
Ai.obj
class mob_sa_quest_st_1 : default_npc
{
handler:
EventHandler CREATED()
{
myself.i_ai0 = 0;
myself.c_ai0 = 0;
}
EventHandler SPELLED(speller, skill_name_id)
{
if(skill_name_id == @s_soul_crystal && myself.sm.hp <= myself.sm.maxhp/2)
{
myself.c_ai0=speller;
}
}
}
Would mob understand that i cast soul crystal skill or not?
Thanks.