일상/잡담2011. 9. 2. 15:52

메이플 로그인 인증 및 대표캐릭터 정보(닉네임, 레벨, 랭킹) 알아오는 함수

Private Function MapleLogin(ID As String, PW As String)
WebBrowser1.Navigate "https://auth.maplestory.nexon.com/Login.aspx?redirectUrl=http%3A//maplestory.nexon.com/MapleStory/Page/Gnx.aspx%3FURL%3Dhome/index&chkEmail=true&strEmail=" & ID & "&strPassword=" & PW
Do While Not WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
WebBrowser1.Navigate "http://maplestory.nexon.com/MapleStory/Page/Gnx.aspx?URL=home/index"
Do While Not WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
If InStr(WebBrowser1.Document.documentelement.outerHTML, "내캐시") Then
temp = WebBrowser1.Document.documentelement.outerHTML
WebBrowser1.Navigate ("about:blank();")
src = Split(temp, "<P class=loginName><IMG class=imgMiddle2")(1)
Nick = Split(Split(src, "<STRONG>")(1), "</STRONG></P>")(0)
ranking = Split(Split(src, "<P>")(2), "</P>")(0)
lvl = Replace(Split(Split(src, "<P>")(4), "</P>")(0), "Lv. ", "", 1, -1)
MsgBox "로그인 성공" & vbCrLf & vbCrLf & "닉네임 : " & Nick & vbCrLf & vbCrLf & "랭킹 : " & ranking & vbCrLf & vbCrLf & "레벨 : " & lvl, vbInformation, "성공"
End If
End Function

사용법 Call MapleLogin(ID,PW)

레지스트리에서 게임설치경로 읽어와 게임 실행시키는법

Private Function GameLaunchingWithoutLauncher()
On Error Goto errtrap:
Set ws = CreateObject("wscript.shell")
Path = ws.regread(
"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Wizet\MapleStory\ExecPath")
Shell Path &
"\MapleStory.exe GameLaunching", vbNormalFocusd
Exit Sub
errtrap:
Set ws = CreateObject("wscript.shell")
Path = ws.regread(
"HKEY_LOCAL_MACHINE\SOFTWARE\Wizet\MapleStory\ExecPath")
Shell Path &
"\MapleStory.exe GameLaunching", vbNormalFocus
End Function


사용법 : Call GameLaunchingWithoutLauncher

레지스트리 이용해 최근 접속한 아이디(이메일) 및 서버 얻어오는 함수


Private Function GetInfoFromReg()
On Error Goto errtrap:
Set ws = CreateObject("wscript.shell")
Server = ws.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Wizet\MapleStory\LMA")
Email = ws.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Wizet\MapleStory\LCWN")
MsgBox "[ " & Server & " ] 서버의 [ " & Email & " ]님 프로그램 실행을 환영합니다!", vbInformation, "Welcome"
Exit Sub
errtrap:
Set ws = CreateObject("wscript.shell")
Server = ws.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Wizet\MapleStory\LMA")
Email = ws.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Wizet\MapleStory\LCWN")
MsgBox "[ " & Server & " ] 서버의 [ " & Email & " ]님 프로그램 실행을 환영합니다!", vbInformation, "Welcome"
End Function

사용법 : Call GetInfoFromReg

Posted by kimhonor

댓글을 달아 주세요