View Full Version : Loot Opend Bodies
Jankey
08-10-2017, 08:20 PM
Hey.. I hope you all guys doing fine.
I searched a lot for a script that can loot an item when I open the monster dead body ...
I mean "I want a script when I open the Dead Monster Body, It automatically move the item from the dead body to the opened backpack or to the main backpack".
I hope someone help me I really need it ..
I'm using Xenobot 10.00 as I'm playing Highexp.eu..
Thanks in advance.
REGARDS
Jankey
08-13-2017, 02:28 AM
BUMP
NO ONE?
Moreno111
09-06-2017, 04:39 AM
Bump!
want this too
0xNOP
09-06-2017, 05:49 PM
ATTENTION: This is very primitive and not smart at all but it gets you what you want:
To make it work:
You gotta have 2 containers opened, 1st Container = Your Main Backpack, 2nd container = Your Monster Dead Body as shown in the picture:
14049
Afterwards just activate the script, and it will check the item and put it automatically on your backpack...
Cons:
- You gotta manually open the monster dead body.
- No item index checking or "item-on-slot" checking on either of the containers (You have to check manually where the item is located (slot) in the dead monster container)
- Only loots x1 body at at time (if you want to loot more bodies I can make a paid script for you, jksss xDD)
local container_name = Container:Name()
local dead_monster_name = "Dead Dragon" --[[ CHANGE THIS TO YOUR DEAD MONSTER NAME --]]
local next_container
local opened_container_gold
local item_id = Item.GetID("gold coin") --[[ CHANGE THIS TO YOUR ITEM NAME TO LOOT --]]
while(true)
do
next_container = Container.GetNextOpen(0)
if (container_name == "Backpack" and next_container:Name() == dead_monster_name)
then
opened_container_gold = next_container:CountItemsOfID(item_id)
print("Looting " .. opened_container_gold .. " Gold!")
next_container:MoveItemToContainer(0, 0, 0) --[[ CHANGE THIS TO WHETHER THE ITEM IS USUALLY LOCATED WHEN YOU OPEN THE DEAD MONSTER --]]
end
wait(1000, 1500)
end
You need more information on the MoveItemToContainer API you can use this for instructions on how to use it:
http://xenobot.wikia.com/wiki/Container_MoveItemToContainer
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.