buying specific items from merchant.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: buying specific items from merchant.

#21 Post by rock5 » Sun Jan 20, 2013 9:36 pm

CanceR wrote:micromacro shows error: "- scripts/rom/bot.lua:827: Failed to compile and run Lua code for waypoint #10" - i think i m writing wrong "for i" cycle, can you advice me how to repair, please.
It's supposed to be

Code: Select all

for i = 1,_minInvCount do
A good reference for lua commands is http://www.lua.org/manual/5.2/.
CanceR wrote:and one more thing for now: how to choose from a list (or how to organize a list):

meaning: if item name is in list do: craftItem( ItemNameOrID, "all");
To match the name you would have to do a search through the whole table.

Code: Select all

local found = false
for k,v in pairs(GROUP1) do
    if v.Name == ItemNameOrID then
        found = true
        break
    end
end
if found then
    -- Do stuff here
    craftItem( ItemNameOrID, "all");
    -- etc.
end
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests