For example I have created this IA:
Code:
class Ragna_Orc_Sorcerer : warrior_ag_casting_3skill_approach_stone
{
handler:
EventHandler MY_DYING(always_list,c1,code_info,i9,last_attacker,lparty,member,random1_list,target)
{
always_list = gg->();
random1_list = gg->();
target = last_attacker;
if( 1 )
{
always_list->SetInfo(0,target);
}
target = last_attacker;
if( myself->HaveMemo(target,426) == 1 )
{
random1_list->SetInfo(1,target);
}
if( lparty->() == 0 )
{
for(i9 = 0; i9 < lparty.member_count; i9 = ( i9 + 1 ))
{
target = myself->GetMemberOfParty(lparty,i9);
if( myself->HaveMemo(target,426) == 1 )
{
random1_list->SetInfo(1,target);
}
}
}
And npcdata:
Code:
npc_begin warrior 548 [Ragna_Orc_Sorcerer] level=54 acquire_exp_rate=1.693649 acquire_sp=43 unsowing=0 clan={@ol_mahum_clan} ignore_clan_list={} clan_help_range=300 slot_chest=[] slot_rhand=[long_sword] slot_lhand=[] shield_defense_rate=0 shield_defense=0 skill_list={@s_race_humanoid} npc_ai={[Ragna_Orc_Sorcerer];{[MoveAroundSocial]=130};{[MoveAroundSocial1]=130};{[MoveAroundSocial2]=130}} category={} race=humanoid sex=male undying=0 can_be_attacked=1 corpse_time=7 no_sleep_mode=0 agro_range=1000 ground_high={110;0;0} ground_low={50;0;0} exp=1495545 org_hp=4xx.xx422 org_hp_regen=3.5 org_mp=2xx.xx org_mp_regen=1.5 collision_radius={13.5;13.5} collision_height={25;25} str=40 int=21 dex=30 wit=20 con=43 men=10 base_attack_type=sword base_attack_range=40 base_damage_range={0;0;80;120} base_rand_dam=30 base_physical_attack=xx.xx125 base_critical=4 physical_hit_modify=4.75 base_attack_speed=253 base_reuse_delay=0 base_magic_attack=xx.xx234 base_defend=xx.xx976 base_magic_defend=xx.xx234 physical_avoid_modify=0 soulshot_count=0 spiritshot_count=0 hit_time_factor=0.46 item_make_list={} corpse_make_list={{[varnish];1;1;xx.xx22};{[boots_lining];1;1;8.2416};{[rp_soulshot_d];1;1;1.2857}} additional_make_list={} additional_make_multi_list={{{{[adena];147;260;100}};70};{{{[bone_shield];1;1;xx.xx59};{[hard_leather_helmet];1;1;xx.xx41}};0.2504};{{{[iron_ore];1;1;xx.xx71};{[stem];1;1;xx.xx43};{[steel];1;1;3.1847};{[rp_adv_comp_soulshot_d];1;1;1.2739}};xx.xx61}} hp_increase=0 mp_increase=0 safe_height=100 npc_end