function checkgoal()
if inventory:itemTotalCount(202849) == 12 then <!-- how many mana stone 10 you want to make -->
cprintf(cli.yellow,"Target number of mana stone 10 needed to make reached, rest now...\n") <!-- Notify status -->
sendMacro("CloseAllWindows()");
yrest(1000);
RoMCode("MagicBoxFrame:Hide()");
yrest(1000);
player:sleep()
else
cprintf(cli.yellow,"Continuing...\n") <!-- Notify status -->
end
end
Currently I have to change to the number 12 everytime before i run the waypoint. Is there anyway to make it run like this:
- Run the waypoint
- It asks how many stone I want to make
- Enter a targeted number
- Then the bot starts
local BagsWanted
repeat
cprintf(cli.lightgreen,"\nPlease enter the number of bags you want to get\n")
printf(" Number of bags> ")
BagsWanted = io.stdin:read()
BagsWanted = tonumber(BagsWanted)
if type(BagsWanted) ~= "number" or 0 > BagsWanted then
cprintf(cli.yellow,"\nExpecting number more than or equal to 0.\n")
yrest(2000)
end
until type(BagsWanted) == "number" and BagsWanted >= 0
return BagsWanted
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.