Mindee-BOT

Mindee-BOT Community => Scripting => Request => Topic started by: Nicaragua on August 18, 2023, 08:03:22 pm

Title: count item loot
Post by: Nicaragua on August 18, 2023, 08:03:22 pm
once we know how to move inventory item to the backpack

How to count the item loot and not collect more items

crystal work
egg of petraclop
any other more

crystal_w only 3

egg_petr only 5

def onChangeLocation(x, y, z):

if crystal_w >= 3 :
setway(xxxxx, 2)
Title: Re: count item loot
Post by: Xmidnightx on August 19, 2023, 07:33:08 pm
A simple example:


Code: [Select]
Syorta_ore = 6405
def onReceiveAddItemToBackpack(slot, itemId):
    if script.GetItemsCountEx(Syorta_ore, True, False, False) >= 3 :
        script.ToggleAutoloot(0)
        script.StatusMessage("ok")
Title: Re: count item loot
Post by: Nicaragua on August 19, 2023, 07:50:06 pm
 [hmmm] Thank you, but the part is missing that when you already have the necessary amount, don't pick up that item anymore, if it's not too much trouble :)
Title: Re: count item loot
Post by: Xmidnightx on August 19, 2023, 08:33:44 pm
Here is removing the item from Autoloot.

Code: [Select]
Syorta_ore = 6405
def onReceiveAddItemToBackpack(slot, itemId):
    if script.GetItemsCountEx(Syorta_ore, True, False, False) >= 3 :
        script.RemoveItemFromList(1, Syorta_ore) # deletes the autoloot itemId
        script.StatusMessage("ok")
Title: Re: count item loot
Post by: Nicaragua on August 19, 2023, 08:35:58 pm
 [ummmm]

Very thanks