StealthBot.net: GetDota - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

GetDota check for map updates

#1 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 29, 2009 - 03:24 AM

Name: Getdota
Author: AwaKening
Version: 1.0.6


Description: Checks www.getdota.com for map updates and downloads if a newer map is found

Commands:
getdota
Use this command to force check and update

Settings:
(found in scripts.ini)

checkTime
How often in minutes to auto-check and download updates
Default = 30

mapLocation
Local folder to store your downloaded maps
Default = C:Program FilesWarcraft IIIMapsDownload

ghostName
If you use a ghost, then it will tell it to load the new map; otherwise leave it blank
Default = null

ghostTrig
Your ghost's trigger
Default = !

Additional Notes:
The downloads are from reliable mirrors, but could potentially go down at any time.
The default downloads are in English. You'll have to change the mirrors if you need something else.


ChangeLogs:
' 1.0.6 updated 12/26/2010
'     - Changed download method to use xmlhttp so the bot won't hang
' 1.0.5 updated 12/24/2010
'     - Fixed the ghost auto map config function
'     - Changed console output to public output when an update is found via timer
' 1.0.4 updated 07/28/2010
'     - Added a check for map size after downloading
'     - Removed an unused function
'     - Changed the command feedback
'     - New setting to load new map in ghost
'     - Updated mirrors
' 1.0.3 updated 01/27/2009
'     - Forced script to check next site if it times out
' 1.0.2 updated 11/1/2009
'     - Added auto update for dota.cfg in conjunction with ghost++
' 1.0.1 updated 10/29/2009
'     - Added additional mirrors
'     - Added check if file was downloaded before attempting to move it

Attached File(s)



#2 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted October 29, 2009 - 03:36 AM

<_< ...Well, since you decided to remake the one I originally made on the old forums and didn't wait until I posted mine that's all fixing up for 2.7, do you want a list of all the mirrors they're using? I've got about 15 or so that they're using...

W/e, I'm nice, here they are anyway. These are all the ones that are guaranteed to work.

http://dota.megajesu...20v6.64.w3x.zip
http://www.clanwoof....20v6.64.w3x.zip
http://getdota.zinkh...20v6.64.w3x.zip
http://www.netolic.c...20v6.64.w3x.zip
http://ngepress.com/...20v6.64.w3x.zip
http://www.insync.za...20v6.64.w3x.zip
http://jbothosting.c...20v6.64.w3x.zip
http://81.223.126.91...20v6.64.w3x.zip
http://www.dotahq.co...20v6.64.w3x.zip
http://64.20.55.210/...20v6.64.w3x.zip

You should make a check to be sure the file was downloaded and moved to the proper folder, if not, go back and choose a different mirror. Also, it would also be a good idea to make a timeout so if a mirror is taking too long, cancel the download and choose a different mirror, as well as checking to see if the file size is over 5mb because I've noticed that certain mirrors will give the wrong file that's named the same, but the wrong size.

#3 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 29, 2009 - 03:57 AM

Well, for the most part, I just wanted something for myself and threw this together in about 30 minutes. I'll add the additional checks later tonight or tomorrw, thanks.

#4 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted October 29, 2009 - 06:48 AM

Updated to 1.0.1, thanks for the suggestions and site list ;)

#5 User is offline   DemonHunter Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 176
  • Joined: September-12 09

Posted October 29, 2009 - 07:40 AM

Wow that's quite amazing. Didn't thought that'd be possible. but anyways thanks to both ninja and awakening

#6 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted July 29, 2010 - 07:17 AM

Long overdue update (1.0.4)

#7 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted July 29, 2010 - 12:21 PM

More mirrors:

dota.skodaautoclub.cz/eng/DotA%20Allstars%20v6.68b.w3x
http://81.223.126.91...rs%20v6.68b.w3x
dota.megajesus.com/eng/DotA%20Allstars%20v6.68b.w3x
0v1.org/eng/DotA%20Allstars%20v6.68b.w3x

I'm not sure if some mirrors expire when a new map comes out...

#8 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted July 29, 2010 - 04:09 PM

Already got those ones ;)

#9 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted December 26, 2010 - 05:24 PM

Update 1.0.5 to fix an issue with ghost tie-in and change output to public

#10 User is offline   oblivious Icon

  • Full Member
  • PipPipPip
  • Group: Senior Members
  • Posts: 315
  • Joined: October-25 09

Posted December 26, 2010 - 05:45 PM

Something you might be interested in is this:

Function GetPathFromRegistry()
    Dim oShell, regInstallPath, oFSO
    Set oShell = CreateObject("WScript.Shell")
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    
        regInstallPath = oShell.RegRead ("HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\InstallPath")
    
        If (oFSO.FolderExists(regInstallPath)) Then
            If (oFSO.FileExists(regInstallPath & "war3.exe")) Then
                WriteSettingsEntry "mapLocation", regInstallPath
                GetPathFromRegistry =  regInstallPath
                
                AddChat vbGreen, "[WC3] Reading the registry was a success, the Warcraft III path was determined."
            Else
                AddChat vbRed, "[WC3] The InstallPath is incorrect. You should fix your registry entries."
            End If
        Else
            AddChat vbRed, "[WC3] The InstallPath is invalid or the registry entry does not exist. You should fix your registry entries."
        End If
        
    Set oShell = Nothing
    Set oFSO = Nothing
    
End Function



It gets the warcraft III path from the registry (which should be there if wc3 is legitimately installed or at least recently updated).

#11 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted December 26, 2010 - 06:08 PM

This could be useful, but I'd like to still leave it as a setting, and here's why.

Some people (me included) don't have warcraft installed on the pc their bots and ghost are on. My maps are saved to a folder within the ghost folder. I'm sure myself and the others are the exception whereas most people will just be saving it to their wc3 folder, but I try and accomodate everyone if I can.

#12 User is offline   oblivious Icon

  • Full Member
  • PipPipPip
  • Group: Senior Members
  • Posts: 315
  • Joined: October-25 09

Posted December 26, 2010 - 06:27 PM

I apologise if I'm sounding arrogant, but something else you might want to take a look at is using the MSXML2.XMLHTTP.6.0 object and download the file asynchronously, and writing .resposeBody to file using ADODB.Stream in binary mode.

If you do it asynchronously, the bot won't hang while downloading.

I can help you with this if you would like to do this.

#13 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted December 26, 2010 - 07:03 PM

Considering how big the dota file is, probably a good idea. Originally I just made this script for me and I didn't care that it would hault the bot since it only happens "maybe" once a month. I know how to use it, it's in some of my other scripts. I'll change it Posted Image



Edit: It was a pain in the ass, cause I had to change quite a bit of code for it to work right, but it's done now

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users