Earlier Versions
Name | Size | Uploaded | Game Version | Downloads | |
v0.2 (beta) beta | 22.25 KB | Dec 8, 2021 | 9.1.5 | 0 | Download |
v0.1 (alpha) alpha | 19.58 KB | Dec 7, 2021 | 9.1.5 | 0 | Download |
Description
With SharedMacroFunctions you can create up to 100 functions each up to 1000 characters long to be used in your macros.
Most users just need increased length of macros for large scripts. But macrotext and scripttext shall be separated from each other in my opinion.
Thats why this addon came to life.This addon does not interfer your macros. The functions are stored seperatly. But:
It’s not compatible with addons that completely replaces the original macro frame.
How To
This addon adds a tab button called “F()” to the original macro frame.
There you can start to create your functions like you create macros.
You need to give the function a unique name thats not already taken by an other function – empty names or names with special characters are not allowed.
In this example just use “test” as function name. You don’t need to add the parenthesis.
As function text we use:
print( "hello world" )
And we gonna call that function with
/run test()
If you don’t need to pass arguments you can just omit the parenthesis:
/run test
Only use lua code inside the functions! Macro commands won’t work!
Passing arguments
As example use the following function text:
local arg1, arg2 = ...
print( arg1 )
print( arg2 )
Then you can pass any argument as you would normaly do:
/run test( "hello", "world" )
Conclusion
So instead of using long scripts in your macros create a function with that lua code and just use one line in your macro to call it like the example above.
Thank you for using my first addon released public <3
Add a comment