A Project for Chronicle 4 based on L2JServer.


    503_PursuitClanAmbition [FIXED]

    Share
    avatar
    Karakan

    Posts : 428
    Join date : 2013-10-04

    503_PursuitClanAmbition [FIXED]

    Post  Karakan on 25th August 2017, 14:27

    I think this is the last quest with a little bug in the code.  Cool


    Code:
    def onAttack(self, npc, player, damage, isPet):
                    if (npc.getCurrentHp() - damage) <= (npc.getMaxHp()/2) :
                        if not self.spawnedSlaves :
                             for j in range(2):
                                 for k in range(2):
                                     self.addSpawn(5180,npc.getX()+70*pow(-1,j%2),npc.getY()+70*pow(-1,k%2),npc.getZ(),0,False,0)
                             self.spawnedSlaves = True
                        else:
                             if self.getRandom(100) <= 20:
                                 player.teleToLocation(179549,6445,-2708,1)
     return



    Code:

    /Lisvus_GameServer_C4/gameserver/data/scripts/quests/503_PursuitClanAmbition/__init__.py
    Traceback (innermost last):
      File "__init__.py", line 379, in onAttack
    AttributeError: getRandom

     at org.python.core.Py.AttributeError(Unknown Source)
     at org.python.core.PyInstance.invoke(Unknown Source)
     at org.python.pycode.serializable._pyx1503481965267.onAttack$8(__init__.py:379)
     at org.python.pycode.serializable._pyx1503481965267.call_function(__init__.py)
     at org.python.core.PyTableCode.call(Unknown Source)
     at org.python.core.PyTableCode.call(Unknown Source)
     at org.python.core.PyTableCode.call(Unknown Source)
     at org.python.core.PyFunction.__call__(Unknown Source)
     at org.python.core.PyMethod.__call__(Unknown Source)
     at org.python.core.PyObject.__call__(Unknown Source)
     at org.python.core.PyObject._jcallexc(Unknown Source)
     at org.python.core.PyObject._jcall(Unknown Source)
     at org.python.proxies.main$Quest$310.onAttack(Unknown Source)
     at net.sf.l2j.gameserver.model.quest.Quest.notifyAttack(Quest.java:366)
     at net.sf.l2j.gameserver.model.L2Attackable.addDamage(L2Attackable.java:860)
     at net.sf.l2j.gameserver.model.L2Attackable.reduceCurrentHp(L2Attackable.java:416)
     at net.sf.l2j.gameserver.model.L2Attackable.reduceCurrentHp(L2Attackable.java:394)
     at net.sf.l2j.gameserver.model.L2Character.onHitTimer(L2Character.java:5321)
     at net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.onHitTimer(L2PcInstance.java:4385)
     at net.sf.l2j.gameserver.model.L2Character$HitTask.run(L2Character.java:2190)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     at java.lang.Thread.run(Thread.java:745)





    Last edited by Karakan on 26th August 2017, 10:07; edited 1 time in total
    avatar
    DnR
    Admin
    Admin

    Posts : 1027
    Join date : 2012-12-03

    Re: 503_PursuitClanAmbition [FIXED]

    Post  DnR on 25th August 2017, 23:03

    Fixed! Thanks for reporting. Wink

      Current date/time is 24th November 2017, 09:25