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.

ruisen2000

not a wallet warrior

  • "ruisen2000" started this thread

Posts: 4,052

Location: here

Mood: Blink

  • Send private message

1

Saturday, January 11th 2014, 8:59pm

Display Lucky/Firey Chance

Is it possible to make a macro to display a message saying whether the skill in the special action bar 1 is firey chance or stormy chance when lucky chance is used?
Noblewarrior
lv 98/98/89/60 M/W/P/K
Kikosi 98/50/60 Wl/Ch/M
the fail clothie tank~

Inactive

Majik

Gamemaster

Posts: 159

Location: in your heads

Occupation: being your conscience

  • Send private message

2

Saturday, January 11th 2014, 9:37pm

Moved to "AddOns, UI & Macros: development" since it is a macro related question.
New Sig In The Works!

Game/Forum/IRC Rules - ToS - Support - Report Tool

3

Sunday, January 12th 2014, 6:01pm

Source code

1
/run for i=1,50 do a1,a2,a3,a4,a5 = UnitBuff("target",i) if a4 == 506582 then SendSystemChat("You have Stormy Chance") elseif a4 == 506670 then SendSystemChat("You have Fiery Chance") elseif not a4 then break end end


Sends a system message (orange text) of which skill you have.
Substitutions -- replace [SendSystemChat(message)] with
SendWarningMessage("you have fiery chance") if you want red text (like the "cooling down" message)
SendChatMessage("you have fiery chance,"PARTY") for party chat
SendChatMessage("you have fiery chance, "WHISPER",0,UnitName("player") to whisper yourself

Look up those functions on http://runesofmagic.gamepedia.com/List_of_Functions too find more information on using them.

ruisen2000

not a wallet warrior

  • "ruisen2000" started this thread

Posts: 4,052

Location: here

Mood: Blink

  • Send private message

4

Sunday, January 12th 2014, 6:44pm

Source code

1
/run for i=1,50 do a1,a2,a3,a4,a5 = UnitBuff("target",i) if a4 == 506582 then SendSystemChat("You have Stormy Chance") elseif a4 == 506670 then SendSystemChat("You have Fiery Chance") elseif not a4 then break end end


Sends a system message (orange text) of which skill you have.
Substitutions -- replace [SendSystemChat(message)] with
SendWarningMessage("you have fiery chance") if you want red text (like the "cooling down" message)
SendChatMessage("you have fiery chance,"PARTY") for party chat
SendChatMessage("you have fiery chance, "WHISPER",0,UnitName("player") to whisper yourself

Look up those functions on http://runesofmagic.gamepedia.com/List_of_Functions too find more information on using them.


Woot, Thank you Xamd! ^^

Do I need to have it on a seperate macro? I tried adding it to after the line that casts lucky chance, and first click of macro casts lucky chance, second click displays message fiery/stormy, but also casts lucky chance again.


Source code

1
2
 /script CastSpellByName("Lucky Chance")
/run for i=1,50 do a1,a2,a3,a4,a5 = UnitBuff("target",i) if a4 == 506582 then SendSystemChat("You have Stormy Chance") elseif a4 == 506670 then SendSystemChat("You have Fiery Chance") elseif not a4 then break end end 
Noblewarrior
lv 98/98/89/60 M/W/P/K
Kikosi 98/50/60 Wl/Ch/M
the fail clothie tank~

Inactive

This post has been edited 1 times, last edit by "ruisen2000" (Jan 12th 2014, 6:53pm)


5

Sunday, January 12th 2014, 7:35pm

I wonder if an addon could be made that makes lucky chance work the same as magic tricks and display different icons for each skill
New Sig Eventually

I Solo'd Horatio Tia 7-28-2012

6

Sunday, January 12th 2014, 8:18pm

Woot, Thank you Xamd! ^^



Do I need to have it on a seperate macro? I tried adding it to after the line that casts lucky chance, and first click of macro casts lucky chance, second click displays message fiery/stormy, but also casts lucky chance again.


Of course each click of your macro will cast lucky chance -- you have it in the top line to cast lucky chance EVERY TIME you use the macro.

to avoid this you would have to use the following (there is no need for /cast anything, just copy and past below)

Source code

1
/run local lucky = false for i=1,50 do a1,a2,a3,a4,a5 = UnitBuff("target",i) if a4 == 506582 then lucky = true SendSystemChat("You have Stormy Chance") elseif a4 == 506670 then lucky = true SendSystemChat("You have Fiery Chance") elseif not a4 then break end end if not lucky then ExecuteMacroLine("/cast Lucky Chance") end


The above is a 2 click method -- the first click should cast lucky chance, the second identify the skill. The following is longer, but is a 1 click method:

Source code

1
/run local lucky = false for i=1,50 do local t1,t2,t3,t4,t5 = UnitBuff("player",i) if t4 == 506582 or t4 == 506670 then lucky = true elseif not t4 then break end end if not lucky then ExecuteMacroLine("/cast Lucky Chance") for i=1,50 do a1,a2,a3,a4,a5 = UnitBuff("target",i) if a4 == 506582 then SendSystemChat("You have Stormy Chance") elseif a4 == 506670 then SendSystemChat("You have Fiery Chance") elseif not a4 then break end end

This post has been edited 2 times, last edit by "BlankMinded" (Jan 12th 2014, 8:34pm)


ruisen2000

not a wallet warrior

  • "ruisen2000" started this thread

Posts: 4,052

Location: here

Mood: Blink

  • Send private message

7

Sunday, January 12th 2014, 9:07pm

For the second macro, when I use the macro, it casts lucky chance, but does not display the message. It makes my toon say nothing in say chat 3 times.
ruisen2000 has attached the following image:
  • MAcro.jpg
Noblewarrior
lv 98/98/89/60 M/W/P/K
Kikosi 98/50/60 Wl/Ch/M
the fail clothie tank~

Inactive

8

Monday, January 13th 2014, 12:15am

Source code

1
2
3
/run local lucky = false for i=1,50 do local t1,t2,t3,t4,t5 = UnitBuff("player",i) if t4 == 506582 or t4 == 506670 then lucky = true elseif not t4 then break end end if not lucky then ExecuteMacroLine("/cast Lucky Chance") end
/wait .15
/run for i=1,50 do a1,a2,a3,a4,a5 = UnitBuff("player",i) if a4 == 506582 then SendSystemChat("You have Stormy Chance") elseif a4 == 506670 then SendSystemChat("You have Fiery Chance") elseif not a4 then break end end



That should work. First one didn't cuz I was missing an end statement and had "target" instead of "player" (that's what I get for typing sht out without testing). I added wait in between the "check" and the "message" parts of the macro, so that the buff is actually on the character before looking for it.

ruisen2000

not a wallet warrior

  • "ruisen2000" started this thread

Posts: 4,052

Location: here

Mood: Blink

  • Send private message

9

Monday, January 13th 2014, 1:23am

Is it possible to get rid of the /say chat? It is working now, but still sending blank messages in /say chat 3 times and prevents the macro from being used again, since the game doesn't allow you to spam /say chat.
Noblewarrior
lv 98/98/89/60 M/W/P/K
Kikosi 98/50/60 Wl/Ch/M
the fail clothie tank~

Inactive

ruisen2000

not a wallet warrior

  • "ruisen2000" started this thread

Posts: 4,052

Location: here

Mood: Blink

  • Send private message

10

Monday, January 13th 2014, 2:48am

Thank you for all the help Xamd!

Here is the macro if anyone else is interested:

Source code

1
2
3
4
5
/cast Lucky Chance

/wait .50

/run for i=1,50 do a1,a2,a3,a4,a5 = UnitBuff("player",i) if a4 == 506582 then SendSystemChat("You have Stormy Chance") elseif a4 == 506670 then SendSystemChat("You have Fiery Chance") elseif not a4 then break end end
Noblewarrior
lv 98/98/89/60 M/W/P/K
Kikosi 98/50/60 Wl/Ch/M
the fail clothie tank~

Inactive