Log in

View Full Version : Automatic use a stack of 100 gold



lotusin
01-26-2016, 12:07 AM
Hey guys, i am playing on an ot where you can change a stack 100 gold into 1 platinum coin if u use(ctrl+click) the stack of gold(100 platinum coins make 1 crystal coin). Is there any way to make xenobot automatic "use" stacks of 100 gold?

thanks in advance!

Fatality
01-26-2016, 12:24 AM
function useCoins(id)
local cont = Container.GetFirst()

while (cont:isOpen()) do
for spot = 0, cont:ItemCount() do
local item = cont:GetItemData(spot)
if (item.id == id) then
if (item.count == 100) then
cont:UseItem(spot, True)
sleep(100)
return true
end
end
end

cont = cont:GetNext()
end

return false
end

Module.New('changedehshiet', function(mod)
useCoins(3031)
wait(500)
useCoins(3035)
mod:Delay(1000)
end)


Found this on forums like a year ago, should still work fam.

eldera
01-26-2016, 01:48 AM
local coins = {
[3031] = true,
[3035] = true
}

Module.New("gold changer", function()
for index, container in Container.iContainers() do
for slot, item in container:iItems() do
if (coins[item.id]) then
if (item.count == 100) then
container:UseItem(slot)
return
end
end
end
end
end)

Qyzar
06-29-2016, 02:20 PM
nvm im dumb