drewlt
May 3 2006, 01:33 PM
Well I've had fun with this. It does everything I needed and more from requests on these boards.
I'd be happy to answer questions about the code. Parts have been edited to (hopefully) remove personally identifiable information.
Parts of this may not work as I started to make changes for multiple applications. The changes I made should work just fine, but are not tested.
I have always believed in open-source code as it gives living examples of how to do things. Cheers to all the open-source developers.
Enjoy.

-DT
drewlt
May 3 2006, 01:40 PM
reserved
leggmann
May 4 2006, 03:12 PM
Thanks Drew now off to learn vb so I can program this to calculate vana time and allow actools to read it.
Thanks again for all of your work on this.
Edit:
Quick question what version and everything was this written in I have vb studio 6, but for some reason I thought you wrote this in VB.net.
If in doubt look in the .SLN solution file:
| QUOTE |
Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 |
So - it's VB.Net, using the 2.0 Framework and VS.Net 2005.
leggmann
May 4 2006, 03:34 PM
Thanks Ipa Sorry for the noob question.
drewlt
May 4 2006, 03:43 PM
I fear for the code...

-DT
leggmann
May 4 2006, 10:11 PM
Actually I stole most of the calculation code fair and square. And am struggling like hell to convert javascript into vb code.

Anywho as you may have noticed I asked what the % means inside compute and bubba replied that it's a modulus function. I assume that I can do the same thing in VB with remainder

. Ah well this should be a fun way to use the 10 hours I work tomorrow. Hopefully I will have all the code in place to release it tomorrow. Again thanks for your help and code.
DaMOB
May 4 2006, 10:48 PM
| QUOTE (leggmann @ May 4 2006, 08:11 PM) |
Actually I stole most of the calculation code fair and square. And am struggling like hell to convert javascript into vb code. Anywho as you may have noticed I asked what the % means inside compute and bubba replied that it's a modulus function. I assume that I can do the same thing in VB with remainder . Ah well this should be a fun way to use the 10 hours I work tomorrow. Hopefully I will have all the code in place to release it tomorrow. Again thanks for your help and code. |
% in VB is MOD
leggmann
May 5 2006, 12:24 PM
Well I give up, someone more familiar with VB is welcome to take over trying to get these calculations to come out properly. PM me for the changed source code.
DaMOB
May 6 2006, 05:48 AM
| QUOTE (leggmann @ May 5 2006, 10:24 AM) |
| Well I give up, someone more familiar with VB is welcome to take over trying to get these calculations to come out properly. PM me for the changed source code. |
I don't do VB so I can't help you.
Pyrolol
Jun 23 2006, 01:36 PM
This is the description of the modified DTACT I've made to handle the problem described above:
I've done this by adding a new variable to the structure SCommand, "Input", it's either 0 or 1.
| CODE |
Structure SCommand Dim Name As String Dim Offset As Integer Dim Input As Integer End Structure
|
Then I added the following to the function "GetFunctions"
| CODE |
Do WriteLog("Reading xml command line", 2) xmlr.Read() If xmlr.NodeType = Xml.XmlNodeType.EndElement Then If xmlr.Name = "function" Then ' End of Function Exit Do End If End If If xmlr.NodeType = Xml.XmlNodeType.Element Then If xmlr.Name = "command" Then ' New Command Found j = UBound(Functions(i).Commands) + 1 ReDim Preserve Functions(i).Commands(j) Functions(i).Commands(j).Name = xmlr.GetAttribute("name") ' WriteLog(Functions(i).Commands(j).Name) End If ' Modified by Pyrolol. If xmlr.GetAttribute("offset").Substring(0, 5).ToLower = "input" Then Functions(i).Commands(j).Input = 1 ' Original DrewLT code. If xmlr.GetAttribute("offset").Substring(0, 1) = "-" Then Functions(i).Commands(j).Offset = -(CInt("&H" & xmlr.GetAttribute("offset").Substring(3))) Else Functions(i).Commands(j).Offset = "&H" & xmlr.GetAttribute("offset").Substring(2) End If ' Pyrolol again. Else Functions(i).Commands(j).Input = 0 ' Original DrewLT code. If xmlr.GetAttribute("offset").Substring(0, 1) = "-" Then Functions(i).Commands(j).Offset = -(CInt("&H" & xmlr.GetAttribute("offset").Substring(3))) Else Functions(i).Commands(j).Offset = "&H" & xmlr.GetAttribute("offset").Substring(2) End If End If End If End If Loop
|
And to function "ProcessCommand", I've added: (near the end of the function.
| CODE |
For j = 0 To UBound(Functions(i).Commands) ' by Pyrolol If Functions(i).Commands(j).Input = 1 Then Functions(i).Commands(j).Offset = Functions(i).Commands(j).Offset + CInt(SubCommand) WriteLog("Sub-Command offset change accepted.", 2) End If ' by DrewLT again. If Functions(i).Commands(j).Name.ToLower = "iteminit" Then address = App.ItemInit(Functions(i).Commands(j).Offset) ElseIf Functions(i).Commands(j).Name.ToLower = "getpointer" Then .......etc
|
Please tell me if this is 'ok', and say if I'm allowed to distribute it.
If you like leggmann I can start on the vanatime calculations. I used to be a bit of a dab hand in QBasic, so when I first looked at this I was like "yay! I can read this xD"
leggmann
Jun 24 2006, 03:16 PM
I have the calculations already done for the vanatime and it has been working for quite some time. The only ptoblem that I have with that version is a memory leak, which I have been trying to debug off and on. I'm not 100% sure that what you are trying to do will work, the code I gave you works extremely well if a bit cumbersome.
Pyrolol
Jun 25 2006, 01:27 PM
There's a little bug in the last section of code I posted above that I've fixed btw.
The thing is....I can easily do what I need to purely within AC Tools - it's just that requires the ffxi window active. What I'm aiming for here is a neat solution xD.
Also bear in mind that I may need to change the offsets very frequently. Reloading the .dat will limit the usefulness of it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.