Code: Select all
def SortBods():
res = FindTypeEx(8793, 0, Backpack(), False)
FoundBooks = GetFindedList(res)
res = FindTypeEx(8792, 1155, Backpack(), False) # Tailor
FoundTailorBods = GetFindedList(res)
res = FindTypeEx(8792, 1102, Backpack(), False) # Blacksmith
FoundBlacksmithBods = GetFindedList(res)
if len(FoundBooks) > 0:
for book in FoundBooks:
tooltip = GetTooltip(book)
if 'tailor' in tooltip:
for tbod in FoundTailorBods:
MoveItem(tbod, 0, book, 0, 0, 0)
Wait(100)
else:
for bbod in FoundBlacksmithBods:
MoveItem(bbod, 0, book, 0, 0, 0)
Wait(100)
else:
print("no books found")