read account name?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
langelot133
Posts: 18
Joined: Sun Jun 17, 2012 6:41 pm

read account name?

#1 Post by langelot133 » Sat Aug 18, 2012 7:08 am

hello, i'm sorry to ask again for help but i've been searching for long with no result

i'd like to include a If function in a waypoint file reading the account name or number (using fastlogin if necessary) to do something for all the characters of one account but other things with a second account all using the same WP file



for example

Code: Select all

if accountname == XXXXXXX then
DOTHING
else
DOOTHERTHING
end
thanks for your help

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

Re: read account name?

#2 Post by rock5 » Sat Aug 18, 2012 7:20 am

Code: Select all

AccountNumber = RoMScript("LogID")
CharacterNumber = RoMScript("CHARACTER_SELECT.selectedIndex")

AccountName = RoMScript("GetAccountName()")
CharacterName = player.Name
  • 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: read account name?

#3 Post by lisa » Sat Aug 18, 2012 7:20 am

Code: Select all

RoMScript("LogID")
if accountname == RoMScript("LogID") then
DOTHING
else
DOOTHERTHING
end
Ok Rock wins, by a few seconds and I put the code for acc number but said accountname lol
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: read account name?

#4 Post by rock5 » Sat Aug 18, 2012 7:30 am

lisa wrote:Ok Rock wins
Yay! For once.
  • 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

langelot133
Posts: 18
Joined: Sun Jun 17, 2012 6:41 pm

Re: read account name?

#5 Post by langelot133 » Sat Aug 18, 2012 3:29 pm

i'm going to try it right now
thanks for helping me



edit: like eveytime you help me, it works perfectly thanks :D
edit2: it work twice but now the bot still do one of the 3 account scripts i made ... maybe something wrong in my WP
Last edited by langelot133 on Sun Aug 26, 2012 9:36 am, edited 1 time in total.

langelot133
Posts: 18
Joined: Sun Jun 17, 2012 6:41 pm

Re: read account name?

#6 Post by langelot133 » Sun Aug 26, 2012 9:34 am

there is something i never know, and my wp file are sometime working and sometime not


should i put

Code: Select all

if "accountname" == RoMScript("GetAccountName()") then

or

Code: Select all

if accountname == RoMScript("GetAccountName()") then 

i never know when to put

Code: Select all

  "" 
or

Code: Select all

 == 
more than no

Code: Select all

 " 
or

Code: Select all

 = 

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

Re: read account name?

#7 Post by rock5 » Sun Aug 26, 2012 12:48 pm

"accountname" is a string. accountname is a variable.

Lets say your account name is "langelot". You could use

Code: Select all

if "langelot" == RoMScript("GetAccountName()") then
or you could use

Code: Select all

accountname = "langelot"
if accountname == RoMScript("GetAccountName()") then
= is used when you want to assign a value to a variable eg.

Code: Select all

variable = 5
== is used when making a comparison eg.

Code: Select all

if variable == 5 then
Hope that clears it up for you.
  • 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

langelot
Posts: 6
Joined: Wed May 12, 2010 5:36 am

Re: read account name?

#8 Post by langelot » Tue Aug 28, 2012 7:14 am

ok i thought it was something like that but wasn't sure , thanks for all your help rock

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests