Hi,
in siege wars I use a makro to take all my speed buffs after eachother. Some of them last only a few seconds so I want to get the maximum out of my makro.
This is my makro:
/use Spruchweber-Trank -- Spellweaver Potion
/wait 0.3
/script SetTitleRequest(530460); -- title: First Colonel (Magic Division) ; is used to activate the next skill
/wait 0.7
/script CastSpellByName("Wilder Sturm"); -- Mad Rush; skill of the title above
/wait 0.3
/script SetTitleRequest(530653); -- switch to title: Escape Artist
/wait 0.3
/use Trank: Gute Reise -- Potion: Godspeed
/wait 8
/use Trank: Grenzenloser Enthusiasmus -- Potion: Unbridled Enthusiasm
like you can see I use very short wait times between the actions, but in siege war my game laggs a lot and sometimes the script forgets to use a skill.
Is it possible to add something, that he does every action until it's really done? So he should "click" the skill Mad Rush until you have the buff or something like that. Is this possible??
Check skill cooldown in a makro
Re: Check skill cooldown in a makro
Yes but it would involve a lot more code which means it would probably end up being more than the 255 characters for a macro, so you might end up with 2 macros.
http://www.theromwiki.com/API:UnitBuff
I just used 1 to 25 as an example, if you find you usually have more than 25 buffs then you could increase the number, this will give you the buff ID and you can use that to check if you have the buff you want.
So basically you want to check if you have the buff before continuing with the code. I would probably use the buffID instead of the name as it will be shorter and use up less characters in the macro.
It will be tricky to implement but it is possible.
http://www.theromwiki.com/API:UnitBuff
Code: Select all
for i=1,25 do _,_,_,ID=UnitBuff("player",i)So basically you want to check if you have the buff before continuing with the code. I would probably use the buffID instead of the name as it will be shorter and use up less characters in the macro.
It will be tricky to implement but it is possible.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Check skill cooldown in a makro
Code: Select all
for i=1,25 do _,_,_,ID=UnitBuff("player",i)don't know if I'm right but if I would end up with 2 makros it would not work because in rom it's impossible to let a makro activate an other makro.so you might end up with 2 macros.
Re: Check skill cooldown in a makro
a macro is basically LUA anyway, the same as rombot, it is just that you need to initiate the code differently, ie /script
Alternatively you could do
which would take up the same number of characters in the macro but it means that it will be storing the values of a,b,c which aren't needed.
A few ways to do it, you could add the ID's to a table or just add in each ID to the specific part of code.
Like I said macros are written in the same language as rombot so it is just a matter of doing up the code =)
example
in rombot
that would print to MM fruit
in a macro
That would print on rom chat screen fruit
With macros though each character is counted, even spaces so you would take out any unneccessary spaces and it could be like this
Max is 255 characters for each macro
yeah I meant you will need to have 2 macros and press a hotkey for both, if you can manage to get it all in 1 macro you are doing well =)AlterEgo95 wrote:don't know if I'm right but if I would end up with 2 makros it would not work because in rom it's impossible to let a makro activate an other makro.
I am pretty sure using _ will work but basically there are 4 values returned and you want the forth one, so the _,_,_, is to say that there are 3 values but you don't need them.AlterEgo95 wrote:What does the _,_,_, mean?
Alternatively you could do
Code: Select all
a,b,c,ID=UnitBuff("player",i) A few ways to do it, you could add the ID's to a table or just add in each ID to the specific part of code.
Like I said macros are written in the same language as rombot so it is just a matter of doing up the code =)
example
in rombot
Code: Select all
table1 = {"fruit","lollies"} print(table1[1])in a macro
Code: Select all
/script table1 = {"fruit","lollies"} sendSystemChat(table1[1])With macros though each character is counted, even spaces so you would take out any unneccessary spaces and it could be like this
Code: Select all
/script table1={"fruit","lollies"} sendSystemChat(table1[1])Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Check skill cooldown in a makro
You could always try using an addon to hold your own functions. Then just call the functions from the macro. Creating an addon for your functions is easy. Just create a folder in "Runes of Magic/interface/addons", lets call it "myfunctions". Then add a text file in it called "myfunctions.toc". In that file add the line "myfunctions.lua". Lastly, add a text file called "myfunctions.lua". Then in that file you can add all the functions you want. Here, I'll do it for you.
I also added a couple of functions for printing your buffs and made a function that returns true if you have a buff. Hope that helps.
- 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