#Weakaura send information to other wa

1 messages · Page 1 of 1 (latest)

shell cipher
#

Hello,

I have created a weakaura that receives a string and displays an icon from it.
Is it possible to send/retrieve this value (string or icon) in another weakaura ?

I apologize in advance if the question has already been asked, I searched and I did not find it!
Thanks for your help

frail sky
#

!scanevents

shell cipher
#

Great I did it, thank you very much!

shell cipher
#

Or not, when I send a value example : value1
When I print on the first weakaura I get :
Line 1 : value1
When I print in the other weakaura I get this :
line 1 : value1
line 2 : 1665185849.443
The value of line 2 changes from time to time

frail sky
#

Line 2 is most likely a timestamp from an event, i don't know what code u have or what you're trying to achieve peepoShrug

shell cipher
#

I need to do a GetspellInfo on this value, so i have an error cuz i try to do GetSpellInfo(1665185849.443)

#

is it possible to change this behavior?

frail sky
#

sure, you still havnt shared your code though

shell cipher
#

WA 1 : It is used to see if I have time to cast a spell (either a shadow bolt, or ua, corruption, gcd spell) before my haunt fades

Icon information :
function()

if UnitIsDeadOrGhost("target") then return "" end

nextCast = aura_env.whatToCast() -- Return String for example : Unstable Affliction

name, rank, icon, castTime, minRange, maxRange = GetSpellInfo(nextCast)

WeakAuras.ScanEvents("SCANEVENTS_TEST",nextCast) -- i send my string to an other WA
print(nextCast) -- Print correct String
return icon -- Return the spell on icon 

end

#

In the second WA i only have this : function(e,spellName)
print(spellName) -- return two line
aura_env.iconOne = spellName
return true
end

#

WA 2 : Icon information -
function()

if UnitIsDeadOrGhost("target") then return "" end
name, rank, icon, castTime, minRange, maxRange = GetSpellInfo(aura_env.iconOne)
print(castTime) 

return icon

end

frail sky
#

!`

hushed valveBOT
#

You can format your code to be much more easy to read using Discord "markdown" formatting:
```Lua
--CODE HERE
```
• ` these are "backticks", usually to the left of the 1 key, not apostrophes.
• If in doubt copy paste the above and add your code
• Bonus point available for using syntax highlighting:
◘ Using the name of the language you're using after the backticks provides syntax highlighting.
◘ "Lua" is the language used in WA custom code blocks.

shell cipher
#

WA 1 Trigger :

function()
    return true
end
#

WA 1 Icon Info :

function()
    
    if UnitIsDeadOrGhost("target") then return "" end
    
    nextCast = aura_env.whatToCast() -- Return a string ex : Unstable Affliction
    
    name, rank, icon, castTime, minRange, maxRange = GetSpellInfo(nextCast)
    
    WeakAuras.ScanEvents("SCANEVENTS_TEST",nextCast)
    print(nextCast) -- Return only 1 line
    return icon
end

#

WA 2 Trigger :

function(e,spellName)
    print(spellName) -- Print two line 
    aura_env.iconOne = spellName
    return true
end

#

WA 2 Icon Info :

function()
    
    if UnitIsDeadOrGhost("target") then return "" end
    name, rank, icon, castTime, minRange, maxRange = GetSpellInfo(aura_env.iconOne) -- error here
    print(castTime/1000) -- and here
    
    return icon
    
end

#

It's fine, sry i'm new haha

frail sky
#

what is aura_env.whatToCast()

shell cipher
#

This is the function that returns the name of the spell in question (just a string) e.g. return "Corruption" in the "Action" tab, "On Init" (Not sure on exact terms, I have a WA in French)

frail sky
#

why dont you send the name instead?

#

WeakAuras.ScanEvents("SCANEVENTS_TEST",name)

#

or the castTime/icon if that's what you're interested in

shell cipher
#

I just tried but it doesn't change the fact that I have two lines

frail sky
#
function(e,timeStamp,spellName)
    print(spellName) -- Print two line 
    aura_env.iconOne = spellName
    return true
end```
#

not sure why you get two lines though i cant replicate getting a timestamp when sending a scanevents

shell cipher
frail sky
#

can u share the auras?

#

!linkit

hushed valveBOT
#

WeakAuras doesn't show anything by default, it's just the framework that lets you import or create "Auras" to display things. If you're having an issue with an Aura, and/or want opinions on it, then you need to share the specific Aura. The best way to do this is to link it through https://wago.io/.

If you only imported the aura, you may right click the aura in-game and select Copy URL and paste it here. If you have modified the aura or created your own, you may instead select Export to string... and upload the string to https://wago.io/. This does not require an account.
You can now paste the import string directly into Discord (with no other text, only the string) and a bot will import it for you and link the wago.

frail sky
#

?

shell cipher
#

I just shared the example of the documentation you sent me, I have the same problem on it

#

I didn't say anything, it won't work for you, I have a French client

frail sky
hushed valveBOT
shell cipher
#

oh

frail sky
#

you are checking on CLEU without a subEvent filter which is really really bad

shell cipher
#

I was just looking for an event that updates very often for the moment

frail sky
#

find correct events for when to check instead of picking a random one

#

if there isn't any then check every frame with a throttle

#

even then thats a really bad aura for performance

shell cipher
#

Ok perfect !it's the 1st time I create a weakaura, thanks for the information !

frail sky
#

!events

hushed valveBOT
#

See this message for info on tracking the various game events fired by the API
<#pins message>