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.

Amberwave

Intermediate

  • "Amberwave" started this thread

Posts: 369

Location: Chicagoland

  • Send private message

1

Sunday, June 15th 2014, 6:41pm

Ending a search once condition is met

Is there a way, either macro or DIYCE, to set a condition to false, and once true, execute a command and turn itself off until you reset it or log off.

local herald = false for i =1,50 do if UnitBuff("target", i) == "Herald" then herald = true say in party chat, "..toon name IS HERALD" no longer check for herald

I want to be able to see who is herald if I target them, it does not seem to show up very often anymore when the event happens.

2

Sunday, June 15th 2014, 7:52pm

Using a global variable (along with the macro you posted already) could do this, but you would have to set it equal to false before entering siege war. To modify your current macro, just remove the part before the for loop, and set/declare your variable herald = false before entering siege. While you could program the same macro into diyce, it would be no different then making a macro and not having to add extra code to diyce.

Your other choice would be to make an addon to do this.

3

Sunday, June 15th 2014, 10:27pm

Something like:

Source code

1
herald = herald or false if not herald then for i =1,50 do if UnitBuff("target", i) == "Herald" then herald = true say in party chat, "..toon name IS HERALD" end end end


If herald is nil or false it will be executed, once your herald it will stop doing so.

.frafall