Add routine for hunter mark first step
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import cv2 as cv
|
||||
|
||||
class Spell:
|
||||
def __init__(self, monitor, path, cooldown) -> None:
|
||||
self.monitor = monitor
|
||||
self.spellIcon = cv.imread("assets/spells/" + path, cv.IMREAD_GRAYSCALE)
|
||||
|
||||
def click():
|
||||
self.monitor.findMatchAndClickIfAvailable(self.spellIcon)
|
||||
@@ -1,25 +1,34 @@
|
||||
import time
|
||||
from threading import Thread
|
||||
from core.Logger import Logger
|
||||
from core.Player import CLASSES, SPE
|
||||
|
||||
class FightingAgent:
|
||||
def __init__(self, monitor, player) -> None:
|
||||
self.isCombatModeEnabled = False
|
||||
self.monitor = monitor
|
||||
self.player = player
|
||||
self.classRoutine = None
|
||||
self.logger = Logger("Combat Agent", player.debug)
|
||||
self.hasTarget = False
|
||||
self.combatClass = self.loadCombatClass()
|
||||
self.getRoutine()
|
||||
|
||||
def loadCombatClass(self):
|
||||
return 42
|
||||
|
||||
def getRoutine(self):
|
||||
if (self.player.playerClass == CLASSES.HUNTER and self.player.player.playerSpe == SPE.MARKSMANSHIP):
|
||||
from bots.fighting.hunter.marksmanship.Routine import Routine
|
||||
else:
|
||||
self.logger.log("Cannot find a Routine for your class and spe")
|
||||
self.classRoutine = Routine(self.monitor, self.player)
|
||||
|
||||
def startFighting(self):
|
||||
self.player.checkConnection()
|
||||
self.classRoutine.start()
|
||||
self.isCombatModeEnabled = True
|
||||
|
||||
while self.isCombatModeEnabled is True:
|
||||
|
||||
time.sleep(0.1)
|
||||
self.logger.log("Combat mode is now disabled...")
|
||||
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
from bots.components.spell import Spell
|
||||
|
||||
class Routine:
|
||||
def __init__(self, monitor, player) -> None:
|
||||
self.player = player
|
||||
self.monitor = monitor
|
||||
self.monitor = monitor
|
||||
self.arcaneShotSpell = Spell(monitor, "hunter/general/ArcaneShot.jpg")
|
||||
|
||||
def hasTarget(self):
|
||||
pass
|
||||
|
||||
def start(self):
|
||||
print("Starting fight routine")
|
||||
Reference in New Issue
Block a user