- Registered User
Member for 13 years and 5 months
Last active Fri, Oct, 4 2013 21:34:55
- 0 Followers
- 19 Total Posts
- 0 Thanks
Jun 22, 2010Thanks for taking the time to post the information. I'll look in to the possibility of changing over to Ace3 and post again if I'm having trouble.Posted in: Lua Code Discussion
Thanks again. :)
Edit: Though if anyone wants to post any tips to help or things to consider with regards converting it over, I'd still appreciate them.
Jun 22, 2010To be honest, I looked in to what Ace3 was shortly after I started trying to make an addon and it looked like a load of extra things to try to learn, when my goal was to make a simple and easy addon so I decided not to look further in to it. Additionally, having done more reading after your post, I still dont understand how I could use Ace3 to my benefit at the moment or how to efficiently learn how to use it.Posted in: Lua Code Discussion
I'm not opposed to putting the time and effort in to learn how to apply it if it really is the best option for the addon and the end user however.
Edit: I'll also add the menu I'm working on here so it's clear exactly what I'm aiming at.
Edit2: I'll link to it instead. http://i275.photobucket.com/albums/jj305/Irbeth/NewLayout.jpg
Jun 22, 2010Hi all,Posted in: Lua Code Discussion
I'm sure I should be able to find this myself, but I cant seem to, so sorry if it's an easy question.
I'm looking for a way to set checkbox' as arrays for easier working out later. The reason for this is that I have created a new version of my addon and overall it has over 100 checkboxes, and individually checking which one it is just looks like a massive mess and I really dont like messy code. I'm sure it's got to be the wrong way to do it and I'll explain exactly what I'm trying to do though in case there's an even simpler way of doing it.
In this part of the code I'm attempting to check for each spell I'm tracking, what channel the user wants the output to, and and a 5th option which varies slightly based on whether it's a buff or a ressurection, which is handled elsewhere in the code but needs to be saved none the less here.
My XML file for this part looks like this as psuedo-code:
DK frame of my addon
In the Hysteria Frame
Checkbox for "Whisper"Checkbox for "Party"Checkbox for "Raid"Checkbox for "Situational"Checkbox for "Warning Self"
Close Hysteria Frame
In the Raise Ally Frame
Checkbox for "Whisper"Checkbox for "Party"Checkbox for "Raid"Checkbox for "Situational"Checkbox for "Warning Self"
Close Raise Ally Frame
Close DK frame of my addon
Then in the LUA file, this is the exact code for CheckButton_OnClick:
if ( this:GetName() == "DK_Whisper_1" ) then if DK_Whisper_1:GetChecked() then CheckTable = "WHISPER" CheckButtonsUpdate("DK"); else CheckTable = "False" end end if ( this:GetName() == "DK_Whisper_2" ) then if DK_Whisper_2:GetChecked() then CheckTable = "PARTY" CheckButtonsUpdate("DK"); else CheckTable = "False" end end if ( this:GetName() == "DK_Whisper_3" ) then if DK_Whisper_3:GetChecked() then CheckTable = "RAID" CheckButtonsUpdate("DK"); else CheckTable = "False" end end if ( this:GetName() == "DK_Whisper_4" ) then if DK_Whisper_4:GetChecked() then CheckTable = "ALL" CheckButtonsUpdate("DK"); else CheckTable = "False" end end if ( this:GetName() == "DK_Whisper_5" ) then if DK_Whisper_5:GetChecked() then SelfReportTable = "True" else SelfReportTable = "False" end end if ( this:GetName() == "DK2_Whisper_1" ) then if DK2_Whisper_1:GetChecked() then CheckTable = "WHISPER" CheckButtonsUpdate("DK"); else CheckTable = "False" end end if ( this:GetName() == "DK2_Whisper_2" ) then if DK2_Whisper_2:GetChecked() then CheckTable = "PARTY" CheckButtonsUpdate("DK"); else CheckTable = "False" end end if ( this:GetName() == "DK2_Whisper_3" ) then if DK2_Whisper_3:GetChecked() then CheckTable = "RAID" CheckButtonsUpdate("DK"); else CheckTable = "False" end end if ( this:GetName() == "DK2_Whisper_4" ) then if DK2_Whisper_4:GetChecked() then CheckTable = "ALL" CheckButtonsUpdate("DK"); else CheckTable = "False" end end if ( this:GetName() == "DK2_Whisper_5" ) then if DK2_Whisper_5:GetChecked() then SelfReportTable = "True" else SelfReportTable = "False" end end
And in short, it's very very messy. So it does all work, but I'm wondering if anyone could tell me a better way of doing it in terms of best practice coding. My coding background is mostly in Basic/Visual Basic so I'm instinctively thinking I need an array of checkboxes and to load each one in as I load the addon, but I cant seem to find any way of doing it.
Thanks in advance for any help.
Jun 22, 2010Posted in: Addon IdeasQuote from PhanxJust FYI, you can attach zip files as attachments to posts, so you're not having to rely on a third-party host. ;)
Ah, I'm so used to not being allowed attachments on forums these days I didn't even consider it, thank you. :)
Also I'm glad it's working for you Kelben. :) Adding in the amount of 40 RP's could have been used from the amount wasted wouldn't be very hard at all, and even if I dont develop this in to a full project I'll add that in for you.
Edit: Seems the standard smile smilie isn't working for me.
Jun 22, 2010Well I'll upload what I've got so far as I'm not sure if I'll have any time to work on it some more tomorrow yet. I make no guarentee's as to it's accuracy or stability, and it's only been tested to the extent that it doesn't cause any errors to pop up.Posted in: Addon Ideas
It should work with any talent set up, Druid's Revitalise and Anti-Magic Shell as well as standard gains from spell casts.
To use it type:
/RPW Track - This begins or ends tracking.
/RPW Report - Reports total Rune Power wasted since tracking began.
If you have tracking on it'll report in to chat at the end of combat.
Finally (which I imagine anyone reading this forum probably knows but just to be sure), this is uploaded to a third party website which hasn't been verified and you should virus check it, ensure it's only a .toc file, a .lua file and a .xml file without any .exe files at all in it.
Anyway, the link is here:
I'll develop it in to something prettier/more accurate/better tested as time permits and probably get it added as an actual project if it turns out to be worth it. Also, the online version of my current addon (Chloe's Cast Informer) doesn't have it's variables called properly and doesn't work with this addon. It will with the version in testing at the moment, and I dont imagine it'd be an issue but since the link is in my signature I thought it worth mentioning.
Anyway I hope it's useful. :)
Jun 21, 2010Well I have a basic version working at the moment, but it only takes spells you cast in to account at the moment, so I'll be sure to upload something tomorrow, though it wont be on a curse related website as it'd take longer than that to be accepted and it likely wont yet be 100% accurate.Posted in: Addon Ideas
I'm adding in revitalise at the moment, but I probably wont have time to figure out how to add in AMS by tomorrow, and it wont thoroughly be tested, as I'm sure you'd expect on such a short time frame.
Jun 21, 2010Posted in: Addon IdeasQuote from KelbenRunic power returns, to the best of my knowledge are very rigid, you get x runic power for doing y and it returns z rp. Druid / priest revitalize returns can give you a bit of random rp spikes, but otherwise. And I'm more interested in this mod for a personal DPS evaluation of myself, not other dks in the group. I'd like to know if I end up hoarding a bunch of rp over the course of a fight, and find out how by how much. If i'm only wasting sub 100 rp over a 3 minute fight, not a big deal, but if I end up with 500 rp, then I need to fix my rotation up.
Yeah, discounting external gains, which'd still be easy enough to check for I cant see why it'd be difficult to track your own RP values. 1 rune used is 10 RP. 2+ is 15 RP. Horn of Winter is 10 RP. Then just deduct for Frost Strike, Death Coil and Rune Strike and the CD's. I dont think there are any external effects that cause us to lose RP?
Checking for runic power pots and Revitalise would be the only thing to check for externally.
I'm not sure many other people would be interested in that but I don't think it'd take too long, so I could throw something simple together to track your own RP values only if you'd like? I'm not doing anything today anyway and it'll be interesting to see if I can do it anyway. If you'd rather I didn't just let me know so I dont waste too much time. :P
Edit: Hmm Anti Magic Shell is also a bump to overcome.
Jun 17, 2010_ForgeUser2840558 posted a message on How long does an addon take to publish to Curse.com?I waited a few hours, went to bed, and it was up when I woke up, so I'd just give it time.Posted in: Need Help?
Jun 7, 2010Hi, since I was having the error I thought I'd go recreate it to add here but I cant seem to do so oddly. I first tried copying your LUA code in post 6 which worked fine, so I tried adding an xml frame in and removing the frame stuff (to better represent the situations of my errors) and then I tried just copy pasting the code I haven't altered since it wasn't working and it's working too today.Posted in: Lua Code Discussion
I spent quite a long while before I originally posted here with both Enterring World and Login events and got the error 100% of the time, and then today I cant recreate it even with the exact same code so I really dont know. For clarity, I was also only trying to get it once originally, the problem was on Login.
Either way though, your code suggestion is working perfectly, thanks.
Jun 6, 2010I tried the Player_Login event again and I donât know if it's something my end but I still get a nil value when I initially logged in. I got the same just using UnitClass("player"), so I'm fairly sure for some reason it doesn't recognise my character as existing at that point for whatever reason.Posted in: Lua Code Discussion
Going with the non-nil value idea though I moved the code in to SpellCast_Send as that has to be gone through before my addon does anything anyway, and checked if the variable I want set is nil at the top of it. It's one extra if check on spell send after the first spell (and shouldn't be a noticeable difference on the first one) which isn't perfect but I really donât think is an issue worth me worrying about at the moment, since it's now working as I want it to.
Also, thanks Seerah, I'm using the non localised version now.
Thank you all for your help, it's much appreciated! :)
Jun 6, 2010Ok, after quite a while and a lot of deleted files (sorry if an admin type person has to see them) I managed to get a working verion of my addon uploaded via my repository using Subversion. But could anyone help me with a couple of questions please?Posted in: Need Help?
1: Is it possible for me to remove the changelog file from the .zip file users will download that are uploaded this way?
2: Is there any way to upload a folder instead of the files 1 at a time, that wont result in a folder form like this?
-Repository Named Folder
-Uploaded Folder Name-File 1-File 2-File 3
Jun 6, 2010Just an update post. I've cleaned up the code a lot and removed the addon has loaded message which I dont think anyone really wants in their chat. :)Posted in: General AddOns
The options are stored in a table now, as are spell ID's so I've been able to make the spell detection in to a looped check which based on your class only scans for the spells you can cast instead of trying to match with every one in the list, which should improve spell detection speeds. I've also moved spell checking in to Spellcast send instead of success so it only locks the detection of new spells when one you're checking for is cast. Whilst it didn't happen in testing it occured to me it was possible that a 2nd spell might be missed if the computer was running slowly, I'm not sure if it's possible that a computer could run WoW and encounter that, but this at least ensures it doesn't matter.
Having written this though it has just occured to me there may be a problem ressurects being started and not finished, I'm gonna go test that and I'll rush out another update later today if it is an issue. For now just untick resurection spells if you're unsure or have an error with it, shall edit this post when I've tested interupting a spell.
Edit: Yeah if a resurrection fails for any reason no spell detection will work until that same spell is successful, the reason being all other spells I check for are instant cast so I forgot to add in a failed clause for the resurrection's. Shall post an update up for approval within the hour.
Edit 2: Update online awaiting approval (as I cant yet get the repository to work).
Edit 3: Repoistory upload worked, latest version is available.
Jun 5, 2010Posted in: Lua Code DiscussionQuote from SeerahI'm confused... If what you're looking for is the class, then why not use UnitClass("player")?
Well, I feel silly. I spent a while looking for something like that and failed so I went back to trying the first thing I had found (which did seem like the wrong thing to use, which is why I looked for something else). Thanks for that. :)
- To post a comment, please login or register a new account.