Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 09.03.2006, 02:01   #1
Eanae
Архивный участник
 
Join Date: Jun 2005
Posts: 262
Default [Share] Valakas AI + Skills

From 99net. Works perfectly. Now only if my npcs would show their skill animations

Code:
class valakas : warrior
parameter_define_begin
   int DDMagic 1198081
   int DDMagic1 1198337
   int DDMagic2 1198593
   int DDMagic3 1200641
   int DDMagic4 1199361
   int DDMagic5 1199873
   int DDMagic6 1198849
   int DDMagic7 1199105
   int DDMagic8 1200129    
   int DDMagic9 1200385                        
parameter_define_end
handler 1    // ATTACKED
   variable_begin
       "attacker"
       "damage"
       "myself"
       "_choiceN"
       "_code"
       "_from_choice"
   variable_end

   push_event    // attacker
   push_const 36
   add
   fetch_i    // is_pc
   push_const 108
   add
   fetch_i
   push_const 0
   not_equal
   push_reg_sp
   fetch_i
   branch_true L2041
   shift_sp 1
   push_const 9
   push_event    // attacker
   push_const 36
   add
   fetch_i    // npc_class_id
   push_const 1620
   add
   fetch_i
   func_call 143    // func[IsInCategory]
   shift_sp -2
   or
L2041
   branch_false L7
L2042
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 20
   less
   branch_false L2
L0    
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1
L1
   shift_sp 1
   push_const 9001
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7
L2    
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 30
   less
   branch_false L5
L3    
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic1
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1    
L4
   shift_sp 1
   push_const 9002
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7    
L5
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 40
   less
   branch_false L9
L6    
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic2
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1        
L8    
   shift_sp 1
   push_const 9003
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7        
L9
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 50
   less
   branch_false L9
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic3
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1        
L10    
   shift_sp 1
   push_const 9004
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7    
L11
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 20
   less
   branch_false L13
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic4
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1        
L12    
   shift_sp 1
   push_const 9005
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7    
L13    
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 30
   less
   branch_false L15
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic5
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1        
L14    
   shift_sp 1
   push_const 9006
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7    
L15
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 40
   less
   branch_false L17
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic6
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1        
L16    
   shift_sp 1
   push_const 9007
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7    
L17    
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 50
   less
   branch_false L19
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic7
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1        
L18    
   shift_sp 1
   push_const 9008
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7    
L19    
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 20
   less
   branch_false L21
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic8
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1        
L20    
   shift_sp 1
   push_const 9009
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7    
L21    
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 99
   less
   branch_false L23
   shift_sp 1
   push_event    // attacker
   push_const 36
   add
   fetch_i
   push_parameter DDMagic9
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_event    // attacker
   push_const 36
   add
   fetch_i
   assign
   shift_sp -1        
L22    
   shift_sp 1
   push_const 9010
   push_const 1000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L7    
L23                            
L7            
handler_end

handler 62    // USE_SKILL_FINISHED
   variable_begin
       "i1"
       "i2"
       "c2"
       "myself"
       "_choiceN"
       "_code"
       "_from_choice"
   variable_end

   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i    // alive
   push_const 112
   add
   fetch_i
   push_const 0
   equal
   branch_false L0
L10    
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   push_reg_sp
   fetch_i
   push_const 0    
   assign
   shift_sp -1
   exit_handler    
L0    
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 20
   less
   branch_false L2
L1    
   shift_sp 1
   push_const 9001
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5
L2
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L4
L3        
   shift_sp 1
   push_const 9002
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L4    
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L7
L6        
   shift_sp 1
   push_const 9003
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L7
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L9
L8        
   shift_sp 1
   push_const 9004
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L9
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L11
L10        
   shift_sp 1
   push_const 9005
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L11
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L13
L12        
   shift_sp 1
   push_const 9006
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L13
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L15
L14        
   shift_sp 1
   push_const 9007
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L15
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L17
L16        
   shift_sp 1
   push_const 9008
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L17
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L19
L18        
   shift_sp 1
   push_const 9009
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L19
   shift_sp 1
   push_const 100
   func_call 55    // func[Rand]
   shift_sp -1
   push_const 25
   less
   branch_false L21
L20        
   shift_sp 1
   push_const 9010
   push_const 2000
   func_call 28    // func[AddTimerEx]
   shift_sp -2
   shift_sp -1
   jump L5    
L21                            
L5
handler_end

handler 12    // TIMER_FIRED_EX
   variable_begin
       "timer_id"
       "c0"
       "_choiceN"
       "_code"
       "_from_choice"
   variable_end

   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9001
   equal
   branch_false L2
L1
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10
L2
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9002
   equal
   branch_false L4
L3
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic1
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10    
L4
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9003
   equal
   branch_false L6
L5
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic2
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10    
L6
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9004
   equal
   branch_false L8
L7
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic3
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10
L8
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9005
   equal
   branch_false L11
L9
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic4
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10
L11
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9006
   equal
   branch_false L13
L12
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic5
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10
L13
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9007
   equal
   branch_false L15
L14
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic6
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10
L15
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9008
   equal
   branch_false L17
L16
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic7
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10
L17
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9009
   equal
   branch_false L19
L18
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic8
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10
L19
   push_event    // timer_id
   push_const 176
   add
   fetch_i
   push_const 9010
   equal
   branch_false L10
L20
   shift_sp 1
   push_event    // myself
   push_const 28
   add
   fetch_i    // c_ai0
   push_const 2380
   add
   fetch_i
   push_parameter DDMagic9
   push_const 0
   push_const 1
   push_const 1000000
   func_call 10    // func[AddUseSkillDesire]
   shift_sp -5
   shift_sp -1
   jump L10                                
L10    
    call_super
handler_end

class_end



//npcdata
npc_begin    boss    12899    [valakas]    level=80    exp=1852076150    acquire_exp_rate=200    undying=0    can_be_attacked=1    acquire_sp=540000    race=dragon    sex=male    temper=100    safe_height=100    org_jump=15    skill_list={@s_full_magic_defence;@s_dragon_weakness}    magic_list={}    max_item=50    item_make_list={}    corpse_make_list={}    additional_make_list={}    additional_make_multi_list={{{{[adena];300000;400000;100}};100};{{{[royalty_knight_mail];1;1;36};{[royalty_knight_gaiters];1;1;36};{[royalty_knight_gloves];1;1;36};{[royalty_knight_boots];1;1;36};{[royalty_knight_shield];1;1;36};{[royalty_knight_helmet];1;1;36};{[unite_mail];1;1;36};{[unite_gloves];1;1;36};{[unite_boots];1;1;36};{[unite_helmet];1;1;36};{[daccraka_gloves];1;1;36};{[daccraka_mail];1;1;36};{[daccraka_boots];1;1;36};{[daccraka_helmet];1;1;36};{[god's_blade_new];1;1;36};{[god's_blade];1;1;25};{[herumoonkuss_hammer];1;1;25}};90};{{{[the_staff_new];1;1;xx.xx65};{[dragon_knife_new];1;1;xx.xx65};{[shining_bow_new];1;1;xx.xx65};{[dragon_axe_new];1;1;xx.xx65};{[aurakyria_lancia_new];1;1;xx.xx65};{[vipers_canine];1;1;xx.xx65}};90};{{{[flamberge_new];1;1;xx.xx28};{[draconic_bow];1;1;xx.xx28};{[mana_potion];10;25;xx.xx285}};80};{{{[scroll_of_escape_to_castle];1;9;35};{[blessed_scroll_of_resurrection];2;10;40};{[scrl_of_ench_wp_s];1;9;25}};100}}    slot_chest=[]    slot_rhand=[]    slot_lhand=[]    base_attack_type=fist    base_can_penetrate=0    base_attack_range=40    base_damage_range={0;0;80;120}    base_rand_dam=30    str=84    int=76    dex=73    wit=70    con=71    men=80    hp_increase=10    mp_increase=3    org_hp_regen=800    org_mp_regen=26    ground_low={50;0;10}    ground_high={186;-30;30}    underwater_low={50;0;10}    underwater_high={0;0;30}    fly_low={0;0;10}    fly_high={0;-30;30}    float_low={0;0;10}    float_high={0;-30;30}    org_earshot=100    sight={0;0;2500;120;5}    agro_range=4096    org_hp=5520000    org_mp=1660.8    base_defend=4800    base_magic_attack=1700    base_magic_defend=440    base_physical_attack=2833    physical_hit_modify=20    physical_avoid_modify=-18    base_attack_speed=333    base_reuse_delay=0    base_critical=4    magic_use_speed_modify=0    status={normal}    align=-4900    collision_radius=230    collision_height=340    category={}    clan={}    clan_help_range=300    guild={}    pledge={}    pledge_leader=0    alliance={}    alliance_leader=0    ignore_clan_list={}    ruler=0    ruling_domain={}    npc_ai={[valakas]}    corpse_time=14    no_sleep_mode=1    npc_end

//skilldata
skill_begin    skill_name = [Balakas_Lava_Skin]    /* [??]    */    skill_id = 4680    level =    1    operate_type = A2    magic_level = 80    operate_type = A1    magic_level = 80    effect = {{t_hp;-80;1}}    is_magic = 0    mp_consume2 = 0    cast_range = -1    effective_range    = -1    skill_hit_time = 3.3    skill_cool_time    = 1.5    skill_hit_cancel_time =    0.5    reuse_delay    = 0 activate_rate = 35 lv_bonus_rate    = 1 basic_property = wit abnormal_time    = 30 abnormal_lv = 4 abnormal_type = dot_attr    attribute = attr_fire effect_point = -331 target_type =    self affect_scope = point_blank affect_range = 200 affect_object = not_friend next_action =    none    skill_end
skill_begin    skill_name = [Balakas_Trample]    /* [??]    */    skill_id = 4681    level =    1    operate_type = A1    magic_level = 80    effect = {{i_p_attack_over_hit;11000}}    is_magic = 0    mp_consume2 = 0    cast_range = 50    effective_range    = 200    skill_hit_time = 1    skill_cool_time    = 1.5    skill_hit_cancel_time =    0.5    reuse_delay = 0    attribute = attr_none    effect_point = -100    target_type = enemy   affect_scope = single   next_action = none     skill_end
skill_begin    skill_name = [Balakas_Trample1]    /* [??]    */    skill_id = 4682    level =    1    operate_type = A1    magic_level = 80    effect = {{i_p_attack_over_hit;20000}}    is_magic = 0    mp_consume2 = 0    cast_range = 50    effective_range    = 200    skill_hit_time = 1    skill_cool_time    = 1.5    skill_hit_cancel_time =    0.5    reuse_delay = 0    attribute = attr_none    effect_point = -100    target_type = enemy   affect_scope = single   next_action = none     skill_end    

skill_begin    skill_name = [s_balakas_dragon_breath_low]    /* [???? ???] */ skill_id = 4683 level    = 1 operate_type = A2 magic_level = 80    effect = {{t_hp;-100;1}}    is_magic = 1    mp_consume2 = 0 cast_range = 300 effective_range = 700    skill_hit_time = 3 skill_cool_time = 1.5    skill_hit_cancel_time =    0.5 reuse_delay    = 0 activate_rate = 99 lv_bonus_rate    = 1 basic_property = wit abnormal_time    = 30 abnormal_lv = 4 abnormal_type = dot_attr    attribute = attr_fire effect_point = -331 target_type =    enemy affect_scope = single   next_action = none     skill_end
skill_begin    skill_name = [s_balakas_dragon_breath_high]    /* [???? ???] */ skill_id = 4684 level    = 1 operate_type = A2 magic_level = 80    effect = {{t_hp;-150;1}}    is_magic = 1    mp_consume2 = 0 cast_range = 900 effective_range = 1600    skill_hit_time = 3 skill_cool_time = 1.5    skill_hit_cancel_time =    0.5 reuse_delay    = 0 activate_rate = 99 lv_bonus_rate    = 1 basic_property = wit abnormal_time    = 30 abnormal_lv = 4 abnormal_type = dot_attr    attribute = attr_fire effect_point = -331 target_type =    enemy affect_scope = range affect_range = 400 affect_object = not_friend next_action =    none    skill_end
skill_begin    skill_name = [Balakas_Tail_Stomp]    /* [? ?? ??] */    skill_id = 4685    level =    1    operate_type = A1    magic_level = 80    effect = {{i_m_attack;200}}    is_magic = 0    mp_consume2 = 0    cast_range = -1    effective_range    = -1    skill_hit_time = 3    skill_cool_time    = 0    skill_hit_cancel_time =    1.5    reuse_delay = 0    attribute = attr_none    effect_point = -100    target_type = enemy    affect_scope = square    affect_object =    not_friend    fan_range = {0;0;1200;300}    next_action = none    skill_end            
skill_begin    skill_name = [Balakas_Tail_Stomp1] /* [??] */     skill_id = 4687 level = 1     operate_type = A1     magic_level =    80     effect = {{i_m_attack;350}}     is_magic = 0     mp_consume2 = 0    cast_range = -1    effective_range    = -1    skill_hit_time = 3    skill_cool_time    = 0    skill_hit_cancel_time =    1.5    reuse_delay = 0    attribute = attr_none    effect_point = -100    target_type = enemy    affect_scope = square    affect_object =    not_friend    fan_range = {0;0;1200;300}    next_action = none    skill_end            
skill_begin    skill_name = [s_balakas_tail_lash]    /* [??]    */    skill_id = 4688    level =    1    operate_type = A2    magic_level = 80    effect = {{i_p_attack_over_hit;11000};{p_block_act}}    is_magic = 0    mp_consume2 = 0    cast_range = -1    effective_range    = -1    skill_hit_time = 3    skill_cool_time    = 1.5    skill_hit_cancel_time =    0.5    reuse_delay = 0    activate_rate =    -1    lv_bonus_rate =    0    basic_property = none    abnormal_time =    15    abnormal_lv = 1    abnormal_type =    stun    attribute = attr_shock    effect_point = -100    target_type = self    affect_scope = square_pb    affect_object =    not_friend    fan_range = {0;180;1500;400}    next_action = none    abnormal_visual_effect = ave_stun    skill_end
skill_begin    skill_name = [s_balakas_fear]    /* [??]    */    skill_id = 4689    level =    1    operate_type = A2    magic_level = 80    effect = {{p_fear};{p_block_controll};{i_save_position}}    is_magic = 0    mp_consume2 = 0    cast_range = -1    effective_range    = -1    skill_hit_time = 3    skill_cool_time    = 1.5    skill_hit_cancel_time =    0.5    reuse_delay = 0    activate_rate =    90    lv_bonus_rate =    1    basic_property = wit    abnormal_time =    15    abnormal_lv = 1    abnormal_type =    turn_flee    attribute = attr_derangement    effect_point = -100    target_type = enemy_only    affect_scope = range    affect_range = 400    affect_object =    not_friend    next_action = none    skill_end
skill_begin    skill_name = [Balakas_Meteor_Storm]    /* [?? ?? ?? ??] */    skill_id = 4690    level =    1    operate_type = A1    magic_level = 80    effect = {{i_p_attack_over_hit;28000}}    is_magic = 0    mp_consume2 = 0    cast_range = -1    effective_range    = -1    skill_hit_time = 8    skill_cool_time    = 3    skill_hit_cancel_time =    1.5    reuse_delay = 0    attribute = attr_fire    effect_point = -100    target_type = enemy    affect_scope = range    affect_range = 800    affect_object =    not_friend    next_action = none    skill_end

//skillpch
[Balakas_Lava_Skin] = 1198081
[Balakas_Trample] = 1198337
[Balakas_Trample1] = 1198593
[s_balakas_dragon_breath_low] = 1198849
[s_balakas_dragon_breath_high] = 1199105
[Balakas_Tail_Stomp] = 1199361
[Balakas_Tail_Stomp1] = 1199873
[s_balakas_tail_lash] = 1200129
[s_balakas_fear] = 1200385
[Balakas_Meteor_Storm] = 1200641

//skillpch2
1198081 200 0 0 3 -100 29 -1 0 3 -3 0 -12345
1198337 50 0 0 3 -100 29 -1 0 3 -3 0 -12345
1198593 50 0 0 3 -100 29 -1 0 3 -3 0 -12345
1198849 300 0 0 3 -331 12 32 4 3 -3 1 -12345
1199105 900 0 0 3 -331 12 32 4 3 -3 1 -12345
1199361 -1 0 0 3 -100 29 -1 0 3 -3 0 -12345
1199873 -1 0 0 3 -100 29 -1 0 3 -3 0 -12345
1200129 -1 0 0 0 -100 18 41 1 3 -3 0 -12345
1200385 -1 0 0 4 -100 19 56 1 3 -3 0 -12345
1200641 -1 0 0 3 -100 12 -1 0 8 -9 0 -12345
Eanae is offline  
Old 09.03.2006, 02:10   #2
Megatronpt
Архивный участник
 
Join Date: Jan 2006
Posts: 584
Default

Thanks Eanae!

Maybe Hex is needed for Anims, don't you think?
Megatronpt is offline  
Old 09.03.2006, 02:35   #3
Kenster
Архивный участник
 
Join Date: Sep 2005
Posts: 455
Default

No. I thought there was an AI function. So you would just this AI, uncompiled, then add the animation, and your good to go. Skill animation should work fine.
Kenster is offline  
Old 09.03.2006, 02:49   #4
Megatronpt
Архивный участник
 
Join Date: Jan 2006
Posts: 584
Default

/*Off topic

It's strange.. sometimes I understand better the "Transladated English" from the russians, than you Kenster..

EOF*/
Megatronpt is offline  
Old 09.03.2006, 02:52   #5
Eanae
Архивный участник
 
Join Date: Jun 2005
Posts: 262
Default

Quote:
Originally Posted by Kenster
No. I thought there was an AI function. So you would just this AI, uncompiled, then add the animation, and your good to go. Skill animation should work fine.
Mind Explaining a bit? AI isn't one of my strong points.
Eanae is offline  
Old 09.03.2006, 06:05   #6
Xellos
Архивный участник
 
Join Date: Feb 2006
Posts: 88
Default

the animations of the npc is bound to skills.
when the AI uses the right skill, the client will display the animation

btw - this AI is using all the skills but not with the right checks!
s_valakas_tail_stomp <- should not be used when the PC is in front of Valakas

the AI contains some small mistakes (it's a copy-n-paste patchwork)
here is a slightly corrected nasc-style version of this AI:
[php:1:b2de5df799].
class valakas : warrior
{
handler:
EventHandler ATTACKED(attacker)
{
if (attacker.is_pc != 0 || IsInCategory(@npc_summon_group, attacker.npc_class_id)) {
if (Rand(100) < 20) {
AddUseSkillDesire(attacker, @s_valakas_lava_skin, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9001, 1000);
} else if (Rand(100) < 30) {
AddUseSkillDesire(attacker, @s_valakas_trample, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9002, 1000);
} else if (Rand(100) < 40) {
AddUseSkillDesire(attacker, @s_valakas_trample_ex, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9003, 1000);
} else if (Rand(100) < 50) {
AddUseSkillDesire(attacker, @s_valakas_meteor_storm, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9004, 1000);
} else if (Rand(100) < 20) {
AddUseSkillDesire(attacker, @s_valakas_tail_stomp, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9005, 1000);
} else if (Rand(100) < 30) {
AddUseSkillDesire(attacker, @s_valakas_tail_stomp_ex, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9006, 1000);
} else if (Rand(100) < 40) {
AddUseSkillDesire(attacker, @s_valakas_breath_low, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9007, 1000);
} else if (Rand(100) < 50) {
AddUseSkillDesire(attacker, @s_valakas_breath_high, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9008, 1000);
} else if (Rand(100) < 20) {
AddUseSkillDesire(attacker, @s_valakas_tail_lash, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9009, 1000);
} else if (Rand(100) < 99) {
AddUseSkillDesire(attacker, @s_valakas_fear, 0, 1, 1000000);
myself.c_ai0 = attacker;
AddTimerEx(9010, 1000);
}
}
}

EventHandler USE_SKILL_FINISHED()
{
if (myself.c_ai0.alive == 0) {
myself.c_ai0 = 0;
exit;
}
if (Rand(100) < 20) {
AddTimerEx(9001, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9002, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9003, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9004, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9005, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9006, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9007, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9008, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9009, 2000);
} else if (Rand(100) < 25) {
AddTimerEx(9010, 2000);
}
}

EventHandler TIMER_FIRED_EX(timer_id)
{
if (timer_id == 9001) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_lava_skin, 0, 1, 1000000);
} else if (timer_id == 9002) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_trample, 0, 1, 1000000);
} else if (timer_id == 9003) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_trample_ex, 0, 1, 1000000);
} else if (timer_id == 9004) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_meteor_storm, 0, 1, 1000000);
} else if (timer_id == 9005) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_tail_stomp, 0, 1, 1000000);
} else if (timer_id == 9006) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_tail_stomp_ex, 0, 1, 1000000);
} else if (timer_id == 9007) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_breath_low, 0, 1, 1000000);
} else if (timer_id == 9008) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_breath_high, 0, 1, 1000000);
} else if (timer_id == 9009) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_tail_lash, 0, 1, 1000000);
} else if (timer_id == 9010) {
AddUseSkillDesire(myself.c_ai0, @s_valakas_fear, 0, 1, 1000000);
}
super;
}
}[/php:1:b2de5df799]

there are no range checks,
np mp/hp checks,
no tracking of different attackers,
no tracking/attacking of buffers/supporters.
he acts like a normal (non agressive) warrior with 10 extra skills
(and quickly floods his desire queue)

ok, it's working but only a quick-n-dirty way to get him ingame ^^
Xellos is offline  
Old 09.03.2006, 06:20   #7
Kenster
Архивный участник
 
Join Date: Sep 2005
Posts: 455
Default

Thanks, I wanted that badly :P
Kenster is offline  
Old 09.03.2006, 06:44   #8
silent
Архивный участник
 
Join Date: Jan 2006
Posts: 55
Default

Nice one eanae
silent is offline  
Old 09.03.2006, 07:03   #9
archy
Архивный участник
 
Join Date: Mar 2005
Posts: 280
Default

The AI is crap, those of you who feel at home in AI, knows what im talking about - im sure..
archy is offline  
Old 09.03.2006, 07:17   #10
Xellos
Архивный участник
 
Join Date: Feb 2006
Posts: 88
Default

that's what I said, it's only a quick-n-dirty thing...

for example, it uses the first skill twice (after first attack)
1sec after a skill is finished a new skill is added to desire queue...
and ... the next skill ist casted on the last attacker ... and some more things

that's why i posted the nasc style ai... because it's easier to read
Xellos is offline  
Old 13.03.2006, 07:26   #11
nitromaxboi
Архивный участник
 
Join Date: Feb 2005
Posts: 62
Default

yes and it crashes the npc server when its summoned for sometime
nitromaxboi is offline  
Old 14.03.2006, 17:54   #12
Shraier
Архивный участник
 
Join Date: Feb 2006
Posts: 137
Default Re: [Share] Valakas AI + Skills

NPC server doesn't crash. I had it summoned for one hour or so and it didn't crash.
Shraier is offline  
Old 15.03.2006, 05:53   #13
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

Fast And easy..
tpuNIsher is offline  
Old 07.07.2006, 17:29   #14
lexa
Архивный участник
 
Join Date: Aug 2005
Posts: 68
Default

tnx
lexa is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 21:05.