Jump to content
FORUMS
Krazyito

Weak Auras - Ask here for help! Read first post: Discord channel

Recommended Posts

 

So in my case player=Bobsaccamano and item=Wild Combatant's Medallion of Tenacity.  My code would be:

function (event, ...)   
  local trinket = select(Wild Combatant's Medallion of Tenacity, ...)
  local caster = select(Bobsaccamano, ...)
  if (trinket == 'Wild Combatant's Medallion of Tenacity' and caster == 'Bobsaccamano') then
    return true
  end
end

 

And wrong, don't mess with the selects. They return the events arguments so you can do your comparisons against them.

function (event, ...)   
  local trinket = select(2, ...)
  local caster = select(1, ...)
  if (trinket == "Wild Combatant's Medallion of Tenacity" and caster == 'player') then
    return true
  end
end

Share this post


Link to post
Share on other sites

Hey, I would like to know if it's possible to put a world marker at the position of my target when I use a skill or item.

For example, put the X world marker on the floor where the boss is the moment I use the legendary ring.

 

Thanks in advance

Share this post


Link to post
Share on other sites

Hey, I would like to know if it's possible to put a world marker at the position of my target when I use a skill or item.

For example, put the X world marker on the floor where the boss is the moment I use the legendary ring.

 

Thanks in advance

 

As far as I know, you can't because that requires the reticule.

  • Like 1

Share this post


Link to post
Share on other sites
function (event, ...)   
  local trinket = select(2, ...)
  local caster = select(1, ...)
  if (trinket == "Wild Combatant's Medallion of Tenacity" and caster == 'player') then
    return true
  end
end

 

If you're only doing select 1 and 2, all you have to do is 

 

local caster, trinket = ...

Share this post


Link to post
Share on other sites

 

function (event, ...)   
  local trinket = select(2, ...)
  local caster = select(1, ...)
  if (trinket == "Wild Combatant's Medallion of Tenacity" and caster == 'player') then
    return true
  end
end

 

If you're only doing select 1 and 2, all you have to do is 

local caster, trinket = ...

 

Thanks, didn't know that.

Share this post


Link to post
Share on other sites

Edit: If this is correct, WA is experiencing an error associated with the apostrophe in "Wild Combatant's Medallion of Tenacity." It thinks the apostrophe is the end of the string. How can I differentiate between the two?

Use double quotes (" ") for the outside and single (' ') on the inside.

I've never done this, but a [[ ]] can be used for multi line strings. So that should be another option

Share this post


Link to post
Share on other sites

Thanks, didn't know that.

May as well give you a quick ellipsis explanation.

... Is an ellipsis, which in lua (and some other languages) is used as a multi-argument parameter. Basically it hold 'everything else' that is passed through.

As you may have guessed, it holds multiple sets of information separated by a space, so when assigning a variable to an ellipsis you can initialize as many as you want, and it will pass through what it has.

If you didn't know you can do something like this

local one, two = 1, 2

Now if ... = 1, 2

You could do

local one, two = ...

and it would be the same.

To sum it up: an ellipsis can hold as many arguments as are passed into it and you can assign variable names in order of each argument in the ellipsis.

Or if you want to navigate somewhere inside it, then you use select.

  • Like 1

Share this post


Link to post
Share on other sites

Gotcha! I'm just a dirty frond end web developer, all I know of Lua is basicly what I've understood from other peoples code, and I've not had (and probably won't have) time to really get into the language. Little tidbits like the ones you just showed are really useful so I can optimize the stuff I create. Thanks again.

Share this post


Link to post
Share on other sites

 

Hey, I would like to know if it's possible to put a world marker at the position of my target when I use a skill or item.

For example, put the X world marker on the floor where the boss is the moment I use the legendary ring.

 

Thanks in advance

 

As far as I know, you can't because that requires the reticule.

 

 

Oh that sucks. Thanks for your help anyway.

Share this post


Link to post
Share on other sites

Thank you Redfalla and Krazyito for your help.  I created a trigger with a custom event (UNIT_SPELLCAST_FAILED), and entere for my custom code:

function (event, ...)   
  local trinket = select(2, ...)
  local caster = select(1, ...)
  if (trinket == "Wild Combatant's Medallion of Tenacity" and caster == 'player') then
    return true
  end
end

That did not work (icon did not appear, sound did not go off).  I also tried for my custom code:

function (event, ...)   
local caster, trinket = ...
  if (trinket == 'Trinkets Name' and caster == 'player') then
    return true
  end
end

But was met with the same results.  Thoughts?

 

edit:  If it helps, here is my string, using the latter code.

Edited by cag8f

Share this post


Link to post
Share on other sites

You were close. The code was correct, but it's not actually the trinket name we need to use here, but instead, the spell name that the trinket triggers. In this case, it is "PvP Trinket". I found this out by using /eventtrace and trying to use my Legendary Ring, which was attempting to cast a spell called Sanctus. Then I checked http://www.wowhead.com/item=125516/wild-combatants-medallion-of-tenacity&bonus=0and clicked on the "Use:" -link and found out the correct spell name.

 

Here's your string: http://pastebin.com/0UBVqJau

 

I changed the trigger to look for said "PvP Trinket" and set a Hide timer of 1 second to it, also tweaked the icon a bit.

Edited by Redfella

Share this post


Link to post
Share on other sites

So I hadn't been paying attention to this the pvp trinket since red was on it. But now that I actually read it, you don't need custom code

You can just do status -> spell cooldown (item) and put your item.

Share this post


Link to post
Share on other sites

Hi guys. I have an idea, actually a need for WA, but have not enough knowledge to do one myself. I want something like DBM or Exorsus puts for Archimonde infernals. I'm sorry that I can't provide a screen for that atm, but its basically 3 health bars that pops up after Archimonde summons infernals. They're showing health % for each infernal. I want an aura like that for felcasters on hellfire assault. Plus a range check would be nice as well. Can you help me? :)

Share this post


Link to post
Share on other sites

So I hadn't been paying attention to this the pvp trinket since red was on it. But now that I actually read it, you don't need custom code

You can just do status -> spell cooldown (item) and put your item.

 

As far as I understood it, he wanted a sound warning when he actually tries to cast PvP trinket while it's still on CD.

Share this post


Link to post
Share on other sites

Does anyone have a wa for gorefiends shared faith? I've been trying to create a wa which creates an arrow displaying into the direction of the rooted player. I've tried to rewrite the wa from highmaul from voximmartolis for the branded stack but I failed ;(

Share this post


Link to post
Share on other sites

Does anyone have a wa for gorefiends shared faith? I've been trying to create a wa which creates an arrow displaying into the direction of the rooted player. I've tried to rewrite the wa from highmaul from voximmartolis for the branded stack but I failed ;(

 

http://pastebin.com/icQaqGeq

 

That works with Exorsus Raid Tools.

Share this post


Link to post
Share on other sites

 

Does anyone have a wa for gorefiends shared faith? I've been trying to create a wa which creates an arrow displaying into the direction of the rooted player. I've tried to rewrite the wa from highmaul from voximmartolis for the branded stack but I failed ;(

 

http://pastebin.com/icQaqGeq

 

That works with Exorsus Raid Tools.

 

 

I'm not even sure what it does if you don't have ERT.

Share this post


Link to post
Share on other sites

 

So I hadn't been paying attention to this the pvp trinket since red was on it. But now that I actually read it, you don't need custom code

You can just do status -> spell cooldown (item) and put your item.

 

As far as I understood it, he wanted a sound warning when he actually tries to cast PvP trinket while it's still on CD.

 

 

@Red - You are correct, that is what I wanted.  And thanks for that research.  I tested the aura and it works perfectly.  Cool icon too.  Good learning experience for me.

Share this post


Link to post
Share on other sites

Hey I'm wondering if it's possible to make a weakaura that tells me that I'm wearing the wrong gear for my spec?!

 

I'm playing arcane- and frostmage with some different items.

EDIT: Nevermind, I just found a way, to check if one of the gear is equiped.

Edited by Lily

Share this post


Link to post
Share on other sites

Hey guys I just switched over to frost and am making weakauras for what button to press when. My obliterate seems to be showing when I only have one death rune active and I'm not sure why. If someone could look at it and tell me whats wrong I would really appreciate it.

http://pastebin.com/cM3EqE7M

 

Can't really help you with that at the moment, but check out the stickied Frost WeakAuras post on the DK forum here on Icy.

Share this post


Link to post
Share on other sites

Im trying to create a weak aura that tells me if my DK can attack my target or not.

 

That means that it should track the range of my target AND indicate weather im facing the right way or not.

 

Currently I have it set up so that it can check weather it's in melee range or not.

 

But how do I track if im facing the right way?

 

Here is the WA in question. http://pastebin.com/y3nStCJt

 

Reason for the size is that it's a background for my other WA's. 

 

The WA should only trigger if I can't attack my target with melee attacks.

Share this post


Link to post
Share on other sites

Can someone help write a function that will change the color of the text depending on the number of stacks?

Want to track stacks of selfless healer: if it have 1 stack - shows "1"(without icon) in white, 2 stack - "2" in yellow and 3 stacks - shows "3"  in green?

Also(but not necessary) if it have less than 5 seconds before the end - shows number of stacks in red

Is it possible?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...