Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [SHARE] AI for party with self-healing as C3 (https://postpacific.mmorpg-game.online/showthread.php?t=2588)

andreagighi 21.11.2005 01:03

[SHARE] AI for party with self-healing as C3
 
AI code for party with self-healing guard as many C3 clan got.

Code:

class party_private_casting_heal : party_private
parameter_define_begin
        int DDHeal 1024257
        int PartyNPCBoss 1000761
        int PartyNPCPrivate 1000762
parameter_define_end

handler 23        //  CLAN_ATTACKED
        variable_begin
                "attacker"
                "victim"
                "damage"
                "myself"
                "_choiceN"
                "_code"
                "_from_choice"
        variable_end

        push_event        //  victim
        push_const 40
        add
        fetch_i        //  npc_class_id
        push_const 1620
        add
        fetch_i
        push_parameter PartyNPCBoss
        equal
        push_reg_sp
        fetch_i
        branch_true L49973
        push_event        //  victim
        push_const 40
        add
        fetch_i        //  npc_class_id
        push_const 1620
        add
        fetch_i
        push_parameter PartyNPCPrivate
        equal
        or
L49973
        push_reg_sp
        fetch_i
        branch_false L49974
        push_event        //  victim
        push_const 40
        add
        fetch_i        //  hp
        push_const 344
        add
        fetch_d
        push_event        //  victim
        push_const 40
        add
        fetch_i        //  max_hp
        push_const 1000
        add
        fetch_d
        push_const 0.600000
        mul
        less
        and
        push_reg_sp
        fetch_i
        branch_false L49974
        shift_sp 1
        push_const 100
        func_call 55        //  func[Rand]
        shift_sp -1
        push_const 20
        less
        and
L49974
        branch_false L49976
L49975
        shift_sp 1
        push_const 1040647
        func_call 155        //  func[Skill_GetConsumeMP]
        shift_sp -1
        push_event        //  myself
        push_const 28
        add
        fetch_i        //  sm
        push_const 2400
        add
        fetch_i        //  mp
        push_const 352
        add
        fetch_d
        less
        push_reg_sp
        fetch_i
        branch_false L49977
        shift_sp 1
        push_parameter DDHeal
        func_call 154        //  func[Skill_GetConsumeHP]
        shift_sp -1
        push_event        //  myself
        push_const 28
        add
        fetch_i        //  sm
        push_const 2400
        add
        fetch_i        //  hp
        push_const 344
        add
        fetch_d
        less
        and
        push_reg_sp
        fetch_i
        branch_false L49977
        shift_sp 1
        push_parameter DDHeal
        func_call 160        //  func[Skill_InReuseDelay]
        shift_sp -1
        push_const 0
        equal
        and
L49977
        branch_false L49979
L49978
        shift_sp 1
        push_event        //  victim
        push_const 40
        add
        fetch_i
        push_parameter DDHeal
        push_const 1
        push_const 1
        push_const 1000000
        func_call 10        //  func[AddUseSkillDesire]
        shift_sp -5
        shift_sp -1
L49979
L49976
handler_end

class_end

Example:
Code:

npc_ai={[pytan_knight];{[DDHeal]=@s_npc_heal5};{[PartyNPCBoss]=@pytan};{[PartyNPCPrivate]=@pytan_knight}}

RmzVoid 21.11.2005 03:22

I donk know really for C3 group mobs, but if they heal self on off serv, this good share

Flamestrike 21.11.2005 09:56

Sweet. And the id's of the party groups can be changed also :P
Nice work m8.

HF 03.12.2005 20:51

need change skill_id for correct work animation

npc_ai={[pytan_knight];{[DDHeal]=@s_npc_life_chant7};{[PartyNPCBoss]=@pytan};{[PartyNPCPrivate]=@pytan_knight}}

class party_private_casting_heal : party_private
parameter_define_begin
int DDHeal 1048839 // @s_npc_life_chant7
...

rodier 04.12.2005 04:34

but where find which NPCs are in which clan ? can you share your part of npcdata with npcs using this code?
thanks a lot

HF 04.12.2005 14:39

Quote:

Originally Posted by rodier
but where find which NPCs are in which clan ? can you share your part of npcdata with npcs using this code?
thanks a lot

Example above. LoA boss - Pytan and bodyguard - Pytan Knight. part from npcdata for Knight and change ai class for knight:

class pytan_knight : party_private_casting_heal
class_end

It is hard?

Exist more mobs with this Heal skill to Private Leader. Do search in npcdata for this skill and find it. If you have good npcdata sure ;)

lexa 11.06.2006 22:55

tnx, good share


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