WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   nUI: Suggestion Box (https://www.wowinterface.com/forums/forumdisplay.php?f=91)
-   -   Pally Buffs (https://www.wowinterface.com/forums/showthread.php?t=25443)

Deathj 07-14-09 06:15 PM

Pally Buffs
 
Is the any chance of someone making an info panel mod for all of the pally blessings and greater blessings similar to the mage potral addon?

Xrystal 07-14-09 11:08 PM

Rofl, I was thinking something along those lines for my priest/mage buffs so I can finally get rid of cryolysis as that is all I use it for now.

Technically it should be possible to make one to work with all classes and add the buttons dynamically :D

I'll have to look into it and see whats possible and go from there. Unless someone else was thinking of doing this ? In which case I won't be greedy and step back for someone else to have fun :D

Paksonarrion 08-31-09 04:58 AM

Actually, I love pally power, is there any way to fit that into an info-panel thingy?

richwarf 08-31-09 05:38 AM

I whold love to take a shot at this but i have no idear how to go about making any addon :(

Xrystal 08-31-09 10:14 AM

Use either the Mage Portal or Professions InfoPanel as a guide.

Use wowhead to find the spellIDs for the spells you want to utilise and set them up in the list in the main file.

Use GetSpellInfo with ID to get the details, with Link to see if they know it. If they don't the button gets greyed out until it is known. I think I had it tracking level up or new ability learnt event so that it triggers an update.

Professions was based on Mage Portals and I know Mage Portals fitted 2 lines of centered buttons assigned to spells ready to press as required.

A little tweaking and removing of code will get you a working version to test out.

todd0168 08-31-09 10:16 AM

Speaking of Mage Portals...

Is it possible to get it to restock arcane dust as well as the teleport/portal runes? Every time I finally get to the reagent seller, I just hit the OK button and forget to grab more powder.

:o

Xrystal 08-31-09 12:13 PM

Quote:

Originally Posted by todd0168 (Post 156932)
Speaking of Mage Portals...

Is it possible to get it to restock arcane dust as well as the teleport/portal runes? Every time I finally get to the reagent seller, I just hit the OK button and forget to grab more powder.

:o

grumbles ... rofl, someone asked that and considering it isn't a do all for mages and just mage portals I said no to them :D On the other hand, if there was a Mage Buff related addon then that would make sense :P

todd0168 08-31-09 04:12 PM

Ok, let me re-ask this question. Where in the code could I go and tweak to add in the arcane powder, so that I may continue to be lazy and forget to actually buy powder without actually forgetting?

:D

Xrystal 08-31-09 04:22 PM

Quote:

Originally Posted by todd0168 (Post 156986)
Ok, let me re-ask this question. Where in the code could I go and tweak to add in the arcane powder, so that I may continue to be lazy and forget to actually buy powder without actually forgetting?

:D

Rofl, hold on, and my apologies for being seemingly unhelpful :D Here goes.

Okay in file MagePorts.lua

In function MagePorts_ReagentRestock(Confirmed) add the following before the for loops.

Code:


RestockList[GetItemInfo(17020)] = false;
if ( GetItemCount(17020) < MagePorts_Defaults.MaxRestockQty ) then
        ReagentsLow = true;
        RestockList[GetItemInfo(itemID)] = true;
end

That should then allow you to keep the same amount of arcane powder in stock as portal runes. Of course you can change MagePorts_Defaults.MaxRestockQty to a specific value if you so wish. Although that same value is used for restocking everything further down in the file.

It should then include arcane powder in your restocking routine. Any other items you may need restocking then just copy that block and change the number to the itemID wowhead shows for it.

todd0168 08-31-09 04:26 PM

Quote:

Originally Posted by Xrystal (Post 156989)
Rofl, hold on, and my apologies for being seemingly unhelpful :D Here goes.

Okay in file MagePorts.lua

In function MagePorts_ReagentRestock(Confirmed) add the following before the for loops.

Code:


RestockList[GetItemInfo(17020)] = false;
if ( GetItemCount(17020) < MagePorts_Defaults.MaxRestockQty ) then
        ReagentsLow = true;
        RestockList[GetItemInfo(itemID)] = true;
end

That should then allow you to keep the same amount of arcane powder in stock as portal runes. Of course you can change MagePorts_Defaults.MaxRestockQty to a specific value if you so wish.

It should then include arcane powder in your restocking routine. Any other items you may need restocking then just copy that block and change the number to the itemID wowhead shows for it.

Fantastic! Thanks a heap. Now, how do I set that to a different amount? Do I just change MagePorts_Defaults.MaxRestockQty to a number? I currently have it set to 20 of each of the runes, but I would like 40 powders.

:D

/edit - sorry I think i just answered my own question by rereading your post. (answer being yes)

Xrystal 08-31-09 04:28 PM

Quote:

Originally Posted by todd0168 (Post 156991)
Fantastic! Thanks a heap. Now, how do I set that to a different amount? Do I just change MagePorts_Defaults.MaxRestockQty to a number? I currently have it set to 20 of each of the runes, but I would like 40 powders.

:D

/edit - sorry I think i just answered my own question by rereading your post. (answer being yes)

I'm just seeing what needs to change with the restocking routine as that uses that value too.

Edit: Okay, here goes. Look for this block of code and you should see what I changed.

Code:

        -- Check to see if this is a reagent vendor
        -- If it is and we have confirmed restocking then buy the reagents
        ReagentVendor = false;
        for i = 1, GetMerchantNumItems(), 1 do
                local name, _, price, quantity = GetMerchantItemInfo(i);
                if ( RestockList[name] ) then
                        ReagentVendor = true;
                        if ( Confirmed ) then
                                local count        = GetItemCount(name);
                                local restock = 0;
                                local maxstock = Mageports_Defaults.MaxRestockQty;
                                if ( name == GetItemInfo(17020) ) then
                                        maxstock = 40;
                                end
                                if ( count < maxstock ) then
                                        restock = maxstock - count;
                                        BuyMerchantItem(i,restock);
                                end
                        else
                                break;
                        end
                end
        end

That should then allow you to override the maxrestock qty for just the arcane powder. The same if statement can be used for any other item you want to regularly stock.

todd0168 08-31-09 07:30 PM

Ok do I need to post both things or just make the later changes in that area? I am so lost as I am SO not a coder. lol

/edit - If I put both sets of info in, I throw an error on opening the reagent vendor. If I only make the changes you listed later, I throw the error only when I am trying to hit the ok buy button.

todd0168 08-31-09 08:00 PM

Ok, I give up for now. I can't seem to get it to work right, so if there is simply a way for me to just add the arcane powder to the item list and have it at least stock the the max of 20 I set that would be great. I tried to just add the itemID for the powder to the beginning of that line but that seems to break it too. So I will wait until you are more available and will try again later.

Xrystal 08-31-09 08:10 PM

I'll do some coding on it to make it more flexible and test it to make sure what you want will work. That code I posted was untested so it might have had some bugs in it.

todd0168 08-31-09 10:06 PM

Quote:

Originally Posted by Xrystal (Post 157023)
I'll do some coding on it to make it more flexible and test it to make sure what you want will work. That code I posted was untested so it might have had some bugs in it.

You da bomb. :D

richwarf 09-01-09 04:38 AM

Quote:

Originally Posted by Xrystal (Post 156931)
Use either the Mage Portal or Professions InfoPanel as a guide.

Use wowhead to find the spellIDs for the spells you want to utilise and set them up in the list in the main file.

Use GetSpellInfo with ID to get the details, with Link to see if they know it. If they don't the button gets greyed out until it is known. I think I had it tracking level up or new ability learnt event so that it triggers an update.

Professions was based on Mage Portals and I know Mage Portals fitted 2 lines of centered buttons assigned to spells ready to press as required.

A little tweaking and removing of code will get you a working version to test out.

This is a bit pass me atm :(
I still at the marco area of coding...

Paksonarrion 09-01-09 04:06 PM

Can you direct me to where I would look to learn to make info panels plug ins? I only have practice with c and c++, but if I can figure out how to make a plug-in for pallypower, it'll be worth it.

Xrystal 09-01-09 04:33 PM

Quote:

Originally Posted by Paksonarrion (Post 157127)
Can you direct me to where I would look to learn to make info panels plug ins? I only have practice with c and c++, but if I can figure out how to make a plug-in for pallypower, it'll be worth it.

My first plugin was based on the minimap infopanel and the combat log infopanel. Scott has put a lot of comments in those to help someone starting out. I never knew any lua or much xml knowledge before delving into this and like you pretty much c programming knowledge.

Since then I have moved on and learnt more and have tidied up the code somewhat to separate the infopanel coding from the addons they are pluging into so you might want to also look at my decursive / omen plugin as that is an example of such separation.

My more recent visits to infopanel coding is to create a self contained plugin that doesn't require any other addon. In that instance I had a separate lua file that contained the functionality and treated it as if it was a separate addon within the infopanel coding. The MagePortals addon is an example of that.

There are others out there and I am sure there are a few of us that can help you if you have any queries. But your first steps would be to identify the frames in the addon you want to reparent into the infopanel and think up how they can be anchored in there.

todd0168 09-02-09 01:45 PM

So no word yet on the reagent thingy?

/sheepish grin

Xrystal 09-02-09 02:46 PM

Sorry, not had a chance to work on them yet. Sleep pattern got totally messed up and Ive been waking up about 2 hrs before raid time rofl. Need to get repair money :D


All times are GMT -6. The time now is 09:07 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI