-
langelot133
- Posts: 18
- Joined: Sun Jun 17, 2012 6:41 pm
#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
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#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.”
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#3
Post
by lisa » Sat Aug 18, 2012 7:20 am
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
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#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.”
-
langelot133
- Posts: 18
- Joined: Sun Jun 17, 2012 6:41 pm
#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

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
#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
or
more than no
or
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#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.
== is used when making a comparison eg.
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.”
-
langelot
- Posts: 6
- Joined: Wed May 12, 2010 5:36 am
#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
Who is online
Users browsing this forum: No registered users and 0 guests