Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
After get itemcount code
#1
Hi,

I am trying to make the bot count how many of 1 loot it has and then say that to the npc to sell the loot, so if i had 5 it would say sell 5 chain armors.

I tried this but i know its nothing what it should be but i have no knowledge of coding.
 
 say('hi')
 wait(800)
 say(sell 'itemcount'3031' chain armor) < i know terrible

thanks for any help
Reply

#2
local ITEMS_SELL = { 'chain armor', 'battle axe' }

local SPOKE = false
for _, item in ipairs(ITEMS_SELL) do
    local count_item = itemcount(item)
    if count_item > 0 then
        if not SPOKE then
            say('hi')
            wait(800, 1000)
            SPOKE = true
        end
        say('sell ' .. count_item .. ' ' .. item)
        wait(800, 1000)
        say('yes')
        wait(800, 1000)
    end
end
Reply

#3
works perfectly thank you
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016