PDA

View Full Version : Change gold



grave18
11-21-2015, 03:40 PM
Hello.
I need a script that will click on 100gp and 100pc.

-- conditions
if (Container:GetItemData(spot).id == 3031 or Container:GetItemData(spot).id == 3035 and Container:GetItemData(spot).count == 100) then
Container:UseItem(spot)

Thanks

HjugO
11-21-2015, 04:29 PM
Hello.
I need a script that will click on 100gp and 100pc.

-- conditions
if (Container:GetItemData(spot).id == 3031 or Container:GetItemData(spot).id == 3035 and Container:GetItemData(spot).count == 100) then
Container:UseItem(spot)

Thanks


Module.New("GP:Changer", function(moduleObject)
for i = 0, 15 do
local c = Container.New(i)
if not table.contains({"The", "Demonic", "Dead", "Slain", "Dissolved", "Remains", "Elemental"}, string.match(c:Name(), "%a+")) then
for SPOT = c:ItemCount() - 1, 0, -1 do
local tmp = c:GetItemData(SPOT)
if (table.contains({3031, 3035}, tmp.id) and tmp.count == 100) then
c:UseItem(SPOT, true)
end
end
end
end
end)