nepret 0 Жалоба Опубликовано 16 марта, 2021 stealth version 8.11.4 Фишинг с лодки. Новый! Как запустить: читать тут Чем богат?: ловит рыбу удочкой скидывает на пол всю пойманную обувь жрёт авто реконект (советую не включать встроенный столсовский реконектор, так как он имеет неприятную особенность зависать при длительных падениях сервака, да и на скрипты это влияет так себе...) бегает к трешбочке что бы утилизировать по всем канонам гринписа: сос бутылки, карты, старые сети... моё время после похода к бочке, понуро плетётся к трюму за новой удочкой ну и самостоятельно (как взрослый мальчик) возвращается на своё место и продолжает рыбачить Инструкция по применению: отплываем на лодке от берега на 1-2 экрана (30-40 тайлов) забиваем трюм лодки удочками ставим треш бочку на лодке в рыбаков суём жареные фишстейки(если что то другое, указываем в скрипте) FOOD = 0x097B # Type еды, сейчас фишстейки запускаем скрипт ??? profit АХТУНГ! При появлении капчи действие скрипта я не проверял, но запилил реакцию, так что при нахождении бага, пишите да поможет вам бог. from datetime import datetime, timedelta from py_stealth import * FOOD = 0x097B # Type еды, сейчас фишстейки def msg(Message): print(Message) ClientPrintEx(0, 60, 2, Message) def DCC(message, TimeWait=15000): if Dead() or not Connected() or not CheckLag(TimeWait): print(f"{message}: You dead, or something else!") return False return True def CheckConnect(WaitTime=15000): if Connected() and Hidden(): for i in range(0, 10): if Hidden(): UOSay(' ') Wait(500) else: break if Connected() and not Hidden() and not CheckLag(WaitTime): Disconnect() Wait(5000) if not Connected(): print('CheckConnect.py : Not connected to server!') print('CheckConnect.py : Reconnected...') while not Connected(): Connect() for i in range(0, 10): if Hidden(): UOSay(' ') Wait(500) else: break CheckLag(5000) if Connected() and not Hidden() and not CheckLag(8000): Disconnect() print('CheckConnect.py : Server connection restored.') return False return True def CheckSave(): Time = datetime.now() - timedelta(0, 30) if InJournalBetweenTimes('Saving World State', Time, datetime.now()) >= 0: Wait(30000) def OpenPack(Container=Backpack()): while LastContainer() != Container: if DCC(OpenPack): break CheckSave() UseObject(Container) end = 0 while end >= 5: if LastContainer() == Backpack(): break Wait(1000) end += 1 def Hungry(): # food default "fish steaks", search in you backpack while True: if Dead() or not Connected() or not CheckLag(15000): print("Hungry: You dead, or not connected or hard lags!") return False OpenPack() FindType(FOOD, Backpack()) if FindCount() <= 0: print("Hungry: not food!") return ct = datetime.now() if TargetPresent(): CancelTarget() UseObject(FindItem()) if not WaitJournalLine(ct, 'Я объелся', 5000): Wait(100) else: return True def DropTrash(board): # Drop boots boot = [0x170A, 0x170B, 0x170C, 0x170D, 0x170E, 0x170F, 0x1710, 0x1711] for i in boot: CheckConnect() while f := FindType(i, Backpack()): if not CheckLag(): break DropHere(f) # Drop trash trash = [0x0DC8, # сети 0x14ED, # карты 0x099F] # бутылки while trashBarrel := FindType(0x0E77, Ground()): x, y = GetX(trashBarrel), GetY(trashBarrel) if board[0]['XMin'] <= x <= board[0]['XMax'] and board[0]['YMin'] <= y <= board[0]['YMax']: if newMoveXY(x, y, False, 1, True): break else: Ignore(trashBarrel) if trashBarrel <= 0: msg("ERROR: не вижу или не могу добраться до Trash barrel!") return False for i in trash: CheckConnect() while f := FindType(i, Backpack()): if not CheckLag(): break MoveItem(f, 1, trashBarrel, 0, 0, 0) def GetPole(): CheckConnect() CheckSave() board = GetMultis() fX, fY = GetX(Self()), GetY(Self()) DropTrash(board) while hold := FindType(0x3E65, Ground()): x, y = GetX(hold), GetY(hold) if board[0]['XMin'] <= x <= board[0]['XMax'] and board[0]['YMin'] <= y <= board[0]['YMax']: if not newMoveXY(x, y, False, 1, True): msg(f"ERROR: не могу добраться до трюма x:{x}, y{y}") return False else: break if LastContainer() != hold: UseObject(hold) for i in range(5): Wait(1000) if LastContainer() == hold: break if i >= 5 and LastContainer() != hold: msg(f"ERROR: не могу открыть трюм x:{GetX(hold)}, y:{GetY(hold)}") return False if FindType(0x0DBF, hold): MoveItem(FindItem(), 1, Backpack(), 0, 0, 0) newMoveXY(fX, fY, False, 0, True) return FindItem() else: print('ERROR: в трюме нет удочек, мне нечем ловить!') return False def CheckPole(): if not CheckConnect() or Dead(): return False CheckSave() if LastContainer() != Backpack(): OpenPack() if GetType(ObjAtLayer(RhandLayer())): Disarm() if GetType(ObjAtLayer(LhandLayer())) == 0x0DBF: return ObjAtLayer(LhandLayer()) if FindType(0x0DBF, Backpack()): return FindItem() if pole := GetPole(): return pole return False def CheckCaptcha(pole): while IsGump(): g = GetGumpInfo(GetGumpsCount() - 1) if g.get('Text')[0][0].find("капча"): msg(">>>>>>>> Нужно ввести капчу!\n" "если клиент был закрыт и при заходе клиентом капчи нет, просто юзани удочку...") while IsGump(): Wait(1000) msg(">>>>>>>> отлично продолжаем...") if not TargetPresent(): UseObject(pole) Wait(1000) def Fishing(x, y, z): while True: CheckConnect() if Dead(): msg('Чар мёртв') return False if pole := CheckPole(): Hungry() if TargetPresent(): CancelTarget() while not TargetPresent(): CheckSave() CheckLag() while IsGump(): CloseSimpleGump(GetGumpsCount()-1) UseObject(pole) CheckCaptcha(pole) WaitForTarget(2500) ct = datetime.now() if WaitForTarget(2500): WaitTargetXYZ(x, y, z) if WaitJournalLine(ct, "Fishing шанс на успех|There doesn't", 60000): if InJournalBetweenTimes("There doesn't", ct, datetime.now()) != -1: return True else: return False def GetTiles(): typeTile = [168, 169, 170, 171, 310, 311] array = [] board = GetMultis() for x in range(GetX(Self()) - 6, GetX(Self()) + 6): for y in range(GetY(Self()) - 6, GetY(Self()) + 6): if (x > board[0]['XMax'] or x < board[0]['XMin']) and (y > board[0]['YMax'] or y < board[0]['YMin']): tile = GetCell(x, y, WorldNum()) for t in typeTile: if tile['Tile'] == t: array.append({'X': x, 'Y': y, 'Z': tile['Z']}) break return array if len(array) else False def main(): while True: CheckConnect() if Dead(): msg('Чар мёртв') return arrayTile = GetTiles() if not len(arrayTile): msg(f'ERROR: Не вижи тайлов для ловли в радиусе: 6 тайлов') return for tile in arrayTile: if not Fishing(tile['X'], tile['Y'], tile['Z']): return False if __name__ == '__main__': SetFindDistance(10) SetFindVertical(10) SetMoveOpenDoor(True) SetMoveCheckStamina(0) SetMoveThroughNPC(0) main() if Connected(): Disconnect() msg('END SCRIPT!') SetARStatus(False) Disconnect() Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты