Building DKP Addon with Web-based PHP Database access
For someone who doesn't know crap about LUA or the WoW UI this sounds like it's going to be a headache and a half, but It's part of an on-going project to make guild life easier on everyone that my guild has taken up. What we hope to achieve here is a web-based system for the guild master and raid organizers to use that will track the players' DKP. The players will install an addon that will simply display their current DKP by loading a LUA file from the web server. This LUA file is actually a PHP script that accesses the database and exports the information into variables that the addon will access to show the player's current DKP available.
Eventually we would like to have this system working with an in-game addon that would allow the raid organizer to enter a username/password to authenticate with the web API and allow them to award DKP to every player in the raid automatically without the need to type in the names to add DKP for the raid. This interface would also allow them to subtract DKP for misbehavior, purchased items, etc.
All-in-all what we are after is a method to make DKP real-time. You shouldn't have to tab out or keep a scratchpad with your DKP on it for heavy raiding guilds. Nor should the leaders of the guild need to spend a couple hours a night managing the DKP system. We're hoping that once this system is built that guilds across all realms will find it to be one of those "necessity" addons that you can't live without.
I program PHP for a living so I'm very up-to-speed on the basics of coding/scripting etc, but I have to admit that LUA is friggin confusing the crap out of me here. I've read all these tutorials and whatnot, but I can't find the simple info I need to start with this addon. All we need is a little box, or text area under the player portrait in the upper-left that can have it's text set to the content of a variable which is loaded from an LUA script on the webserver. Not a very complicated addon, but I can't even find the information on how variables are defined in LUA. I've tried to code it in the wow UI designer program and I just don't know what to do lol. I've opened every addon I have and can't seem to find anything that would be a variable with a value assigned to it, so I'm at a complete loss here.
I guess I'm just hoping someone here could give me a clue as to where I should start here... I've been to the wiki and all the links in the tutorials and read every forum I can, but I'm just not finding what I need. If someone has a few spare minutes to throw up an XML and LUA script that would just show me how to set a variable, then use the data in the variable to populate the text field in the XML layout I think I could manage from there as far as this part goes. When it comes to the adding buttons and login info *runs and hides*
This is for the good of all guilds if we can get it working, so please don't think I'm going to selfishly um.. horde.. the code for myself and my guild (sorry for the bad pun lol). Any help would be appreciated by myself and all who use this DKP management system in time!
The WoW client cannot write to files during a gaming session. SavedVariables are only written to file during a console reload or restart of the gaming client.
The WoW API cannot read from external sources.
You will not be able to show real-time adjustments going to or coming from a web interface. You CAN show these changes in real-time ingame and have other guild members see these changes as well, provided they have the same AddOn and somebody with the changes is logged in.
If you want to show changes on a web interface, you will have to export the changes from a game file and upload to your web server (none of which is possible until the changes are saved to file which only happens during a console reload or restart of the gaming client).
Hi, I wanna add a few questions to this:
Im kinda in the same situation. However, Ive decided to start with a already working addon that does more or less what thread starter wants. But this addon dont do what I want it to do;
Im using a dkp system called ep/gp. Many people uses a addon made for this, but alot of people have started modding eqdkp sites to use this system instead because the eqdkp site has alot of functions and in addition, using officer notes isnt the most secure thing in the world.
What this system does is that it uses the dkp you earn, divide it by the dkp you have used on items and decides your priority on items. This priority is then used to decide who gets what in a multiple need situation(highest priority wins).
Before I continue: Do note that this addon is NOT supposed to be used for uploading dkp to the site after raid(atleast not yet!), Im going to use a normal dkp tracker for that.
Ok, so I have managed to fix the look of the addon, with the correct names on buttons etc. Also checked that the dkp is read correctly still.
Now, what I still need to get done is:
1. I need to be able to add dkp cost to the GP part of the addon(or known in the original addon for "spent") as I go.
2. I need to have the PR setting working, this will display the value of EP divided by the GP value(including the updated one from current raid).
3. Sort by PR(this is currently not working ofc, due to "nil value" :P)
I guess my question is: Is this doable? If so, what should be my approach to this? And how hard would this be?
Im currently a novice c++ coder and I understand to a certain extent lua when I look at it.
Here is the addon Im using as a skeleton: http://www.wowinterface.com/download...eDKPTable.html
Im also using another remake of the same addon for the eqdkp parser:
Also, how much of this work is lua knowledge and how much is knowledge of the wow UI API?
|All times are GMT -6. The time now is 11:58 AM.|
vBulletin © 2015, Jelsoft Enterprises Ltd
©2012 ZAM Network LLC