- Forum Moderator
Member for 16 years, 1 month, and 20 days
Last active Sun, Jun, 19 2022 04:12:18
- 1 Follower
- 1,400 Total Posts
- 19 Thanks
Aug 12, 2009Posted in: Lua Code DiscussionQuote from jerryBecause they may be other people rezing, ghosts entering the instance, dying in the lava pool that's on the left (I TOLD THEM not to go there :-( ) You pretty much have to rescan everybody anytime you need to select which one to rez.
Yes. Shortcut to Molten Core entrance... *shiver*
Hey Jerry, I'm going to use your code, since it makes sense and solves many problems in a very clean fashion.
Just two questions, just so I understand. I'll need to account for UnitInRange() and UnitIsVisable() and based on what I gather of your code, the best place to check for those would be in your compareUnit() function, correct? Looks like they would fit in right after the UnitIsGhost() checks.
Something like http://pastey.net/120844 I would wager.
The second question would be where would I put the
self:Print(L["All dead units are being ressed."])and
self:Print(L["Everybody is alive. Congratulations!"])messages? I tried to think them through, but nothing seemed quite right.
Aug 11, 2009Still hacking away at this. I've gone over the above answers, and there is a lot of good advice to digest. Somehow, my brain feels smaller. Anyway, I thought I'd post some code snippets that might make more sense.Posted in: Lua Code Discussion
First, is a res button. The Player presses this bound key and SmartRes2 picks a target based on the priority discussed above.
Then here is the whole function that I'm having issues with. Please note, this has none of the fixes posted above. I wasn't certain which suggestion would work best, and Tekkub's answer left me wondering how to do it as simply as he suggests.
I kind of feel like a child just learning to walk. But I suppose everybody has to start somewhere, eh?
Jul 21, 2009Posted in: General ChatQuote from TekkubSpartan's not bela's addon... is it?
And I recommend anything oUF-based :P
It would seem Beladona is the current dev, although Aesir seems to be a large contributor.
As you noticed, SUI is indeed oUF based. Bela switched to Ace3 for 2.6.x of the addon.
For the Beta thread.
Jul 19, 2009Posted in: AddOn HELP!Quote from nitchialeok now i have a new question:
im trying to add sound to this addon but i cant get the sound to trigger what am i doing thats not right?
TCatsUI = LibStub("AceAddon-3.0"):NewAddon("TCatsUI", "AceConsole-3.0", "AceEvent-3.0")
-- Called when the addon is loaded
-- Called when the addon is enabled
-- Called when the addon is disabled
p.s. its im using ace3.0 framework
in order to hash the "\"s? And I'm sure someone will correct me, but the ".wav" extension is not strictly necessary, but sometimes nice. Especially if somebody else takes over the addon development at a later date.
Jul 14, 2009Posted in: Lua Code DiscussionQuote from LombraI'm assuming the list's purpose is to show who to res first, and so he'd want to res other people that can res, as well.
Yes, exactly. The idea here is to res people who can res first, and I have both class and level as priorities because Blizzard made some classes better ressers than others, and obviously a higher level resser will be better than a lower level resser.
The reason the non-ressers were in my priority table was because at the end of the function, a character was returned to a button as the person you are ressing. The player does want to res everybody, just in a specific order, even Hunters. :p
@ArrowMaster: I was guessing that, but just wanted to confirm.
@lilsparky: If I remove the non-ressers, how would I eventually get to them after ressing the ressers?
@Slakah: The third arg was the whole question I am asking, and as Arrow said, I can't do what I want in the way I was thinking.
So, I am still at a loss. Is there a way I can organized self.Dead and return characters in the order I am looking for? Would it help if I posted my whole logic for you guys to analyze and point me in the correct direction?
... Or, worst case scenario, just return a random character like the original SmartRes (blah!)? I really don't want math.random to select a character.
Jul 14, 2009Posted in: Lua Code DiscussionQuote from Tekkubif a.level == b.level then
return (b.level < a.level) and ... <--- ALWAYS FALSE!
Ouch, ok, but that still hurts my head. Should I do one or more of the following?
- Remove the brackets
- Change the and to or
- To post a comment, please login or register a new account.