How to record a value before running a waypoint?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
sgk2015
Posts: 2
Joined: Sun May 03, 2015 2:05 am

How to record a value before running a waypoint?

#1 Post by sgk2015 » Sun May 03, 2015 2:19 am

Hi all,
Ive been trying rombot recently and having fun with it. I have a function like

Code: Select all

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

Thanks a lot :mrgreen:

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to record a value before running a waypoint?

#2 Post by rock5 » Sun May 03, 2015 3:00 am

Mu invaders waypoint file does something like that. This is how it does it.

Code: Select all

		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.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

sgk2015
Posts: 2
Joined: Sun May 03, 2015 2:05 am

Re: How to record a value before running a waypoint?

#3 Post by sgk2015 » Sun May 03, 2015 4:56 am

Thank you Rock, gonna try it out to see how it works. Hope I'll learn something :mrgreen:

Post Reply

Who is online

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