For my level
Hi there, I'm working on a new little mod and I was wondering if someone could help me out with a bit of info...
I am trying to make a button that will use for example a cure or poison potion and as I understand it you can set it to select the right pot for the level of the char using it .. is there an example in a mod of the code used to do this so i can figure out how to incorporate it into what I am doing? Many thanks :) Mistal |
The right choice of pots depend on the level of the target, not the level of the character that uses it as far as I remember. :)
ProfitUI has character level dependent code in group and raid windows though. |
So you'll need a text object that uses the dynamic data for your current level.
Code:
<Text DynamicData="/GameData.Self.Level" Name="PlayerLevel" Visible="false" /> This code will check to see if the player is above level 89: Code:
varCheck90=(Parent.PlayerLevel.text > 89) Then we can do the comparison line: Code:
varCheck90=(Parent.PlayerLevel.text > 89) So lets say you have a button called ButtonLvl90, and you only want that button to be pressed if the character is at least level 90. This will make the button visible or keep it hidden: Code:
varCheck90=(Parent.PlayerLevel.text > 89) The method to actually press the button should be within the Button itself. You would hide the button by default, give it the property OnShow and use this code inside it: Code:
Parent.ButtonLvl90.press=true Hope this helps. |
WoW thanks a lot for that .. i'm getting my head around it but it seems to be just what i'm looking for :D
Mistal :) |
All times are GMT -5. The time now is 07:44 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI