コード例 #1
0
    def run(self):
        p = BigWorld.player()
        pickupNpcId = self.currentQuestData["acNpc"]
        pickupNpcTask = self.currentQuestData["acNpcTk"]
        pickupNpc = entities.findEntityByNpcId(pickupNpcId)

        if pickupNpc:
            if p.position.distTo(pickupNpc.position) > 2:
                self.name = "Moving to pickup quest : " + self.currentQuestData.get(
                    "name", "")
                nav.moveToPathFind((pickupNpc.position.x, pickupNpc.position.y,
                                    pickupNpc.position.z, p.mapID))
                return
            else:
                self.name = "Pickup quest : " + self.currentQuestData.get(
                    "name", "")
                nav.stopMove()
                pickupNpc.acceptQuest(self.currentQuestId)
                self.bot.engine.wait(1)
                return

        if time.time() - self.lastTaskRunTime > 2:
            uiUtils.findPosById(pickupNpcTask)
            self.lastTaskRunTime = time.time()
            self.name = "Moving to pickup quest : " + self.currentQuestData.get(
                "name", "")
            return
コード例 #2
0
 def run(self):
     p = BigWorld.player()
     akuta = entities.findEntityByCharType(23028, 20)
     if akuta and hasattr(akuta, "spellInfo"): # Use this to detect casting :x
         self.state = "Dodge Akuta's attack !"
         nav.stopMove()
         p.faceTo(akuta)
         qingGong.switchToDodge(qingGong.GO_LEFT, p.qinggongMgr)
         self.bot.engine.wait(1)
         return
     GenericQuestCompletor.run(self)
コード例 #3
0
    def onCombat(self, target):
        p = BigWorld.player()
        if p and target:

            # Move close to target if needed
            if self.handleMove:
                tDistance = p.position.distTo(target.position)
                if tDistance > 5:
                    nav.moveToPathFind((target.position.x, target.position.y, target.position.z, p.mapID))
                    return
                else:
                    nav.stopMove()

            # If we are already using a skill, no need to go further...
            if p.isUseSkill():
                return

            # Face the target
            if self.handleMove:
                p.faceTo(target)

            if self.ShadowBreaker.isKnown() and p.position.distTo(target.position) <= 5.0 and self.ShadowBreaker.isUsable() and not self.ShadowBreaker.isOnCooldown():
                self.ShadowBreaker.cast(target)
                return

            if self.MartialInstinctSecret.isKnown() and p.position.distTo(target.position) <= 5.0 and self.MartialInstinctSecret.isUsable() and not self.MartialInstinctSecret.isOnCooldown() and not p.hasState(30804):
                self.MartialInstinctSecret.cast(target)
                return

            if self.MercilessStrike.isKnown() and p.position.distTo(target.position) <= 5.0 and self.MercilessStrike.isUsable() and self.Skypiercer.isOnCooldown():
                self.MercilessStrike.cast(target)
                return

            if self.Skypiercer.isKnown() and p.position.distTo(target.position) <= 5.0 and self.Skypiercer.isUsable():
                self.Skypiercer.cast(target)
                return

            if self.QuickSlash.isKnown() and p.position.distTo(target.position) <= 5.0 and self.QuickSlash.isUsable() and self.MercilessStrike.isOnCooldown() and self.JuggernautSweep.isOnCooldown() and self.MartialInstinctSecret.isOnCooldown() and self.ShadowBreaker.isOnCooldown():
                self.QuickSlash.cast(target)
                return

            if self.JuggernautSweep.isKnown() and p.position.distTo(target.position) <= 5.0 and self.JuggernautSweep.isUsable():
                self.JuggernautSweep.cast(target)
                return
コード例 #4
0
ファイル: Gunslinger.py プロジェクト: LoooooooooooT/Release
    def onCombat(self, target):
        p = BigWorld.player()
        if p and target:

            # Move close to target if needed
            if self.handleMove:
                tDistance = p.position.distTo(target.position)
                if tDistance > 20:
                    nav.moveToPathFind((target.position.x, target.position.y,
                                        target.position.z, p.mapID))
                    return
                else:
                    nav.stopMove()

            # If we are already using a skill, no need to go further...
            if p.isUseSkill():
                return

            # Face the target
            if self.handleMove:
                p.faceTo(target)

            if self.HellfireSalvo.isKnown() and self.HellfireSalvo.isUsable():
                self.HellfireSalvo.cast(target)
                return

            if self.Grenade.isKnown() and self.Grenade.isUsable():
                self.Grenade.cast(target)
                return

            if self.OblivionBomb.isKnown() and self.OblivionBomb.isUsable():
                self.OblivionBomb.cast(target)
                return

            if self.ConcussionBomb.isKnown() and self.ConcussionBomb.isUsable(
            ):
                self.ConcussionBomb.cast(target)
                return

            if self.ThunderShell.isKnown() and self.ThunderShell.isUsable():
                self.ThunderShell.cast(target)
                return
コード例 #5
0
ファイル: SpiritShaper.py プロジェクト: LoooooooooooT/Release
    def onCombat(self, target):
        p = BigWorld.player()
        if p and target:

            # Move close to target if needed
            if self.handleMove:
                tDistance = p.position.distTo(target.position)
                if tDistance > 25:
                    nav.moveToPathFind((target.position.x, target.position.y,
                                        target.position.z, p.mapID))
                    return
                else:
                    nav.stopMove()

            # If we are already using a skill, no need to go further...
            if p.isUseSkill():
                return

            # Face the target
            if self.handleMove:
                p.faceTo(target)

            if self.FireflyHex.isKnown() and p.position.distTo(
                    target.position) <= 25.0 and self.FireflyHex.isUsable():
                self.FireflyHex.cast(target)
                return

            if self.SpectralMagpie.isKnown() and p.position.distTo(
                    target.position) <= 25.0 and self.SpectralMagpie.isUsable(
                    ):
                self.SpectralMagpie.cast(target)
                return

            if self.EssenceOfSpring.isKnown(
            ) and self.EssenceOfSpring.isUsable():
                self.EssenceOfSpring.cast(p)
                return

            if self.MionideBells.isKnown() and p.position.distTo(
                    target.position) <= 25.0 and self.MionideBells.isUsable():
                self.MionideBells.cast(target)
                return
コード例 #6
0
    def onCombat(self, target):
        p = BigWorld.player()
        if p and target:

            # Move close to target if needed
            if self.handleMove:
                tDistance = p.position.distTo(target.position)
                if tDistance > 20:
                    nav.moveToPathFind((target.position.x, target.position.y,
                                        target.position.z, p.mapID))
                    return
                else:
                    nav.stopMove()

            # If we are already using a skill, no need to go further...
            if p.isUseSkill():
                return

            # Face the target
            if self.handleMove:
                p.faceTo(target)

            if self.SearingWake.isKnown() and self.SearingWake.isUsable(
            ) and p.ammoNum >= 5:
                self.SearingWake.cast(target)
                return

            if self.LightningOrb.isKnown() and self.LightningOrb.isUsable():
                self.LightningOrb.cast(target)
                return

            if self.AngelFire.isKnown() and self.AngelFire.isUsable():
                self.AngelFire.cast(target)
                return

            if self.LambentBolt.isKnown() and self.LambentBolt.isUsable():
                self.LambentBolt.cast(target)
                return
コード例 #7
0
ファイル: Occultist.py プロジェクト: LoooooooooooT/Release
    def onCombat(self, target):
        p = BigWorld.player()
        if p and target:

            # Move close to target if needed
            if self.handleMove:
                tDistance = p.position.distTo(target.position)
                if tDistance > 25:
                    nav.moveToPathFind((target.position.x, target.position.y,
                                        target.position.z, p.mapID))
                    return
                else:
                    nav.stopMove()

            # If we are already using a skill, no need to go further...
            if p.isUseSkill():
                return

            # Face the target
            if self.handleMove:
                p.faceTo(target)

            if self.DemonsRancor.isKnown() and p.position.distTo(
                    target.position) <= 25.0 and self.DemonsRancor.isUsable():
                self.DemonsRancor.cast(target)
                return

            if self.CreepingPain.isKnown() and p.position.distTo(
                    target.position) <= 25.0 and self.CreepingPain.isUsable():
                self.CreepingPain.cast(target)
                return

            if self.HellfireClaw.isKnown() and p.position.distTo(
                    target.position) <= 25.0 and self.HellfireClaw.isUsable():
                self.HellfireClaw.cast(target)
                return
コード例 #8
0
    def onCombat(self, target):
        p = BigWorld.player()
        if p and target:

            # Move close to target if needed
            if self.handleMove:
                tDistance = p.position.distTo(target.position)
                if tDistance > 3:
                    nav.moveToPathFind((target.position.x, target.position.y,
                                        target.position.z, p.mapID))
                    return
                else:
                    nav.stopMove()

            # If we are already using a skill, no need to go further...
            if p.isUseSkill():
                return

            # Face the target
            if self.handleMove:
                p.faceTo(target)

            if self.ConquerorSweep.isKnown() and p.position.distTo(
                    target.position) <= 3.0 and self.ConquerorSweep.isUsable():
                self.ConquerorSweep.cast(target)
                return

            if self.TornadoSweep.isKnown() and p.position.distTo(
                    target.position) <= 3.0 and self.TornadoSweep.isUsable():
                self.TornadoSweep.cast(target)
                return

            if self.HeroicStrike.isKnown() and p.position.distTo(
                    target.position) <= 3.0 and self.HeroicStrike.isUsable():
                self.HeroicStrike.cast(target)
                return