A Project for Chronicle 4 based on L2JServer.


    NPC Monster_Error

    Share

    mauronob

    Posts : 12
    Join date : 2013-10-02

    NPC Monster_Error

    Post  mauronob on 25th April 2014, 20:55

    Hi!

    The problem is that all NPC Monster in Forge of Gods, not reborn and multiply at death, the NPC Monsters only disappear.

    Same bug/problem with the NPC Monster in Forsaken Plains, the Orc Shaman not become tigers after death.

    regards
    avatar
    Cartman

    Posts : 90
    Join date : 2013-10-02
    Age : 41
    Location : Villa Raffo, Argentina

    Re: NPC Monster_Error

    Post  Cartman on 25th April 2014, 21:28

    yes, I have this problem too
    avatar
    Karakan

    Posts : 437
    Join date : 2013-10-04

    Re: NPC Monster_Error

    Post  Karakan on 2nd May 2014, 13:28

    You could try using the toi angel ai to fix those problems.


    Code:
    import sys
    from net.sf.l2j.gameserver.ai import CtrlIntention
    from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

    # Angel spawns...when one of the angels in the keys dies, the other angel will spawn.

    class polymorphing_angel(JQuest) :

        # init function.  Add in here variables that you'd like to be inherited by subclasses (if any)
        def __init__(self,id,name,descr):
            self.AngelSpawns ={
                    830:859,
                    1067:1068,
                    1063:1062,
                    831:860,
                    1070:1071
                    }
            # finally, don't forget to call the parent constructor to prepare the event triggering
            # mechanisms etc.
            JQuest.__init__(self,id,name,descr)

        def onKill (self,npc,player,isPet):
            npcId = npc.getNpcId()
            if self.AngelSpawns.has_key(npcId) :
                newNpc = self.addSpawn(self.AngelSpawns[npcId],npc)
                killer = player
                if isPet :
                    killer = player.getPet()
                newNpc.setRunning()
                newNpc.addDamageHate(killer,0,99999)
                newNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer)
            return

    # now call the constructor (starts up the ai)
    QUEST = polymorphing_angel(-1,"polymorphing_angel","ai")

    for i in QUEST.AngelSpawns.keys() :
        QUEST.addKillId(i)



    However they should polymorp during the fight and not after death.
    The java implementation is here from l2j

    LINK

    mauronob

    Posts : 12
    Join date : 2013-10-02

    Re: NPC Monster_Error

    Post  mauronob on 6th May 2014, 10:27

    Karakan wrote:You could try using the toi angel ai to fix those problems.


    Code:
    import sys
    from net.sf.l2j.gameserver.ai import CtrlIntention
    from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

    # Angel spawns...when one of the angels in the keys dies, the other angel will spawn.

    class polymorphing_angel(JQuest) :

        # init function.  Add in here variables that you'd like to be inherited by subclasses (if any)
        def __init__(self,id,name,descr):
            self.AngelSpawns ={
                    830:859,
                    1067:1068,
                    1063:1062,
                    831:860,
                    1070:1071
                    }
            # finally, don't forget to call the parent constructor to prepare the event triggering
            # mechanisms etc.
            JQuest.__init__(self,id,name,descr)

        def onKill (self,npc,player,isPet):
            npcId = npc.getNpcId()
            if self.AngelSpawns.has_key(npcId) :
                newNpc = self.addSpawn(self.AngelSpawns[npcId],npc)
                killer = player
                if isPet :
                    killer = player.getPet()
                newNpc.setRunning()
                newNpc.addDamageHate(killer,0,99999)
                newNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer)
            return

    # now call the constructor (starts up the ai)
    QUEST = polymorphing_angel(-1,"polymorphing_angel","ai")

    for i in QUEST.AngelSpawns.keys() :
        QUEST.addKillId(i)



    However they should polymorp during the fight and not after death.
    The java implementation is here from l2j

    LINK

    Thanks for the data, I will adapt to the other npc's
    regards
    avatar
    Karakan

    Posts : 437
    Join date : 2013-10-04

    Re: NPC Monster_Error

    Post  Karakan on 6th May 2014, 22:07


    Sponsored content

    Re: NPC Monster_Error

    Post  Sponsored content


      Current date/time is 18th December 2017, 22:19