EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Unread 12-07-2006, 07:56 PM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

Ok played with this for a bit. There are a couple problems.

1) There is deffinetly a timming issue. With my other tweaks, I can see the results differ if each command is executed manually vs auto.

2) Although EQ2 script is prety good about processing unquoted strings, sometimes it has problems. Best to quote any comma separated values.

3) Not possitive, but it seamed in my tests that it was confused by the "Container" label, so I changed it.

In this sample code, I've split each command out to a separate button and dasy-chained them with scripted button presses. The problem occurs with the 4th button press. If its executed via script, the Inner size gets called before its been resized. If you press the button manually, it works as intended due to the delay between pressing the 1st and 4th buttons.
Code:
<Page Name="Test" ScrollExtent="320,240" Size="320,240">
<Page BackgroundColor="#0F00F0" BackgroundOpacity="1.000" Name="Dummy" ScrollExtent="100,40" Size="100,40">
<Page BackgroundColor="#00FF00" BackgroundOpacity="1.000" Name="Inner" PackLocation="left" PackLocationProp="0000/0001,xxxx/xxxx" PackSize="proportional" PackSizeProp="0100/0100,xxxx/xxxx" ScrollExtent="100,40" Size="100,40"/>
</Page>
<Page BackgroundColor="#0F00F0" BackgroundOpacity="1.000" Location="0,45" Name="Cont" ScrollExtent="100,40" Size="100,40">
<Page BackgroundColor="#00FF00" BackgroundOpacity="1.000" Name="Bar" PackLocation="left" PackLocationProp="0000/0001,xxxx/xxxx" PackSize="proportional" PackSizeProp="0100/0100,xxxx/xxxx" ScrollExtent="100,40" Size="100,40"/>
</Page>
<Text Font="normal" LocalText="35" Location="4,91" Name="Level" ScrollExtent="50,20" Size="50,20">35</Text>
<Text Font="normal" LocalText="2700" Location="4,114" Name="Cold" ScrollExtent="50,20" Size="50,20">2700</Text>
<TextStyle Algorithm="simple" FontName="Arial" Language="english" Name="normal" PointSize="20" UseCachedFont="true"/>
<Button BackgroundColor="#0FFFF0" Location="0,134" Name="Button1" OnPress="parent.Dummy.Size='70,40'
parent.Button2.Press='true'" ScrollExtent="50,32" Size="50,32"></Button>
<Button BackgroundColor="#0FFFF0" Location="54,134" Name="Button2" OnPress="parent.Dummy.Inner.Size=parent.Level.Text ## ',' ## '40'
parent.Button3.Press='true'" ScrollExtent="50,32" Size="50,32"></Button>
<Button BackgroundColor="#0FFFF0" Location="108,134" Name="Button3" OnPress="parent.Dummy.Size='10500,40'
" ScrollExtent="50,32" Size="50,32"></Button>
<Button BackgroundColor="#0FFFF0" Location="162,134" Name="Button4" OnPress="parent.Cont.Size=parent.Dummy.Inner.Size
parent.Button5.Press='true'" ScrollExtent="50,32" Size="50,32"></Button>
<Button BackgroundColor="#0FFFF0" Location="216,134" Name="Button5" OnPress="parent.Cont.Bar.Size=parent.Cold.Text ## ',' ## '40'
parent.Button6.Press='true'" ScrollExtent="50,32" Size="50,32"></Button>
<Button BackgroundColor="#0FFFF0" Location="270,134" Name="Button6" OnPress="parent.Cont.Size=100,40" ScrollExtent="50,32" Size="50,32"></Button>
</Page>
Note: You'd probably have better results just using math to calcualate the values. Math will produce decimals, but they get truncated when passed as a size value. Try this formula
Code:
resist/((level * 105)/70)
or
resist/(level * 1.5)
Reply With Quote
 



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 08:27 PM.


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