SaveSet() and LoadSet() script event functions not working
trav-i opened this issue ยท 9 comments
As the title says. The version of ItemRack that you ported over had these functions included, but they don't seem to be working right. When I called SaveSet(), I got an error that I was attempting to call a nil value.
Same here. The events that depend on it, don't work either. Like the Evocate event.
@trav-i how do you call them? Via a addon api?
@Rottenbeer Yeah, through the WA scripting api. I think I see where you're going with this, I should call ItemRack.SaveSet() instead of SaveSet()?
https://www.curseforge.com/wow/addons/itemrack-classic?page=2#comments
People claim that the Swimming Event works and there are also comments about the Evocation Event in the Thread, can you have a look there?
Did it work with one of the past versions or did it never work?
Also - since you linked a wowinterface thread - please note that I only update the addon on curseforge and dropped the upload to wowinterface.
I didnt see anything in the 17 page thread. Anyway, I can get it to work "sort of" as follows (the EVENT in the above description was wrong, it's UNIT_SPELLCAST_CHANNEL_STOP now):
Make this macro to cast Evocation:
/itemrack equip "Spirit Gear"
/cast Evocation
Make this event:
Event: Mage:Evocation
Trigger: UNIT_SPELLCAST_CHANNEL_STOP
Delay: 1
Script:
if not CastingBarFrame.channeling then EquipSet("Standard") end
I think the page I referred to is either outdated or completely wrong. I'll recheck tonight.
hmm your wowinterface thread is from 2005 and I had to change the default events and the event logic while I ported the addon to classic, so I'm not sure how to fix it tbh.
I neighter have a wow subscription nor a mage, so I appreciate if you can assist me here.
I don't know, I did not test it, so I would need to have a look. Why are you using SaveSet in WA?
For me, because of https://www.wowinterface.com/forums/showthread.php?t=2596 . It gives the following evocation macro, which doesn't work at the moment in Itemrack Classic, and I would be a very happy mage if it did.
This macro/event pair will swap in your spirit gear when you begin casting Evocation and then swap it out when you're done.
-
Make this macro to cast Evocation:
/script EVOCING=1 SaveSet("Spirit Gear") EquipSet("Spirit Gear")
/cast Evocation -
Make this event:
Event: Mage:Evocation
Trigger: SPELLCAST_STOP
Delay: 1
Script:
if EVOCING and not CastingBarFrame.channeling then EVOCING=nil LoadSet() end
--[[Unequips a set when done casting Evocation]] -
Associate the set "Spirit Gear" to the event. (can name it anything you want, doesn't need to be "Spirit Gear")
I'm an idiot and you're correct. Itemrack doesn't claim to support LoadSet and SaveSet in the readme.txt, and I hadn't checked the date on the thread either. It's very warm here :)
I'm now using the correct functions according to the readme I found in the code folder:
Make this macro to cast Evocation:
#showtooltip Evocation
/script EquipSet("SpiritGear")
/cast Evocation
Make this event:
Event: Mage:Evocation
Trigger: UNIT_SPELLCAST_CHANNEL_STOP
Delay: 1
Script:
if IsSetEquipped("SpiritGear") and not CastingBarFrame.channeling then EquipSet("Standard")
end
This works as intended. What DOES NOT work as intended is using the standard Evocation event. This starts to evocate then tries to equip the items (not working), leaving me in a state where Itemrack thinks it equipped the items (but didn't) and I evocated without benefit of spirit gear. However, my current macro/event combination works fine for now.