#Weakaura send information to other wa
1 messages · Page 1 of 1 (latest)
!scanevents
Great I did it, thank you very much!
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
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 
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?
sure, you still havnt shared your code though
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
!`
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.
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
what is aura_env.whatToCast()
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)
why dont you send the name instead?
WeakAuras.ScanEvents("SCANEVENTS_TEST",name)
or the castTime/icon if that's what you're interested in
cuz im stupid, haha
I just tried but it doesn't change the fact that I have two lines
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
It seems i have the same problem on the example : https://wago.io/4ypVLlCqb
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.
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
!cleu
http://wow.gamepedia.com/COMBAT_LOG_EVENT ```LUA
function(event, timestamp, subEvent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, ...)
oh
you are checking on CLEU without a subEvent filter which is really really bad
I was just looking for an event that updates very often for the moment
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
Ok perfect !it's the 1st time I create a weakaura, thanks for the information !
!events
See this message for info on tracking the various game events fired by the API
<#pins message>