Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '
- ' Automatic version checker for Realm of the Mad God / Flash projector
- ' by goldaryn
- '
- '
- ' This VBscript checks the ROTMG website to see what is the latest
- ' build of ROTMG, and runs Flash projector with the correct URL.
- ' It automates this process: https://forums.wildshadow.com/node/196842#comment-1047626
- ' Save this code as a .vbs file in the same directory as your flash projector.
- '
- ' The filename of the Flash projector file. Edit if necessary.
- projector = "flashplayer_12_sa.exe"
- ' Where to find the current version of ROTMG.
- rotmg_version_url = "http://www.realmofthemadgod.com/version.txt"
- ' This code loads the URL above and puts the content into the variable xmlhttp.responseText
- Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
- xmlhttp.open "GET", rotmg_version_url, 0
- xmlhttp.send ""
- ' This code creates the correct URL to launch using Flash projector
- rotmg_latest_swf = "http://www.realmofthemadgod.com/AGCLoader" & xmlhttp.responseText & ".swf"
- ' This is a popup giving the user some information before launching. vbCr & vbLf stuff adds line breaks
- wscript.Echo "Current version is " & xmlhttp.responseText & "." & vbCr & vbLf & vbCr & vbLf & "Launching " & projector & " with argument " & rotmg_latest_swf
- ' Launch Flash projector!
- Set objShell = WScript.CreateObject("WScript.Shell")
- objShell.Run (projector & " " & rotmg_latest_swf)
- ' Clean up
- Set xmlhttp = Nothing
Advertisement
Add Comment
Please, Sign In to add comment