counting token to do minis

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

counting token to do minis

#1 Post by kuripot » Thu Jul 25, 2013 11:40 am

how i can use this as single onload... i want to check Phirius Token Coins either to do daily quest or do minigame... as lvl 50 i can do only cot and at so need 60 Phirius Token Coins.. i want my character check Phirius Token Coins and if 60 pcs inventory will load loadPaths("jumptocot") or else do daily quest

Code: Select all

		if 60 < inventory:itemTotalCount(203038) then
			print("Enough Phirius Token Coins.")
			logentry = "Enough Phirius Token Coins."
			loadPaths("jumptocot")
			return
		end
	end

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

Re: counting token to do minis

#2 Post by rock5 » Thu Jul 25, 2013 1:08 pm

What's the the difficulty? Just do what you said, put it in a wp onload.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
      if 60 <= inventory:itemTotalCount(203038) then
         print("Enough Phirius Token Coins.")
         loadPaths("jumptocot")
      else
         print("Not enough Phirius Token Coins.")
         loadPaths("your_daily")
      end
</onLoad>
</waypoints>
  • 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

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: counting token to do minis

#3 Post by kuripot » Thu Jul 25, 2013 6:42 pm

what is this mean?? equal and more than 60??

Code: Select all

<=
and what the purpose of this??

Code: Select all

logentry = "Enough Phirius Token Coins."

C3PO
Posts: 109
Joined: Sun Jul 10, 2011 2:45 pm

Re: counting token to do minis

#4 Post by C3PO » Thu Jul 25, 2013 8:49 pm

it means 60 or more

Without knowing the code from that you have "logentry" it's just a guess that it was the message that was "later" written to a log file

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

Re: counting token to do minis

#5 Post by rock5 » Fri Jul 26, 2013 1:31 am

That's correct. You had only "60 <" but of course 60 is enough to do the minigames so I added the "=" so that it would also do the minigames when you have exactly 60 coins. ie. if 60 is less than or equal to the number of coins in your inventory then
  • 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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: counting token to do minis

#6 Post by lisa » Fri Jul 26, 2013 1:43 am

Since he asked what logentry was I would say he just copy pasted the code from elsewhere but doesn't really understand how or why it works.

Use the code rock posted for you.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: counting token to do minis

#7 Post by kuripot » Fri Jul 26, 2013 8:27 pm

rock i got invalid token
line:49
column:14
pos:1984

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
	startGMDetect()
	changeProfileOption("LOOT_ALL","false")

	--== User Option ==--

	Deliver = 0         -- Change if you want to enable/disable deliver quests  0=disable, any number = deliver after that amount of eggs (must b bigger than 9)
	LagTime = 0           -- Affects accepting/completing quests. Increase LagTime if time is wasted by repeated CompleteQuests or AcceptQuests.
	RunningSpeed = 59    -- The speed the character runs when not teleporting. 50 is normal. Recommended 100.
	UseTeleporter = false  -- Use Jduratedj's teleport userfunction. Please make sure you have it installed to use this option.
	Timeout = 300         -- Time hens and eggs stay in the ignore list before being given another chance. '0' disables it, remains permanently in ignore list.
	debugging = true      -- Set to true to display extra useful information regarding egg drop rates and ignore lists.

	--=================--



	   local dailycomplete_ptr = 0x9CD1E0;
	   local dailycomplete_offset = 0xACF4;
   
	   function getDailyComplete()
	      return memoryReadBytePtr(getProc(),dailycomplete_ptr,dailycomplete_offset);
	   end
   
	   function checkDQCount()
	    local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()")
	      cprintf(cli.lightblue,"%s quests completed.\n",tostring(dailyQuestCount));
	      if (dailyQuestCount == 10) then
	         cprintf(cli.lightblue,"Completed max number of daily quests, trying to use a daily reset card.\n");
	         inventory:update();
	         player:update();
	         -- note #202434 is the daily reset card
	            if inventory:itemTotalCount(202434) > 0 then
	                  inventory:useItem(202434);
	         else
			loadPaths("aimetocot")
	            end
	       end   
	   end

	function quest()
	   local queststate = getQuestStatus("My Skin Is Suffering")
	   if queststate == "complete" then
		__WPL:findWaypointTag("end")
	   end
	end

      if 60 <= inventory:itemTotalCount(203038) then
         print("Enough Phirius Token Coins.")
         loadPaths("aimetocot")
      else
         print("Not enough Phirius Token Coins.")
         loadPaths("aime")
      end
</onLoad>
this onload are from aime.xml wp

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: counting token to do minis

#8 Post by lisa » Fri Jul 26, 2013 8:51 pm

bot sometimes has issues with using < in code, just do it the other way around.

Code: Select all

if inventory:itemTotalCount(203038) => 60 then
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

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

Re: counting token to do minis

#9 Post by rock5 » Sat Jul 27, 2013 1:58 am

lisa wrote:bot sometimes has issues with using < in code
In xml files to be more specific. There is more than one way to deal with this problem but the easiest is what Lisa said; just flip it around.
  • 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] and 0 guests