Any know how do I pass a variable from script in game to script in the bot?
Transfer variable
Transfer variable
Hi
Any know how do I pass a variable from script in game to script in the bot?

Any know how do I pass a variable from script in game to script in the bot?
Re: Transfer variable
I use something like that in fastlogin_revisited.zbynio wrote:Hi
Any know how do I pass a variable from script in game to script in the bot?
The in-game script uses a variable "loginNextToon" to tell it if it hould login your next character.
I read that value from the bot like this;
Code: Select all
value = RoMScript("LoginNextToon")Code: Select all
value = true
RoMScript("}LoginNextToon="..tostring(value)..";a={")- 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
Re: Transfer variable
a very cool way - thank you @rock5
but...
this is boolean
i need:
in-game script (addon) set a long alphanumeric string and read it in the script bot
ex.:
in addon mystring need as global <-- I dont know how make this
in bot <-- work fine
but...
this is boolean
i need:
in-game script (addon) set a long alphanumeric string and read it in the script bot
ex.:
in addon mystring need as global <-- I dont know how make this
Code: Select all
function myAddOn.setHello()
mystring = "hello world 12345";
return mystring;
end
Code: Select all
value = sendMacro("myAddOn.setHello();");
addMessage(value);
- Administrator
- Site Admin
- Posts: 5353
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Transfer variable
Type shouldn't mater for this. I'm fairly certain that strings work.
Re: Transfer variable
Just declare the string outside of any functions, usually at the top of the file.zbynio wrote: in addon mystring need as global <-- I dont know how make this
eg.
Code: Select all
mystring = "";Code: Select all
function myAddOn.setHello(variable)
return variable;
endFor instance you want mystring, just use;
Code: Select all
value = sendMacro("myAddOn.setHello(mystring);");- 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