You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

61

Monday, January 12th 2009, 8:57am

/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%

Zeromatter

Beginner

Posts: 11

Location: New Zealand

Occupation: Real work.

  • Send private message

62

Monday, January 12th 2009, 12:57pm

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%


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:

Source code

1
/script if(UnitHealth("player")/UnitMaxHealth("player")<=.50) then SendChatMessage( "Warning, health low", "SAY" ); [B]else[/B] UseAction(23); [B]end[/B]
You must also have a seperate "cooldown" macro, something like:

Source code

1
2
/wait 10
/script UseAction(24);
Your original macro would be Action 24, and your "cooldown" macro would be Action 23.

---

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 :mad:

63

Monday, January 12th 2009, 1:09pm

Is there some way to get around the 64 char limitation. Several of my macros have stopped working because after I type them in and save them, I go back into edit mode and they are cut off.

How do we get around this?

Thanks

***Edit
Thank You shoestring
\/\/\/\/\/\/\/\/\/\/\/\/

shoestring

Beginner

Posts: 10

Location: Milwaukee, WI

Occupation: Business System Analyst

  • Send private message

64

Monday, January 12th 2009, 7:53pm

read post 31# in this same thread
Osha PVE

Silencehuman ( 50 Scout/ 40+ Priest) P/S now

65

Monday, January 12th 2009, 11:16pm

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:

Source code

1
/script if(UnitHealth("player")/UnitMaxHealth("player")<=.50) then SendChatMessage( "Warning, health low", "SAY" ); [B]else[/B] UseAction(23); [B]end[/B]
You must also have a seperate "cooldown" macro, something like:

Source code

1
2
/wait 10
/script UseAction(24);
Your original macro would be Action 24, and your "cooldown" macro would be Action 23.

---

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 :mad:


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)

66

Tuesday, January 13th 2009, 7:49pm

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.

67

Tuesday, January 13th 2009, 9:00pm

Quoted

There are ways to connect Macros, and you'll see a few in the list above.
I'm not completely sure what this means or how to do this. Can someone clarify?

68

Tuesday, January 13th 2009, 9:21pm

does anyone know how to make a macro that will automatically press mana absorption when ever it becomes available and when im low a certain percentage of mana, any thing close to this. if i cant do this, id settle for it just going off when available, but i would really like it to go off when available and when i really need it to go off when im running low on mana or at least when im half way out or something.

thanks

shoestring

Beginner

Posts: 10

Location: Milwaukee, WI

Occupation: Business System Analyst

  • Send private message

69

Wednesday, January 14th 2009, 3:18am

@ lukios
Seems like it would be close to what omnifas has done on the EU forums

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
but use Mana instead here is the link

http://forum.runesofmagic.com/showthread.php?t=16065&page=11

@xagest

I link macros by placing the macros on a empty part of the Right toolbar and then making another macro to combine them like so

/script UseAction(56); UseAction(57); UseAction(58); UseAction(59); UseAction(60);
Osha PVE

Silencehuman ( 50 Scout/ 40+ Priest) P/S now

Zeromatter

Beginner

Posts: 11

Location: New Zealand

Occupation: Real work.

  • Send private message

70

Wednesday, January 14th 2009, 3:19am

Quoted from "Xagest;19131"

I'm not completely sure what this means or how to do this. Can someone clarify?


UseAction(); specifies a skill-bar slot to use. Placing a macro in the said slot will cause that macro to be run; hence you can link multiple macros.

Zeromatter

Beginner

Posts: 11

Location: New Zealand

Occupation: Real work.

  • Send private message

71

Wednesday, January 14th 2009, 3:22am

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.


There is autoloot already in the options menu, all you need to do is open the corpse and you take all the loot automatically.

You can't initiate convo's with NPCs without somehow clicking, selecting, walking to or generally "interacting" with them. There may be a "SelectNearestNPC" macro, but that would probably require more work than simply using your mouse and clicking on it ;)

72

Wednesday, January 14th 2009, 3:22am

Quoted from "shoestring;19302"

@ lukios
Seems like it would be close to what omnifas has done on the EU forums

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
but use Mana instead here is the link

http://forum.runesofmagic.com/showthread.php?t=16065&page=11

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.

Zeromatter

Beginner

Posts: 11

Location: New Zealand

Occupation: Real work.

  • Send private message

73

Wednesday, January 14th 2009, 3:29am

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)


You must read more carefully the examples given. The semi-colon goes before the word "end", such as:

Source code

1
/script if [B]Condition[/B] then [B]Action[/B]; else [B]Action[/B]; end
The else action is, of course, optional.

If your macro is on slot 25, you are again trying to make it call itself which will NOT work.

Try:

Source code

1
/script if(UnitHealth("target")>0) then UseAction(2); else UseAction(80); end
Macro on slot 80:

Source code

1
2
/wait 0.5
/script UseAction(25)

However: this macro will continue forever, on every single target you select and will not ever stop. There is little reason to create a macro loop such as this, and you would be better off creating a macro that spams a skill 4 or 5 times, say like:

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


I hope I have clarified some things. :D

Pluto

Beginner

  • "Pluto" has been banned

Posts: 6

Location: IN

  • Send private message

74

Wednesday, January 14th 2009, 3:29am

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.


/script if (UnitMana ("player") /UnitMaxMana ("player")<=.50) then UseAction(10); end

75

Wednesday, January 14th 2009, 3:51am

Quoted from "Pluto;19316"

/script if (UnitMana ("player") /UnitMaxMana ("player")<=.50) then UseAction(10); end

ok im gunna break it down barney style . . . if players mana goes lower then 50% then use action 10 (which is what . . .) does that mean i have to place my absorb mana in a particular spot on my hotbar?

also where can i learn how to write macro scripts

76

Wednesday, January 14th 2009, 5:51am

I ws wondering if it was possible to have embedded if statements in a macro.

like

if A then (if B then C else D)

77

Wednesday, January 14th 2009, 6:34am

I think i just figured somethign out that I hadnt noticed yet in the thread.

im a warrior/priest

used the following macro
/script local var1 = UnitMana("player"); SendChatMessage(var1,"SAY");

i get 0
use Enraged
i get 15

had a scout/knight use it
he got 100
cast shot a bunch of time
he got 25

i swapped to my priest and i got my actual mana 1661

so, the UnitMana("player") appears to return the players' primary class main energy.

Can anyone else try this as well to check me on this

Zeromatter

Beginner

Posts: 11

Location: New Zealand

Occupation: Real work.

  • Send private message

78

Wednesday, January 14th 2009, 12:28pm

That is correct, the UnitMana returns the Primary mana stat. There is a way to get secondary mana, simply save it into two variables, such as:

Quoted

/script local mana1, mana2=UnitMana("player"); SendChatMessage("Primary Mana:"..mana1..". Secondary Mana:"..mana2..".","SAY");


The comma takes the data from the UnitMana() and puts the first piece of data into the first variable (primary mana) and the second piece of data (secondary mana) into the second variable.

79

Wednesday, January 14th 2009, 2:25pm

Is there a way to target another party member. I have tried several suggestions in this thread but none of them seem to work for me. Any ideas?

shoestring

Beginner

Posts: 10

Location: Milwaukee, WI

Occupation: Business System Analyst

  • Send private message

80

Wednesday, January 14th 2009, 6:28pm

I have a few questions since working with macros and addons in RoM.

I've been lurking around the EU forums and can not find the code to change the location of the BootyFrame , i think thats what its called? ( not the loot frame but the box that pops up during Raids, ie need, greed of items.)

and

I use the addon pbMobInfo its great but sometimes it gets in the way of seeing what is going on.
My question to the experts is their a way to turn on and off the mouse over tooltips via macros? There is something in the system settings but it doesn't do anything.
Osha PVE

Silencehuman ( 50 Scout/ 40+ Priest) P/S now