Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Runescape Auto Log-in/Launcher *Fixed*


  • Please log in to reply
5 replies to this topic
ratchetclan4
  • Members
  • 18 posts
  • Last active: May 02 2010 10:00 PM
  • Joined: 14 Apr 2010
Heres a runescape log-in script


----instructions-----
1: copy source code into notepad
2: save as FILENAME.ahk
3: Compile the script with the ahk compiler found in
( ?:/program files/autohotkey/compiler/compiler.exe )

4: run the exe!

Or just run the AHK File

Source Code
---------------------
Thanks to Leef_me, for helping me with the troubling iniwrite and read!
( i replaced your return's with goto's and that has fixed the error )




IniRead,userlogin,runescapelogin.ini, section2, userlogin
If (userlogin = "") or (userlogin = "ERROR")
         goto,beggining

IniRead,class,runescapelogin.ini, section2, class
If (class = "") or (class = "ERROR") 
      goto,beggining


IniRead,password,runescapelogin.ini, section2, password
If (password = "") or (password = "ERROR") 
             goto,beggining


else goto,begin

beggining:
msgbox, ERROR:No User Data Found?
msgbox, ERROR:No Password Data Found?
msgbox, ERROR:No Subscription Type Found?
msgbox, Welcome if you saw three errors that means that your .ini file is missing or you have not made one yet this wizard will guide you through recreating it

InputBox, userlogin, Enter Username, (This is the first time you have ran runescape login please enter in your username), 
if ErrorLevel
   Return



InputBox, password, Password, Please enter your password (this is safe and you will not be asked for your username and password again unless the .ini file missing from the script directory)., , 
if ErrorLevel
   Return

InputBox,class, Please answer Member or Free depending on which you would like to use
if ErrorLevel
    Return

else

   
IniWrite, %class% ,runescapelogin.ini, section2, class
   
IniWrite, %userlogin% ,runescapelogin.ini, section2, userlogin

IniWrite, %password% ,runescapelogin.ini, section2, password


IniRead,userlogin,runescapelogin.ini, section2, userlogin
If (userlogin = "") or (userlogin = "ERROR")

IniRead,password,runescapelogin.ini, section2, password
If (password = "") or (password = "ERROR")   

IniRead,class,runescapelogin.ini, section2, class
If (class = "") or (class = "ERROR")   

goto, blank
      

else

goto, begin


begin:
run, http://www.runescape.com/game.ws?j=1
sleep 1000
winactivate, RuneScape - The Number 1 Free Multiplayer Game
WinMaximize, RuneScape - The Number 1 Free Multiplayer Game

SetTimer, WinMoveMsgBox, 1
MsgBox, 4132, Loading, Click Yes Once You See Select a game and do not touch your mouse until you are logged on
ifmsgbox no
return
else
sleep 3000
goto, load

WinMoveMsgBox:
SetTimer, WinMoveMsgBox, OFF
ID:=WinExist("Decrease Latency")
WinMove, ahk_id %ID%, , 50, 50 
Return

load:

setkeydelay, 50
If (class = "free")
MouseClick , left ,639 , 631 , , 20, 

else

MouseClick , left ,821 , 633 , , 20, 
goto, logon



logon:

setkeydelay, 105
sleep 500
sendinput %userlogin% {enter}
sleep 2000
sendinput %password%
sleep 500

MouseClick , left ,635 , 552 , , 20, 

return



blank:
msgbox, SOME BOXES WHERE LEFT EMPTY! 
return











---------Ryan--Conway----------
_

ratchetclan4
  • Members
  • 18 posts
  • Last active: May 02 2010 10:00 PM
  • Joined: 14 Apr 2010
I have fixed the mouse coords so it works with the new runescape layout
stupid demo button 0_o also you have to make sure you dont have any other windows open Titled Runescape - The Number 1 Free Multiplayer Game

i could not figure out how to ahk_class a browser game as browsers vary
unlike GxWindowClassD3d games

ahknoob
  • Members
  • 11 posts
  • Last active: Oct 09 2010 08:47 PM
  • Joined: 13 Mar 2007
I think i'll try this

ahknoob
  • Members
  • 11 posts
  • Last active: Oct 09 2010 08:47 PM
  • Joined: 13 Mar 2007
I've always been fascinated with AHK Runescape scripts.


I don't know Java. So I write all of mine in AHK.

ahknoob
  • Members
  • 11 posts
  • Last active: Oct 09 2010 08:47 PM
  • Joined: 13 Mar 2007
And looking at your code

If (userlogin = "") or (userlogin = "ERROR")


that has been my problem for awhile.
Not knowing that IniRead wasn't working right, and it was returning back as blank or ERROR.

Nice

ahknoob
  • Members
  • 11 posts
  • Last active: Oct 09 2010 08:47 PM
  • Joined: 13 Mar 2007
Tried your script, Right off the bat it should be able to tell if it's your first time running the script. Not ERROR ERROR ERROR. Use a Msgbox, it's your first time running the script. Set your username PW.

Other than the three error boxes, it launched Google Chrome and a server. But this is where it didn't work correctly. It clicked on create account.
It did pick the Member Server side. And one of your Msgbox's prompted that question. So good work there. Overall, it didn't work for me.

I make scripts that only work on my computer, or personal usage..

Either way i'm impressed, keep it up:)