Counting shells in client 6.0.0+

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
barboza
Posts: 6
Joined: Wed May 22, 2013 6:30 pm

Re: Counting shells in client 6.0.0+

#21 Post by barboza » Thu Jun 06, 2013 9:24 am

Still nothing...

Code: Select all

Command> RomScript("GetPlayerPointInfo(1,1,\"\")")
onLoad error: [string "RomScript("GetPlayerPointInfo(1,1,\"\")")"]:1: attempt to
 call global 'RomScript' (a nil value)
Command>

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

Re: Counting shells in client 6.0.0+

#22 Post by rock5 » Thu Jun 06, 2013 9:31 am

Sorry, RomScript is spelt RoMScript

Code: Select all

RoMScript("GetPlayerPointInfo(1,1,\"\")")
  • 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

Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: Counting shells in client 6.0.0+

#23 Post by Rickster » Thu Jun 06, 2013 3:44 pm

if you do not want to escape the " you can also use single quotes

Code: Select all

RoMScript('GetPlayerPointInfo(1,1,"")')
which causes the string not to be parsed.

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Counting shells in client 6.0.0+

#24 Post by grande » Sat Jun 08, 2013 9:50 am

Hi, so if I just wanted to update Rock's code for say... one of the old CoTerror runs could I just do:

Code: Select all

function getCurrency(shell)
   name = string.lower(name) -- Make lower case
   local noSname = string.match(name,"^(.-)s?$") -- Take off ending 's'

   local group, index
   if noSname == "shell" or name == string.lower(getTEXT("SYS_MONEY_TYPE_11")) then
      group, index = 1,1
   elseif noSname == "energy" or noSname == "eoj" or name == string.lower(getTEXT("SYS_MONEY_TYPE_12")) then
      group, index = 1,2
   elseif noSname == "dreamland" or noSname == "pioneer sigil" or noSname == "sigil" or name == string.lower(getTEXT("SYS_MONEY_TYPE_10")) then
      group, index = 1,3
   elseif noSname == "mem" or noSname == "mento" or noSname == "memento" or name == string.lower(getTEXT("SYS_MONEY_TYPE_9")) then
      group, index = 2,1
   elseif noSname == "proof" or noSname == "pom" or name == string.lower(getTEXT("SYS_MONEY_TYPE_13")) then
      group, index = 2,2
   elseif noSname == "honor" or name == string.lower(getTEXT("SYS_MONEY_TYPE_4")) then
      group, index = 3,1
   elseif noSname == "trial" or noSname == "bott" or name == string.lower(getTEXT("SYS_MONEY_TYPE_8")) then
      group, index = 3,2
   elseif noSname == "warrior" or noSname == "botw" or name == string.lower(getTEXT("SYS_MONEY_TYPE_14")) then
      group, index = 3,3
   else
      print("Invalid currency type. Please use 'shell', 'eoj', 'sigil', 'mem', 'proof', 'honor', 'trial' or 'warrior'.")
      return 0,0
   end
   local amount, limit = RoMScript("GetPlayerPointInfo("..group..","..index..",\"\")")

   return amount, limit-amount

if getCurrency(shell) > 899 then 
loadPaths("buystats") 
end
That should check that shells are at 900 and then load a path or do something else ?

Sorry, just trying to understand how this supplants:

Code: Select all

		if inventory:itemTotalCount(240181) > 950 then
			-- Wait for user to use some shells.
			cprintf(cli.yellow,"Reaching the maximum number of Phirius Shells (1000). Please spend some before continuing.\n")
			player:sleep()
			numshells = inventory:getItemCount(240181)
		end

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

Re: Counting shells in client 6.0.0+

#25 Post by rock5 » Sat Jun 08, 2013 10:10 am

Well once I've committed the new function, we can change it to

Code: Select all

      if getCurrency("shell") > 950 then
         -- Wait for user to use some shells.
         cprintf(cli.yellow,"Reaching the maximum number of Phirius Shells (1000). Please spend some before continuing.\n")
         player:sleep()
         numshells = getCurrency("shell")
      end
I'm not sure what effect having existing shells in your inventory will have though. Why did you use 900? The cost to play didn't change did it?

Tell you what, why don't I commit that function. Then I can update the minigame scripts.
  • 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
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Counting shells in client 6.0.0+

#26 Post by grande » Sat Jun 08, 2013 10:18 am

Awesome... rockin as always Rock! Thx!!

Oh, I was just messing around with some ideas to automate further is why I was looking at the 900.. so as in at 900 that would be 3 major stats... But the more I think about it, better just to go with the sleep option at 950 since there are too many variables (would I really want the major stats? maybe a lesser stat is needed... Then there would be other options such as what flavor stat... bleh... just wait/do it manually i guess)

I have a tendency to reach too far

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: Counting shells in client 6.0.0+

#27 Post by Lamkefyned » Sun Jan 05, 2014 4:09 pm

hello, I am making a script to make mine and points of honor and I want where they are already full to move to another waypoint and count them. as I do that?

Code: Select all

	<!-- #  1 --><waypoint x="xxxx" z="xxxx" y="xx" tag="start" type="TRAVEL">
If you think something is right just because everyone else believes,you're not thinking.

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

Re: Counting shells in client 6.0.0+

#28 Post by kuripot » Tue Jan 07, 2014 3:49 am

ambolia wrote:hello, I am making a script to make mine and points of honor and I want where they are already full to move to another waypoint and count them. as I do that?

Code: Select all

	<!-- #  1 --><waypoint x="xxxx" z="xxxx" y="xx" tag="start" type="TRAVEL">

check your other thread.. i try to help there

Post Reply

Who is online

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