EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > UI Developer Discussion

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 01-01-2011, 09:50 PM
DaemonSambe DaemonSambe is offline
A Brown Bear
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 11
Default Help with scripts

Exactly what do i need to do to get a script to run?

Consider the following:

Code:
		<Page Location="2616,-2" MaximumSize="132,20" MinimumSize="132,20" Name="Coin" ScrollExtent="110,20" Size="117,20">
              
            <Text Visible="False" actiontype="Coin" cointype="3" Dragable="true" DragAccepts="icon" DragType="coin" DynamicData="/GameData.Coins.Coin_3" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="1,2" Margin="0,0,5,0" MaxLines="1" Name="Plat" ScrollExtent="40,16" Size="40,16" TextAlignmentVertical="Center" Tooltip=":80c1011d293ba1c4:Platinum" TreatAsButton="true" ActionData="coin 3" TextAlignment="right">999</Text>
            
            <Text Visible="False" actiontype="Coin" cointype="2" Dragable="true" DragAccepts="icon" DragType="coin" DynamicData="/GameData.Coins.Coin_2" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="41,2" Margin="0,0,5,0" Name="Gold" ScrollExtent="23,16" Size="23,16" TextAlignmentVertical="Center" TextColor="#FFEE70" Tooltip=":80c1011d18644d90:Gold" TreatAsButton="true" ActionData="coin 2" TextAlignment="right">99</Text>
            
            <Text Visible="False" actiontype="Coin" cointype="1" description="Silver" Dragable="true" DragAccepts="icon" DragType="coin" DynamicData="/GameData.Coins.Coin_1" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="64,2" Margin="0,0,5,0" Name="Silv" ScrollExtent="23,16" Size="23,16" TextAlignmentVertical="Center" TextColor="#A0A0A0" Tooltip=":80c1011dd708e292:Silver" TreatAsButton="true" ActionData="coin 1" TextAlignment="right">99</Text>
 
            <Text Visible="False" actiontype="Coin" cointype="0" description="Copper" Dragable="true" DragAccepts="icon" DragType="coin" DynamicData="/GameData.Coins.Coin_0" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="87,2" Margin="0,0,5,0" Name="Copp" ScrollExtent="23,16" Size="23,16" TextAlignmentVertical="Center" TextColor="#EA9129" Tooltip=":80c1011d45dc813c:Copper" TreatAsButton="true" ActionData="coin 0" TextAlignment="right">99</Text>
			<Text onhoverin="
			HavP = Parent.Plat.LocalText > 0 
			HavG = Parent.Gold.LocalText > 0
			HavS = Parent.Silv.LocalText > 0 
			HavC = Parent.Copp.LocalText > 0
			n = ''
			P = Parent.Plat.LocalText ## ('p ') ## Parent.Gold.LocalText ## ('g ') ## Parent.Silv.LocalText ## ('s ') ## Parent.Copp.LocalText ## ('c ')
			G = Parent.Gold.LocalText ## ('g ') ## Parent.Silv.LocalText ## ('s ') ## Parent.Copp.LocalText ## ('c ')
			S = Parent.Silv.LocalText ## ('s ') ## Parent.Copp.LocalText ## ('c ')
			C = Parent.Copp.LocalText ## ('c ')
			Text = (HavP ? P : HavG ? G : HavS ? S : HavC ? C )" 
			Margin="0,0,5,0" Name="Cash" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="1,2" ScrollExtent="93,21" Size="93,21"/>
        </Page>
Now, this is a change i made to DrumsUI mainhud_startbutton. So two things:
1. I cannot get it to display unless in use OnHoverIn - OnShow does not work, and i don't know how to make it work.

2. While the code is functional, it has a wierd effect, partly because of #1. When i hoverin, it displays fine. If i hoverout and back in again, it tries to talk, meaning, to the chat frame. I end up with messages:

You are not in a group
You say, "41s 42c"
Unable to leave '42c': You are not in a channel.

I have no idea why it's trying to talk, but as i said, that's a side-effect (maybe) of having to hoverin, which i don't want to do anyway.

So, the question is, what causes a script to execute? What do i need to change, specifically, in this to make it happen?

Regards.
Reply With Quote
  #2  
Unread 01-02-2011, 12:47 AM
DaemonSambe DaemonSambe is offline
A Brown Bear
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 11
Default Fixed a thing

Replying to my own thread, as much as i talk to myself when writing code...

I fixed the problem i was having, only because i happened to stumble unto another OnEvent, OnTextChanged. Was able to use that to rewrite the block to showup and not try to talk to chat.

Code:
		removed
For anyone who might be interested.

My next step would be to find a way to colorize each element of that text, before putting it together. Anyone have any ideas?

.Regards

---

Meh. Stupid thing wasn't updating properly, so had to go back to the beginning and did this instead.

Code:
<Page Location="2616,-2" MaximumSize="132,20" MinimumSize="132,20" Name="Coin" ScrollExtent="110,20" Size="117,20" c="0" plat.text="0">

			<Text Margin="0,0,5,0" Name="Cash" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="1,2" ScrollExtent="93,21" Size="93,21" />
              
            <Text Visible="False" actiontype="Coin" cointype="0" Dragable="true" DragAccepts="icon" DragType="coin" DynamicData="/GameData.Coins.Coin_0" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="87,2" Margin="0,0,5,0" Name="Copp" ScrollExtent="23,16" Size="23,16" TextAlignmentVertical="Center" TextColor="#EA9129" Tooltip=":80c1011d45dc813c:Copper" TreatAsButton="true" ActionData="coin 0" TextAlignment="right" ontextchanged="
			havp = Parent.Plat.text > 0 
			havg = Parent.Gold.text > 0
			havs = Parent.Silv.text > 0 
			havc = Parent.Copp.text > 0
			
			putp = Parent.Plat.text ## ('p ') ## Parent.Gold.text ## ('g ') ## Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			putg = Parent.Gold.text ## ('g ') ## Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			puts = Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			putc = Parent.Copp.text ## ('c ')
			
			cres = (havc ? putc : ' poor ' )
			sres = (havs ? puts : cres)
			gres = (havg ? putg : sres)
			pres = (havp ? putp : gres)
			
			parent.cash.Text = pres
			"/>
			
			<Text Visible="False" actiontype="Coin" cointype="1" Dragable="true" DragAccepts="icon" DragType="coin" DynamicData="/GameData.Coins.Coin_1" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="64,2" Margin="0,0,5,0" Name="Silv" ScrollExtent="23,16" Size="23,16" TextAlignmentVertical="Center" TextColor="#A0A0A0" Tooltip=":80c1011dd708e292:Silver" TreatAsButton="true" ActionData="coin 1" TextAlignment="right" ontextchanged="
			havp = Parent.Plat.text > 0 
			havg = Parent.Gold.text > 0
			havs = Parent.Silv.text > 0 
			havc = Parent.Copp.text > 0
			
			putp = Parent.Plat.text ## ('p ') ## Parent.Gold.text ## ('g ') ## Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			putg = Parent.Gold.text ## ('g ') ## Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			puts = Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			putc = Parent.Copp.text ## ('c ')
			
			cres = (havc ? putc : '' )
			sres = (havs ? puts : cres)
			gres = (havg ? putg : sres)
			pres = (havp ? putp : gres)
			
			parent.cash.Text = pres
			"/>
			
			<Text Visible="False" actiontype="Coin" cointype="2" Dragable="true" DragAccepts="icon" DragType="coin" DynamicData="/GameData.Coins.Coin_2" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="41,2" Margin="0,0,5,0" Name="Gold" ScrollExtent="23,16" Size="23,16" TextAlignmentVertical="Center" TextColor="#FFEE70" Tooltip=":80c1011d18644d90:Gold" TreatAsButton="true" ActionData="coin 2" TextAlignment="right" ontextchanged="
			havp = Parent.Plat.text > 0 
			havg = Parent.Gold.text > 0
			havs = Parent.Silv.text > 0 
			havc = Parent.Copp.text > 0
			
			putp = Parent.Plat.text ## ('p ') ## Parent.Gold.text ## ('g ') ## Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			putg = Parent.Gold.text ## ('g ') ## Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			puts = Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			putc = Parent.Copp.text ## ('c ')
			
			cres = (havc ? putc : '' )
			sres = (havs ? puts : cres)
			gres = (havg ? putg : sres)
			pres = (havp ? putp : gres)
			
			parent.cash.Text = pres
			"/>
			
			<Text Visible="False" actiontype="Coin" cointype="3" Dragable="true" DragAccepts="icon" DragType="coin" DynamicData="/GameData.Coins.Coin_3" Font="/TextStyles.Large.LargeStyle" ShadowStyle="/ShadowStyles.BlackOutlineNoShadow.Outline1" Location="1,2" Margin="0,0,5,0" MaxLines="1" Name="Plat" ScrollExtent="40,16" Size="40,16" TextAlignmentVertical="Center" Tooltip=":80c1011d293ba1c4:Platinum" TreatAsButton="true" ActionData="coin 3" TextAlignment="right" ontextchanged="
			havp = Parent.Plat.text > 0 
			havg = Parent.Gold.text > 0
			havs = Parent.Silv.text > 0 
			havc = Parent.Copp.text > 0
			
			putp = Parent.Plat.text ## ('p ') ## Parent.Gold.text ## ('g ') ## Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			putg = Parent.Gold.text ## ('g ') ## Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			puts = Parent.Silv.text ## ('s ') ## Parent.Copp.text ## ('c ')
			putc = Parent.Copp.text ## ('c ')
			
			cres = (havc ? putc : '' )
			sres = (havs ? puts : cres)
			gres = (havg ? putg : sres)
			pres = (havp ? putp : gres)
			
			parent.cash.Text = pres
			"/>
       
		</Page>
Probably the most cumbersome thing i've ever written. Yah EQ scripting !!!!!! Still no colorizing, which i really wanted.

Anyway, the objective of this post was to find a way to do this, and basically to get a list of OnEvents that i could use to execute the scripts. I'm still seeking that list, if anyone has anything.

.Regards

Last edited by DaemonSambe : 01-02-2011 at 02:42 AM.
Reply With Quote
  #3  
Unread 01-02-2011, 07:46 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Don't use short variables in the code, because they will trigger in-game commands.
'S' will trigger the /say command for example.

What is it you're trying to do exactly, I'm not sure if you exactly described your goal. Sorry if I missed it I'm not feeling well.

Maybe post a screenshot of it in display?
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:33 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI