Transfer variable
Posted: Tue Jul 06, 2010 2:07 pm
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?
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?
Code: Select all
value = RoMScript("LoginNextToon")Code: Select all
value = true
RoMScript("}LoginNextToon="..tostring(value)..";a={")Code: Select all
function myAddOn.setHello()
mystring = "hello world 12345";
return mystring;
end
Code: Select all
value = sendMacro("myAddOn.setHello();");
addMessage(value);
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
Code: Select all
mystring = "";Code: Select all
function myAddOn.setHello(variable)
return variable;
endCode: Select all
value = sendMacro("myAddOn.setHello(mystring);");