Quoted from "Jake;18508"
/script if (UnitHealth("player")/UnitMaxHealth("player")<=.50) then SendChatMessage( "Warning, health low", "SAY" ); UseAction(24);
can someone tell me what's wrong with this? (action 24 being this macro)
supposed to stay infinitely active, giving a warning whenever health drops below 50%
|
|
Source code |
1 |
/script if(UnitHealth("player")/UnitMaxHealth("player")<=.50) then SendChatMessage( "Warning, health low", "SAY" ); [B]else[/B] UseAction(23); [B]end[/B]
|
|
|
Source code |
1 2 |
/wait 10 /script UseAction(24); |
Quoted from "Zeromatter;18543"
You do not have an "; end" terminating your line of code therefore it will not work.
Also, you cannot use a macro inside itself, because that would quickly reiterate a bajillion times a second as it calls itself (plus the client usually crashes if you do it right).
Correct code:
You must also have a seperate "cooldown" macro, something like:
![]()
Source code
1/script if(UnitHealth("player")/UnitMaxHealth("player")<=.50) then SendChatMessage( "Warning, health low", "SAY" ); [B]else[/B] UseAction(23); [B]end[/B]
Your original macro would be Action 24, and your "cooldown" macro would be Action 23.
![]()
Source code
1 2 /wait 10 /script UseAction(24);
---
Of course, I highly reccomend never using this as it will quickly spam the entire screen with "Warning, blah-blah" and cause everyone around you to tear their eyes out![]()
|
|
Source code |
1 |
/script if (UnitHealth("player")/UnitMaxHealth("player")<=.85) then UseAction(9); elseif (UnitHealth("player")/UnitMaxHealth("player")<=.90) then UseAction(11); else UseAction(13); end
|
; UseAction(59); UseAction(60);
Quoted from "jigg;19091"
Is there a way to loot a corpse with the help of macros? Or initiate conversations with NPCS? I'd love to get away from having to click things to interact with them where I can.
Quoted from "shoestring;19302"
@ lukios
Seems like it would be close to what omnifas has done on the EU forums
but use Mana instead here is the link
![]()
Source code
1/script if (UnitHealth("player")/UnitMaxHealth("player")<=.85) then UseAction(9); elseif (UnitHealth("player")/UnitMaxHealth("player")<=.90) then UseAction(11); else UseAction(13); end
http://forum.runesofmagic.com/showthread.php?t=16065&page=11
Quoted from "Jake;18713"
Alright thanks, I guess I won't be using this
Any idea on what's wrong with this code then?
/script if(UnitHealth("target")>0) then UseAction(2); else end;
/script UseAction(25)
Macro action is 25, attack action is 2
Should keep using the attack action until enemy is dead (0% hp)
|
|
Source code |
1 |
/script if [B]Condition[/B] then [B]Action[/B]; else [B]Action[/B]; end |
|
|
Source code |
1 |
/script if(UnitHealth("target")>0) then UseAction(2); else UseAction(80); end
|
|
|
Source code |
1 2 |
/wait 0.5 /script UseAction(25) |
|
|
Source code |
1 2 3 4 5 6 7 |
/cast Fireball /wait 1.2 /cast Fireball /wait 1.2 /cast Fireball /wait 1.2 /cast Fireball |
Quoted from "lukios;19308"
thanks ill try and tweak it a bit and see if i can get it to work, if anyone does know of one that does work already please let me know. ill post the macro if i get it to work for anyone that may want it.
Quoted from "Pluto;19316"
/script if (UnitMana ("player") /UnitMaxMana ("player")<=.50) then UseAction(10); end
Quoted
/script local mana1, mana2=UnitMana("player"); SendChatMessage("Primary Mana:"..mana1..". Secondary Mana:"..mana2..".","SAY");