View Single Post
  #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