-
artosaari
- Posts: 15
- Joined: Sat Mar 16, 2013 7:59 am
#1
Post
by artosaari » Sun Dec 29, 2013 8:50 am
Hi there!
I've done quite some forum search, but haven't found anything so far, i wonder if it's possible to use something like this
Code: Select all
VARIABLE = 5;
sendMacro("ChoiceOption(VARIABLE);")
Or maybe there is an alternative to interact with npc bot-sided, because this sendmacro is client-sided?
This Code is for burning Honor Points at the mercheants and would make it much easier to buy different production mats.
Maybe this is a very fundamental coding question, I am sorry for my bad coding skills
kind regards
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#2
Post
by rock5 » Sun Dec 29, 2013 9:06 am
You are sending a string in game "ChoiceOption(VARIABLE);" that is executed in game. If VARIABLE is a bot value then it will be nil in the game. What you want to do is use the value held by that variable,eg.
Code: Select all
sendMacro("ChoiceOption("..VARIABLE..");")
See it still sends a string but the game will receive
"ChoiceOption(5);". I hope that clears it up for you.
Note: in this case VARIABLE is a number but if you are sending a string, you have to surround it with quotes. Eg.
Code: Select all
sendMacro("SomeFunction(\""..VARIABLE.."\")") -- Using escaped double quotes \"
or
Code: Select all
sendMacro("SomeFunction('"..VARIABLE.."')") -- Using single quotes '
- 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.”
-
artosaari
- Posts: 15
- Joined: Sat Mar 16, 2013 7:59 am
#3
Post
by artosaari » Sun Dec 29, 2013 9:41 am
Thank you so much rock5, works fine!!
Who is online
Users browsing this forum: No registered users and 56 guests