Code: Select all
ItemAnything = {'Forge': {'Serial': 0x40005E0C, 'X': 522, 'Y': 994}, 'Bank': {'Serial': 0x00086286, 'X': 554, 'Y': 992}, 'Gate of Life': {'Serial': 0x40005E1B, 'X': 535, 'Y': 991}}
def FindRoute(x, y, prec):
Direction = {'0': ('y'), '1': ('y', 'x'), '2': ('x'), '3': ('y', 'x'), '4': ('y'), '5': ('y', 'x'), '6': ('x'), '7': ('y', 'x')}
nx = GetX(Self())
ny = GetY(Self())
while Dist(nx, ny, x, y) > 300:
for i in range(300):
dx = nx - x
dy = ny - y
if 'y' in Direction[str(CalcDir(x, y))]:
ny += Sign(dy)
if 'x' in Direction[str(CalcDir(x, y))]:
nx += Sign(dx)
newMoveXY(nx, ny, 0, 50, 0)
newMoveXY(x, y, 0, prec, 0)
for x, y in (ItemAnything['Bank']['X'], ItemAnything['Bank']['Y'], GetX(ItemAnything['Bank']['Serial']), GetY(ItemAnything['Bank']['Serial'])):
FindRoute(x, y, 1)
Code: Select all
for x, y in (ItemAnything['Bank']['X'], ItemAnything['Bank']['Y'], GetX(ItemAnything['Bank']['Serial']), GetY(ItemAnything['Bank']['Serial'])):
