Jump to content

FTP Patcher and options config


Recommended Posts

Hello, I am new to AutoIT so I apologize if I do not completely understand.

I was wondering if it was at all possible to create 2 kinds of programs with AutoIT but merged into one. I am in need of a patcher for mine and my friend's game but cannot find any helpful C++ coders around. I would like to try and code a Gui that will connect to my FTP server, read a text file, compare files and download the file if it is newer than the other. Is this possible? and how hard would it be for a newbie like me :).

I also need a program that will let me write specific information to a text file. Here is the file...

CODE

//user config

u_resolution 2

u_texture 0

u_shadow 0

u_vision 0

u_fog 0

I would like a drop down box to set each of these to specific values...

Resolution: 0: 800x600, 1: 1024x768, 2: 1280x1024, 3: 1600x1200, and so forth.

If I select 1024x768 then it will write "u_resolution 1", if 1600x1200 then "u_resolution 3", so forth.

If textures are set to low "u_texture 1", if texture are set to high "u_texture 0".

Same for the rest of the options. Is this possible? and how hard would it be?

I appreciate your time and any help ^^ thank you!

Link to comment
Share on other sites

look up INetGet () and filewrite in the help file..for the config file, you might consider using INIWrite() / Read instead though...look at the help file for more information

this is all relativly simple to do in AutoIT

use the help file and come up with some code and ill help....

Edited by LurchMan

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Link to comment
Share on other sites

I looked up in the help file and also around the internet. I made a little Gui for the configuration using Koda, though I'm not sure where to go next :) I'm not sure how I would bind the options to numbers... Perhaps there is a simple example? I couldn't find one in the help files. But I'll look around some more.

CODE
#include <GUIConstants.au3>

#Region

$Form1_1 = GUICreate("Configuration", 195, 331, 231, 222)

$Button1 = GUICtrlCreateButton("OK", 8, 280, 81, 33, 0)

$Button2 = GUICtrlCreateButton("Cancel", 104, 280, 81, 33, 0)

$Resolution_group = GUICtrlCreateGroup("Resolution", 8, 8, 177, 49)

$Resolution = GUICtrlCreateCombo("800 x 600", 16, 24, 161, 25)

GUICtrlSetData(-1, "1024 x 768|1280 x 1024|1600 x 1200|1280 x 768*|1440 x 900*") ;Menu Item Adding Resolution

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Texture_group = GUICtrlCreateGroup("Texture", 8, 72, 177, 49)

$HighQuality = GUICtrlCreateCombo("High Quality", 16, 88, 161, 25)

GUICtrlSetData(-1, "Low Quality") ;Menu Item Adding Texture

GUICtrlCreateGroup("", -99, -99, 1, 1)

$Shadow_group = GUICtrlCreateGroup("Shadow Rendering", 8, 136, 177, 49)

$Enabled = GUICtrlCreateCombo("Enabled", 16, 152, 161, 25)

GUICtrlSetData(-1, "Disabled") ;Menu Item Adding Shadow Rendering

GUICtrlCreateGroup("", -99, -99, 1, 1)

$View_group = GUICtrlCreateGroup("View Distance", 8, 200, 177, 49)

$High = GUICtrlCreateCombo("High", 16, 216, 161, 25)

GUICtrlSetData(-1, "Low") ;Menu Item Adding View Distance

GUICtrlCreateGroup("", -99, -99, 1, 1)

GUISetState(@SW_SHOW)

#EndRegion

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

This is the dialog... messy. It needs to write to "gth_option.cfg" as shown above. Also, what would be the safest way to go about a patcher? I was thinking maybe it will check a "version.ini" on the ftp for a date, and match with another .ini on the client side. If they mismatch then the download will process. Is there a better solution?

Thank you very much for the reply :party:

Link to comment
Share on other sites

No it is for a different MMORPG called Gate to Heavens. There was no source code for the patcher or configuration when we came in possession of the game, so I would like to try and make a nice looking one. Once I learn enough I hope to make a specific kind of patcher/launcher/configuration. Perhaps you have seen the PlayOnline Viewer? I would like to make something visually similar in the future which will let you view numerous things before launching the game. Update news, Server status, Patcher, Options configuration, Launcher, Registration and so forth. But I really am new to AutoIT :) so I don't know a great deal.

Thank you for the replies :party:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...