EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   UI Developer Discussion (https://www.eq2interface.com/forums/forumdisplay.php?f=3)
-   -   Conditional Statements? (https://www.eq2interface.com/forums/showthread.php?t=4474)

Valdacil 10-13-2005 11:00 AM

Conditional Statements?
 
Since I haven't located any information on this in a search and nobody has given a clear answer on my post regarding Market Presets Revisited I thought I'd ask here:

Is there any way to do conditional statements in the xml we have for EQ2 interface mods?

I'd like to setup a Market Preset button which will fill in the current character's class and level when the button is pressed. I know how to force the level fill in, however since the class is a drop down the class name would need to be resolved to a number. In order to do that I'd have to setup a series of conditionals (if class=fighter then classlist=1 elseif class=brawler classlist=2 elseif ...). Unless someone can come up with a different way of retrieving the character's class from GameData and parsing that to the appropriate number on the class list drop down in the market window.

Deathbane27 10-13-2005 01:04 PM

PlayerClass is a text object with the class dynamic data.

MainButton is the button you press

<Button Name="MainButton" OnPress="Parent.Button1.Activated=(Parent.PlayerClass.LocalText=='Fighter') Parent.Button2.Activated=(Parent.PlayerClass.LocalText=='Scout') ..." ...>

<Button Name="Button1" OnActivate="Parent.WhateverTheClassPulldownThingNameIs.SelectedItem=1 Activated=false" ...>

That should give you a general idea. If you need more examples, scroll down to Similar Threads and click on "Working IF statements!"


All times are GMT -5. The time now is 09:07 AM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI