• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to autodownloading new version client?

Burn

New Member
Joined
Dec 23, 2009
Messages
26
Reaction score
1
Hey!
I have one quest.. My ots have own client.. I can do autodownloading new version .. like global tibia ?
2yv5udl.jpg
 
if you're a hardcore programmer and know how the tibia client works and how to edit with Hex.

Else, no.. there's no easy way to accomplish this.
 
Just make a launcher, let it read ini's and internal version and if the ini it reads from random website is a value higher than the internal, it downloads the new version.
Hard to explain, this is the AutoIT code I use, it's modified.
It was old when I found it, Zisly helped me fix it.
Just learn AutoIT or follow this concept whilst doing your own.

Code:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#AutoIt3Wrapper_Res_Fileversion = 1.3
$currentver=1.4
    inetget("http://www.antibiafk.freehostingcloud.com/version.ini",@tempdir&"\version.ini",1)
    $onlinever=IniRead(@tempdir&"\version.ini","Version","Ver","unknown")
    if $onlinever>$currentver then
       local $dlsize = InetGetSize("http://antibiafk.freehostingcloud.com/AnTibiAFK.exe")
        $getnew=msgbox(4,"Update Available","Version "&$onlinever&" is available online, you currently have version "&$currentver&"." &@CRLF& "Would you like to download the latest version now?"&@crlf&"(the download is "&round(($dlsize/1000000),2)&"MB)")
        if $getnew = 6 Then
            $wheretosave = FileSelectFolder("Please choose a folder to save the installer","",1)
            $status = GUICreate("Download Progress",250,60)
            $progress = GUICtrlCreateProgress(5,5,240,20)
			GUICtrlSetLimit(-1, 100,0)
            $howfar = GUICtrlCreateLabel("",5,35,50,20)
            $howbig = GUICtrlCreateLabel("",55,35,70,20)
            $howfast = GUICtrlCreateLabel("",155,35,90,20)
			$sizecheck = InetGet("http://www.antibiafk.freehostinglcoud.com/AnTibiAFK.exe")
            GUISetState(@sw_show,$status)
            Local $hDownload = InetGet("http://antibiafk.freehostingcloud.com/AnTibiAFK.exe",$wheretosave&"\AnTibiAFK.exe",1,1)
            $toshow=TimerInit()
            Global $sofar
			$size = InetGetSize("http://antibiafk.freehostingcloud.com/AnTibiAFK.exe")
			Do
				$currentDownload = InetGetInfo($hdownload, 0)
				$procent = ($currentDownload/$size)*100
				GUICtrlSetData($progress, $procent)
				GUICtrlSetData($howbig, Round(($size/1024/1024),2)&"MB")
				GUICtrlSetData($howfar, round(($currentDownload/1024/1024),2)&"MB")
			until InetGetInfo ($hDownload, 2)
            GUIDelete($status)
            msgbox(0,"Done","Finished downloading the new version.  This updater will now exit, please run """&$wheretosave&"\AnTibiAFK.exe"" to start the newest version of AnTibiAFK.")
            Exit
        EndIf
	ElseIf $onlinever=$currentver Then
		MsgBox (64, "Updater", "You are already using the latest version")
	EndIf
I fail at tabbing...
 
Last edited:
Back
Top