Svira
Active Member
- Joined
- Jan 27, 2008
- Messages
- 269
- Solutions
- 11
- Reaction score
- 37
Hello community, I decided to sit down to OTCv8 and see what this miracle is, I have never used it before. I see that it has potential, but I don't understand how the macro works... Can someone provide me with the code that will convert gold into platinum using conventer (usewith)
It works like this:
We check the stack of items Gold 3031 and Platynek 3035, if the stack = 100, we use conventer 7410 on it.
I have this code, but no matter what I do, it either generates an error or doesn't run.
used OTCv8 and Cavebot_1.3
It works like this:
We check the stack of items Gold 3031 and Platynek 3035, if the stack = 100, we use conventer 7410 on it.
I have this code, but no matter what I do, it either generates an error or doesn't run.
used OTCv8 and Cavebot_1.3
Lua:
local items = {3031, 3035}
local converter = 7410
local function checkItemCount()
local itemCount = 0
for _, itemID in ipairs(items) do
local item = findItem(itemID)
if item then
itemCount = itemCount + item:getCount()
end
end
if itemCount == 100 then
useWith(converter, items[1])
end
end
macro(200, "Converter for Gold", checkItemCount)
if onItemUpdate then
onItemUpdate(checkItemCount)
end