Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Help: Make a new IA for npcs (https://postpacific.loc-online.com/showthread.php?t=7162)

ZeniMax 19.03.2007 13:38

Help: Make a new IA for npcs
 
Hi all
This is my question... I want to make a new IA for c5 npcs but I cant find any example (for a mob) in the forum and why need encrypt the IA?? I dont know this :/, can help me for example to create a basic IA, for npc move, attack... or can give me a guide to create new IA? Thank so much.

ZeniMax 19.03.2007 13:44

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

FidoW 19.03.2007 13:56

Quote:

Originally Posted by ZeniMax (Post 81714)
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

You do what ??

Im going to give at least three reasons you didnt do that..

1. if( 1 )
2. lparty->()
3. gg->()

You only use SauDecompiler... and you are using wrongs ids.


And you dont need to "encrypt", you need to compile NASC to AI.obj language.

ZeniMax 19.03.2007 15:05

Yes from Saudecompiler... ok Fidow what need for create new IA? please give me a basic steps or same.

Aikeleer 19.03.2007 15:45

Compile it yourself using your head. There's someone else on these forums allowing you to encrypt files by publically posting the unencrypted version in a thread out there.

jim2006193 20.03.2007 09:09

*sigh* Are spell checkers dead now? IA?? More like AI...

L2Requiem 20.03.2007 14:55

jim2006193
if you are gonna try to make an L2x reborn let me know if you need any help. I'd love nothing more then to see L2x come back up. im being 100% serious. what happened was a bunch of BS and it would great having them around again.

tpuNIsher 20.03.2007 15:20

He is a friend of mine that helps me out with coding and shiz. I devved at L2x o_o

Anyways, thanks for the offer.

P.S. It's artifical Intelligence not intelligence artificial just like it's L2(Lineage2) not LA2(LineAge2) -_-


All times are GMT. The time now is 15:26.