Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #13 from MuriloChianfa/Waypoints
Browse files Browse the repository at this point in the history
Waypoints
  • Loading branch information
MuriloChianfa authored Jun 23, 2020
2 parents 9d00073 + 5f117ae commit 477231d
Show file tree
Hide file tree
Showing 708 changed files with 473 additions and 128 deletions.
29 changes: 23 additions & 6 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

153 changes: 142 additions & 11 deletions Conf/Constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
MainPath = "images"

# Percentage For ScanStages.py, More Percents Require Mode Hardware Work ! But Elevate The Bot Precision
Percentage = [100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5]
Priority = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Expand All @@ -12,22 +14,118 @@

# region Items

ItemsPath = MainPath + "/Items/"

ContainersNamePath = ItemsPath + "ContainersName/"

CornersItemsPath = ItemsPath + "Corners/"
FramesItemsPath = ItemsPath + "Frames/"
NoneItemsPath = ItemsPath + "Nome/"


# Containers
Containers = {
"Backpack": {"Name": "Backpack", "Precision": 0.8},
"Bag": {"Name": "Bag", "Precision": 0.8},
"Basket": {"Name": "Basket", "Precision": 0.8},
"BeachBackpack": {"Name": "BeachBackpack", "Precision": 0.8},
"BlueBackpack": {"Name": "BlueBackpack", "Precision": 0.8},
"BrocadeBag": {"Name": "BrocadeBag", "Precision": 0.8},
"BuggyBackpack": {"Name": "BuggyBackpack", "Precision": 0.8},
"CamouflageBackpack": {"Name": "CamouflageBackpack", "Precision": 0.8},
"CrownBackpack": {"Name": "CrownBackpack", "Precision": 0.8},
"DeeplingBackpack": {"Name": "DeeplingBackpack", "Precision": 0.8},
"DemonBackpack": {"Name": "DemonBackpack", "Precision": 0.8},
"DragonBackpack": {"Name": "DragonBackpack", "Precision": 0.8},
"ExpeditionBackpack": {"Name": "ExpeditionBackpack", "Precision": 0.8},
"FurBackpack": {"Name": "FurBackpack", "Precision": 0.8},
"FurBag": {"Name": "FurBag", "Precision": 0.8},
"GloothBackpack": {"Name": "GloothBackpack", "Precision": 0.8},
"GoldenBackpack": {"Name": "GoldenBackpack", "Precision": 0.8},
"GreenBackpack": {"Name": "GreenBackpack", "Precision": 0.8},
"GreenBag": {"Name": "GreenBag", "Precision": 0.8},
"GreyBackpack": {"Name": "GreyBackpack", "Precision": 0.8},
"JewelledBackpack": {"Name": "JewelledBackpack", "Precision": 0.8},
"MinotaurBackpack": {"Name": "MinotaurBackpack", "Precision": 0.8},
"OrangeBackpack": {"Name": "OrangeBackpack", "Precision": 0.8},
"PirateBackpack": {"Name": "PirateBackpack", "Precision": 0.8},
"PirateBag": {"Name": "PirateBag", "Precision": 0.8},
"Present": {"Name": "Present", "Precision": 0.8},
"PurpleBackpack": {"Name": "PurpleBackpack", "Precision": 0.8},
"RedBackpack": {"Name": "RedBackpack", "Precision": 0.8},
"RedBag": {"Name": "RedBag", "Precision": 0.8},
"ShoppingBag": {"Name": "ShoppingBag", "Precision": 0.8},
"StampedParcel": {"Name": "StampedParcel", "Precision": 0.8},
"YellowBackpack": {"Name": "YellowBackpack", "Precision": 0.8}
}

# Rings
Rings = [
'MightRing',
'EnergyRing'
]
Rings = {
"AxeRing": {"Name": "AxeRing", "Precision": 0.9},
"BrokenKeyRing": {"Name": "BrokenKeyRing", "Precision": 0.9},
"BrokenRingOfEnding": {"Name": "BrokenRingOfEnding", "Precision": 0.9},
"ButterflyRing": {"Name": "ButterflyRing", "Precision": 0.9},
"ClubRing": {"Name": "ClubRing", "Precision": 0.9},
"CrystalRing": {"Name": "CrystalRing", "Precision": 0.9},
"DeathRing": {"Name": "DeathRing", "Precision": 0.9},
"DwarvenRing": {"Name": "DwarvenRing", "Precision": 0.9},
"EnergyRing": {"Name": "EnergyRing", "Precision": 0.9},
"GoldRing": {"Name": "GoldRing", "Precision": 0.9},
"LifeRing": {"Name": "LifeRing", "Precision": 0.9},
"MightRing": {"Name": "MightRing", "Precision": 0.9},
"PowerRing": {"Name": "PowerRing", "Precision": 0.9},
"RingOfBluePlasma": {"Name": "RingOfBluePlasma", "Precision": 0.9},
"RingOfHealing": {"Name": "RingOfHealing", "Precision": 0.9},
"StealthRing": {"Name": "StealthRing", "Precision": 0.9},
"SweetheartRing": {"Name": "SweetheartRing", "Precision": 0.9},
"SwordRing": {"Name": "SwordRing", "Precision": 0.9},
"TimeRing": {"Name": "TimeRing", "Precision": 0.9},
"WeddingRing": {"Name": "WeddingRing", "Precision": 0.9}
}

# Amulets
Amulets = [
'SSA',
'PlatinumAmulet'
]
Amulets = {
"AmuletOfLoss": {"Name": "AmuletOfLoss", "Precision": 0.9},
"AncientAmulet": {"Name": "AncientAmulet", "Precision": 0.9},
"BronzeAmulet": {"Name": "BronzeAmulet", "Precision": 0.9},
"ElvenAmulet": {"Name": "ElvenAmulet", "Precision": 0.9},
"GlacierAmulet": {"Name": "GlacierAmulet", "Precision": 0.9},
"GloothAmulet": {"Name": "GloothAmulet", "Precision": 0.9},
"LeviathansAmulet": {"Name": "LeviathansAmulet", "Precision": 0.9},
"MagmaAmulet": {"Name": "MagmaAmulet", "Precision": 0.9},
"PlatinumAmulet": {"Name": "PlatinumAmulet", "Precision": 0.9},
"ProtectionAmulet": {"Name": "ProtectionAmulet", "Precision": 0.9},
"SacredTreeAmulet": {"Name": "SacredTreeAmulet", "Precision": 0.9},
"ScarabAmulet": {"Name": "ScarabAmulet", "Precision": 0.9},
"ShockwaveAmulet": {"Name": "ShockwaveAmulet", "Precision": 0.9},
"SilverAmulet": {"Name": "SilverAmulet", "Precision": 0.9},
"StarAmulet": {"Name": "StarAmulet", "Precision": 0.9},
"StoneSkinAmulet": {"Name": "StoneSkinAmulet", "Precision": 0.9},
"TerraAmulet": {"Name": "TerraAmulet", "Precision": 0.9},
"WerewolfAmulet": {"Name": "WerewolfAmulet", "Precision": 0.9}
}

# endregion
# Foods
Foods = {
"BrownMushrooms": {"Name": "BrownMushrooms", "Precision": 0.8},
"Cheese": {"Name": "Cheese", "Precision": 0.8},
"Corncobs": {"Name": "Corncobs", "Precision": 0.8},
"DeeplingFilet": {"Name": "DeeplingFilet", "Precision": 0.8},
"FireMushrooms": {"Name": "FireMushrooms", "Precision": 0.8},
"Fish": {"Name": "Fish", "Precision": 0.8},
"GloothSandwichs": {"Name": "GloothSandwichs", "Precision": 0.8},
"Grapes": {"Name": "Grapes", "Precision": 0.8},
"GreenMushrooms": {"Name": "GreenMushrooms", "Precision": 0.8},
"Melons": {"Name": "Melons", "Precision": 0.8},
"OrangeMushrooms": {"Name": "OrangeMushrooms", "Precision": 0.8},
"Peanuts": {"Name": "Peanuts", "Precision": 0.8},
"RedMushrooms": {"Name": "RedMushrooms", "Precision": 0.8},
"WhiteMushrooms": {"Name": "WhiteMushrooms", "Precision": 0.8}
}

# region Stats
# endregion

# Stats
ImageStats = []

Stats = [
Expand All @@ -39,7 +137,7 @@
'blood'
]

# endregion
# region CaveBotRegion

# Monsters For Select To Attack On CaveBot Module
Monsters = [
Expand Down Expand Up @@ -68,8 +166,41 @@
'Full Defence'
]

CavebotScriptsPath = "Scripts/"

# Script's Name For Load To Walk In CaveBot Module
Scripts = [
"ratThais",
"StonerefinerVenore"
]

# endregion

# region DepotChests

ChestsPath = MainPath + "/Depot/Chests/"

ChestsNamesPath = ChestsPath + "Names/"
ChestsSpritesPath = ChestsPath + "Sprites/"

Chests = {
"Chest1",
"Chest2",
"Chest3",
"Chest4",
"Chest5",
"Chest6",
"Chest7",
"Chest8",
"Chest9",
"Chest10",
"Chest11",
"Chest12",
"Chest13",
"Chest14",
"Chest15",
"Chest16",
"Chest17",
}

# endregion
6 changes: 6 additions & 0 deletions Conf/Hotkeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,9 @@ def RightClick(self, X, Y):

def MoveTo(self, X, Y):
self.SendToClient.MoveTo(X, Y)

def MainWindowSize(self):
return self.SendToClient.MainWindowSize()

def DragTo(self, From, To):
self.SendToClient.DragTo(From, To)
4 changes: 2 additions & 2 deletions Core/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def addRadioImage(self, text, variable, value, position, command=None, image=Non
def After(self, Time, Function):
return self.windowID.after(Time, Function)

# @staticmethod
def openImage(self, image, size):
@staticmethod
def openImage(image, size):
ImageID = Image.open(image)
ImageID = ImageID.resize((size[0], size[1]), Image.ANTIALIAS)
ImageID = ImageTk.PhotoImage(ImageID)
Expand Down
20 changes: 10 additions & 10 deletions Core/Getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ def GetAccountNamePosition():


def GetBattlePosition():
BattlePositions[0], BattlePositions[1] = LocateCenterImage('images/TibiaSettings/BattleList.png', Precision=0.75)
BattlePositions[0] = BattlePositions[0] - 40
BattlePositions[1] = BattlePositions[1] - 5
BattlePositions[2] = BattlePositions[0] + 155
BattlePositions[3] = BattlePositions[1] + 415

if BattlePositions[0] != 0 and BattlePositions[1] != 0:
return int(BattlePositions[0]), int(BattlePositions[1]), int(BattlePositions[2]), int(
BattlePositions[3])
else:
BattlePositions[0], BattlePositions[1] = LocateCenterImage('images/TibiaSettings/BattleList.png', Precision=0.85)
if BattlePositions[0] == 0 and BattlePositions[1] == 0:
return 0, 0, 0, 0
else:
BattlePositions[0], BattlePositions[1] = LocateImage('images/TibiaSettings/BattleList.png',
Precision=0.85)
BattlePositions[2] = BattlePositions[0] + 155
BattlePositions[3] = BattlePositions[1] + 415

return int(BattlePositions[0] + 8), int(BattlePositions[1]), int(BattlePositions[2]), int(
BattlePositions[3])


def GetHealthPosition():
Expand Down
4 changes: 2 additions & 2 deletions Core/MoveMouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self):
self.MOUSEEVENTF_RIGHTCLICK = self.MOUSEEVENTF_RIGHTDOWN + self.MOUSEEVENTF_RIGHTUP

def MainWindowSize(self):
return self.DLL.GetSystemMetrics(0), ctypes.windll.user32.GetSystemMetrics(1)
return self.DLL.GetSystemMetrics(0), self.DLL.GetSystemMetrics(1)

def Position(self):
Cursor = POINT()
Expand Down Expand Up @@ -60,7 +60,7 @@ def MoveTo(self, X, Y):
self.DLL.SetCursorPos(X, Y + 24)

def DragTo(self, From, To):
self.DLL.SetCursorPos(From[0], From[1] + 24)
self.DLL.SetCursorPos(From[0], From[1])
self.DLL.mouse_event(self.MOUSEEVENTF_LEFTDOWN, ctypes.c_long(From[0]), ctypes.c_long(From[1] + 24), 0, 0)
self.DLL.SetCursorPos(To[0], To[1] + 24)
self.DLL.mouse_event(self.MOUSEEVENTF_LEFTUP, ctypes.c_long(To[0]), ctypes.c_long(To[1] + 24), 0, 0)
Expand Down
6 changes: 6 additions & 0 deletions Core/SendToClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,9 @@ def UseOn(self, From, To):
win32api.PostMessage(self.hwnd, win32con.WM_MOUSEMOVE, 0, ToPosition)
win32api.SendMessage(self.hwnd, win32con.WM_LBUTTONDOWN, win32con.MK_LBUTTON, ToPosition)
win32api.SendMessage(self.hwnd, win32con.WM_LBUTTONUP, win32con.MK_LBUTTON, ToPosition)

@staticmethod
def MainWindowSize():
from win32api import GetSystemMetrics
return GetSystemMetrics(0), GetSystemMetrics(1)

Loading

0 comments on commit 477231d

Please sign in to comment.