2015년 2월 11일 수요일

[오토핫키스크립트] 컴퓨터켜져있는지확인하는 스크립트

#Persistent
Version = 1.0
ProgramName = 감시카메라 체크 프로그램
ProgramTitle = %ProgramName% v%Version%
Menu, Tray, NoDefault
Menu, Tray, NoStandard
Menu, Tray, Add, IP변경, IP
Menu, Tray, Add, 만든사람, copy
Menu, Tray, Add, E&xit, Close
Menu, Tray, Click, 1


TrayTip, %ProgramTitle%, 하남창고의 카메라와 매장 내 카메라의`n동작여부를 체크 합니다., 5, 1
sleep, 5000

IP_File = %A_WinDir%IP.txt

CoordMode, ToolTip, Screen

IfNotExist, %IP_File%
{
TrayTip, %ProgramTitle%, 최초 실행 시 하남창고 카메라 서버의 IP를 입력해야만 합니다., 5, 1
sleep, 3000
Gosub IP
}

FileRead, IP_num, %IP_File%

loop {

IfNotExist, \Camera-server카메라 정보 ec
Msgbox, 0, 경고!!, 매장 감시카메라 서버 확인요망

UrlDownloadToFile, http://%IP_num%:1000/web.gif, %Temp%camera.tmp
If ErrorLevel 0
Gosub msg
else
hanger = 0

sleep, 300000
}
Return

msg:
If hanger = 1
{
Gosub, msg3
Return
}

Msgbox, 12336, 경고!!, 창고 감시카메라 서버에 문제가 발생 되었을 수 있습니다.

Msgbox, 12324, 경고!!, 도움말을 보시겠습니까?
IfMsgBox, Yes
Msgbox, 4160, 도움말, 감시카메라 서버의 IP가 변경 되었거나`n서버가 다운 되었을 수 있습니다.`n서버가 다운 되었을 때는 직접 가서 재부팅을 해주어 합니다.`n`n단순히 IP가 변경된 경우라면 다음에서 변경된 IP를 입력 해주시면`n본 프로그램이 정상적으로 작동하게 됩니다.

Msgbox, 12324, 창고 카메라 서버 문제해결, IP가 변경 되었습니까?
IfMsgBox, Yes
Gosub IP
IfMsgBox, No
Gosub, msg2
Return


IP:
IPstart:
InputBox, UserInput, IP입력, IP를 입력 해주세요., , 200, 120
If ErrorLevel 0
Return
If Not UserInput
{
Msgbox, 0, 알림, IP를 입력 해주세요.
Goto IPstart
}
Msgbox, 36, 확인, 변경할 IP가 %UserInput% 이(가) 맞습니까?
IfMsgBox, Yes
{
FileDelete, %IP_File%
FileAppend, %UserInput%, %IP_File%
Msgbox, 64, 안내, 앞으로 변경된 IP %UserInput% 을(를) 체크하게 됩니다.
}
IfMsgBox, No
Goto IPstart
Return

msg2:
hanger=1
Msgbox, 4160, 문제해결 방법, 창고 카메라 서버 시스템을 재부팅 하십시오.`n재부팅이 완료되기 전까지 이 안내창은 계속 나오게 됩니다.
Return

msg3:
hanger=1
TrayTip, 경고!!, 창고 카메라 서버 시스템을 재부팅 하십시오.`n재부팅이 완료되기 전까지 이 안내창은 계속 나오게 됩니다., 5, 3
Return

Close:
TrayTip, 경고!!, 본 프로그램이 종료되면`n감시카메라의 상태를`n자동으로 체크할 수 없습니다., 5, 3
sleep, 500
MsgBox, 20, 프로그램 종료, 종료 하시겠습니까?
IfMsgBox, Yes
ExitApp
Return

copy:
TrayTip, 만든사람, 바로 나!, 5, 1
Return

[오토핫키스크립트] 파일관리기 , 공부용, 해부용

#SingleInstance force  ; 같은 스크립트의 다중 프로세스로 실행의 금지/허가설정

#NoTrayIcon            ; 프로그램이 트레이로 들어가지 않도록
#NoEnv                 ; 변수명을 해석할 때, 환경 변수를 무시한다

Gui, +Resize +MinSize  ; 창크기변화 하게
Gui, Font, s10, Arial ; 폰트 지정
Gui, Add, Edit, x6 y10 w250 h22 vDirSelect, c:/
Gui, Add, Button, x+6 y10 w50 h22 gDirSelectBt, ...
Gui, Add, Button, x+13 w50 h22 gDirSelectView, View
Gui, Add, Edit, x+6 w40 h22 vFileListnum, 40
Gui, Add, Edit, x+6 w70 h22 vFileListType, *.*
Gui, Add, CheckBox, x+6 w120 h20 vSubFileall, 서브모두
Gui, Add, ListView, x0 y40 r20 w700 vDirFilelist glistClick, N|Name|Size|Modified|FullPath
Gui, Show, w700 h403,님투 파일관리기
Return

;--------------------------------------------
; 폴더 선택
;--------------------------------------------
DirSelectBt:
FileSelectFolder, dndir, , 3
if dndir =
{
  return
}
GuiControl,, DirSelect, %dndir%
Return


;--------------------------------------------
; 해당 파일이 실행될 경우
;--------------------------------------------
listClick:
   CoordMode,MOUSE,RELATIVE
   MouseGetPos,mx,my,oID,oCNN
   If(A_GuiEvent = "DoubleClick")
   {   Gosub Doubleclick
   }
Return

Doubleclick:

Return


;--------------------------------------------
; 선택된 폴더의 파일목록
;--------------------------------------------
DirSelectView:
Gui,Submit, NoHide
;--------------------------------------------
; 목록 다시 시작
;--------------------------------------------
LV_Delete()
;--------------------------------------------
; 전달 받은 폴더/파일마스크,,서브목록옵션
; Loop, 폴더     : 현재 폴더의 파일만
; Loop, 폴더,, 1 : 서브폴더의 파일전체
;--------------------------------------------
Loop, %DirSelect%\%FileListType%,, %SubFileall%
{
  ;------------------------------------------
  ; 지정한 갯수를 출력하고 빠져나온다
  ; 기본 40 개
  ;------------------------------------------
  If A_Index>%FileListnum%
      Break
  ;------------------------------------------
  ; 번호|파일명|크기|생성일|패치
  ; N|Name|Size|Modified|FullPath
  ;------------------------------------------
  LV_Add("", A_Index, A_LoopFileName, A_LoopFileSize, A_LoopFileTimeModified, A_LoopFileLongPath)
}
;--------------------------------------------
; 셀크기 자동화
LV_ModifyCol()
Return

GuiSize:
;--------------------------------------------
; 창크기에 변화가 있을 경우 같이 크기가 변할
; 오브젝트 지정
;--------------------------------------------
Anchor("DirFilelist", "wh")
Return

GuiClose:
;--------------------------------------------
; 이 항목이 없으면 X 로 종료해도 프로세스에서
; 종료되지 않는다.
;--------------------------------------------
ExitApp

;--------------------------------------------
; 크기 자동함수
;--------------------------------------------
Anchor(i, a = "", r = false) {
  static c, cs = 12, cx = 255, cl = 0, g, gs = 8, z = 0, k = 0xffff, gx = 1
  If z = 0
    VarSetCapacity(g, gs * 99, 0), VarSetCapacity(c, cs * cx, 0), z := true
  If a =
  {
    StringLeft, gn, i, 2
    If gn contains :
    {
      StringTrimRight, gn, gn, 1
      t = 2
    }
    StringTrimLeft, i, i, t ? t : 3
    If gn is not digit
      gn := gx
  }
  Else gn := A_Gui
  If i is not xdigit
  {
    GuiControlGet, t, Hwnd, %i%
    If ErrorLevel = 0
      i := t
    Else ControlGet, i, Hwnd, , %i%
  }
  gb := (gn - 1) * gs
  Loop, %cx%
    If (NumGet(c, cb := cs * (A_Index - 1)) == i) {
      If a =
      {
        cf = 1
        Break
      }
      Else gx := A_Gui
      d := NumGet(g, gb), gw := A_GuiWidth - (d >> 16 & k), gh := A_GuiHeight - (d & k), as := 1
        , dx := NumGet(c, cb + 4, "Short"), dy := NumGet(c, cb + 6, "Short")
        , dw := NumGet(c, cb + 8, "Short"), dh := NumGet(c, cb + 10, "Short")
      Loop, Parse, a, xywh
        If A_Index > 1
          av := SubStr(a, as, 1), as += 1 + StrLen(A_LoopField)
            , d%av% += (InStr("yh", av) ? gh : gw) * (A_LoopField + 0 ? A_LoopField : 1)
      DllCall("SetWindowPos", "UInt", i, "Int", 0, "Int", dx, "Int", dy, "Int", dw, "Int", dh, "Int", 4)
      If r != 0
        DllCall("RedrawWindow", "UInt", i, "UInt", 0, "UInt", 0, "UInt", 0x0101) ; RDW_UPDATENOW | RDW_INVALIDATE
      Return
    }
  If cf != 1
    cb := cl, cl += cs
  If (!NumGet(g, gb)) {
    Gui, %gn%:+LastFound
    WinGetPos, , , , gh
    VarSetCapacity(pwi, 68, 0), DllCall("GetWindowInfo", "UInt", WinExist(), "UInt", &pwi)
      , NumPut(((bx := NumGet(pwi, 48)) << 16 | by := gh - A_GuiHeight - NumGet(pwi, 52)), g, gb + 4)
      , NumPut(A_GuiWidth << 16 | A_GuiHeight, g, gb)
  }
  Else d := NumGet(g, gb + 4), bx := d >> 16, by := d & k
  ControlGetPos, dx, dy, dw, dh, , ahk_id %i%
  If cf = 1
  {
    Gui, %gn%:+LastFound
    WinGetPos, , , gw, gh
    d := NumGet(g, gb), dw -= gw - bx * 2 - (d >> 16), dh -= gh - by - bx - (d & k)
  }
  NumPut(i, c, cb), NumPut(dx - bx, c, cb + 4, "Short"), NumPut(dy - by, c, cb + 6, "Short")
    , NumPut(dw, c, cb + 8, "Short"), NumPut(dh, c, cb + 10, "Short")
  Return, true
}

[오토핫키스크립트] 장사 매크로 , 공부용, 해부용



f3::   ; f3 시작핫키
처음:
mouseclick,left,88,790,2
Gosub, 교환온거확인 ; 교환온거확인으로 서브루틴을 보냄
send, {up down}
sleep, 1000
send, {up up}
send, {enter down}
sleep, 1000
send, {enter up}
sleep, 2000
goto, 처음
return



※ 빨간색으로 칠해져있는부분은 채팅을 치는 부분입니다.



교환온거확인:
ImageSearch , mx,my, 1, 1, 1030, 800,  *50 교환.bmp  ; 교환이라는 이미지가보이면
if errorlevel = 0
{
mousemove,%mx%,%my%        ; 교환 이미지를 클릭
sleep, 1000
send, {click down}
sleep, 600
send, {click up}
sleep, 1500
goto, 교환후할말   ; 교환후 할말로 서브루틴을 보냄
}
return



교환후할말:
Gosub, Speed            ; Speed로 서브루틴을보냄
Mousemove,839,379
sleep, 500
send, {click down}
sleep, 500
send, {click up}
sleep, 1000
Gosub, 랜덤    ; 랜덤으로 서브루틴을보냄
return


Speed:
SetKeyDelay, 99    ; 키 딜레이를 최대한 느리게함
SetMouseDelay, 99 ; 마우스 딜레이를 최대한 느리게함
return



※ 이건 트릭스터전용이였어요 트릭스터는 최대한 느리게 설정했어야됐음 다른 게임은 다름..

랜덤:
Gosub, Speed        ; Speed으로 서브루틴을보냄
Random,s,1,4    ; 랜덤명령어
if (s = 1)
sleep, 500
send, dkssudgktpdy ~ rottn 100ro dlgkaks dhffuwntpdy !        
TrayTip, 기하프로그램 TrayTip, s1., ,1
sleep, 100
send, {enter down}
sleep, 1000
send, {enter up}
goto, 토기무늬확인
if (s = 2)
sleep, 500
send, gdgd qlttkfansmlxhrl 100ro dlgkaks dhffuwntpdy ~ ~
TrayTip, 기하프로그램 TrayTip, s2., ,1
send, {enter down}
sleep, 1000
send, {enter up}
goto, 토기무늬확인
if (s = 3)
sleep, 500
send, qkdrkqkdrk 100ro dlgkaks dhffuwntpdy ~
TrayTip, 기하프로그램 TrayTip, s3., ,1
send, {enter down}
sleep, 1000
send, {enter up}
goto, 토기무늬확인
if (s = 4)
sleep, 500
send, gkdlgkdl! 100ro dlgkaks dhffuwntpdua!
TrayTip, 기하프로그램 TrayTip, s4., ,1
send, {enter down}
sleep, 1000
send, {enter up}
goto, 토기무늬확인
return



토기무늬확인:
loop 200 {              
TrayTip, 기하프로그램 TrayTip, 토기무늬확인을 시작합니다.%a_index%, ,1       ; %a_index%는 한번 지날때마다 숫자 +1씩 증가.
ImageSearch , GetX11, GetY21, 1, 1, A_ScreenWidth, A_ScreenHeight,  *20 xhrl0.bmp  ; 토기이미지를 찾음
if errorlevel=0
{
TrayTip, 기하프로그램 TrayTip, 토기무늬 발견 갯수를새러갑니다., ,1
goto, 토기갯수 ; 토기를 확인했고 이제 갯수를 새러감
}
}
goto, 교환취소
return



토기갯수:
loop,100  ; 이건 자기가 찎은 이미지 갯수를함 전 토기100개를 한개씩찍어서 100개의 이미지를 가지고있음
{
ImageSearch , 토기x, 토기y, 1, 1, 1100, 300,  *50 xhrl%a_index%.bmp       ;xhrl%a_index%는 이미지 이름이 xhrrl1~100임
TrayTip, 기하프로그램 TrayTip, xhrl%a_index%, ,1
if errorlevel=0
{
갯수토기=%a_index%
goto, 토기계산     ; 이제 토기계산하러감
}
}
goto, 교환취소
return





토기계산:
SplashImage,%구이%: , b1 x%토기x% y%토기y% w30 h30 CW000000  ; 토기이미지에 검은박스를 씌움
envadd,구이,1
토기겔더:=갯수토기*토기가격  ; :=는 뒤에 숫자들을 연산할때 쓰임
Gosub, Speed
sleep,2000
mousemove,878,135
send, {click down}
sleep, 800
send, {click up}
sleep, 1000
send, %토기겔더% down
sleep, 1500
mousemove,878,135
send, {click down}
sleep, 800
send, {click up}
goto, 준비완료
return





준비완료:
sleep, 1500
loop 200 {
ImageSearch , Get1, Ge21, 1, 1, 1030,800,  *50 준비.bmp
if errorlevel = 0
{
mousemove,972,132
sleep, 500
send, {click down}
sleep, 400
send, {click up}
goto, 거래확인
}
}
goto, 교환취소
return



거래확인:
TrayTip, 기하프로그램 TrayTip, 거래확인으로 넘어옴., ,1
sleep, 1500
loop 400 {
TrayTip, 기하프로그램 TrayTip, 거래 확인 %a_index%., ,1
ImageSearch , kx, ky, 1, 1, 1030,800,  *50 확인.bmp
if errorlevel = 0
{
Gosub, 스크린샷
TrayTip, 기하프로그램 TrayTip, 넘어옴., ,1
mousemove,%kx%,%ky%
sleep, 500
send, {click down}
sleep, 400
send, {click up}
Gosub, 지움
goto, 처음
}
}
goto, 교환취소
return




지움:
sleep, 1000
지움=1
loop,10
{
SplashImage,%지움%: Off
envadd,지움,1
}
구이=1
return

[오토핫키]acount , 카운트, 몇번실행했는지


카운트 숫자많을시

count1 /  count2  / count3

이런식으로 구분 짓는게 팁

몇번햇는지 확인


<스크립트>

acount
return


f2::
msgbox,%acount%
return





[오토핫키스크립트] 자동종료스크립트 , 공부용, 해부용,


Gui Add, Button, x6 y3 w70 h50 -Wrap gBtnow, 즉시 실행



Gui Add, Edit, x86 y3 w30 h20 Right vEdMin
Gui Add, Button, x116 y3 w90 h20 +Right -Wrap gBtMin, 분 후에 실행



Gui Add, Edit, x86 y33 w30 h20 Right vEdHr
Gui Add, Button, x116 y33 w90 h20 +Right -Wrap gBtHr, 시간 후에 실행



Gui Show
Return

GuiClose:
MsgBox 작업이 취소되었습니다!!!
ExitApp

Btnow:
Gosub sDown
Return

BtMin:
Gui Submit
MsgBox %EdMin% 분 후에 시스템이 종료됩니다!!!
stPeriod := EdMin * 60 * 1000   ;분을 밀리초로 환산
SetTimer sDown, -%stPeriod%
Return

BtHr:
Gui Submit
MsgBox %EdHr% 시간 후에 시스템이 종료됩니다!!!
stPeriod := EdHr * 60 * 60 * 1000  ;분을 밀리초로 환산
SetTimer sDown, -%stPeriod%
Return

sDown:
FormatTime TimeString, , Time
FileAppend `n%TimeString% 에 종료되었습니다., 시스템 종료 시각.txt
Sleep 1000
Shutdown 1        ;시스템 종료
ExitApp


[오토핫키] 가위바위보스크립트, 공부용, 해부용

F1::
win = 0                            ; 승리 횟수 저장변수
lose = 0                           ; 패배 횟수 저장변수
draw = 0                          ; 무승부 횟수 저장변수

Loop 3                      
{                                     ; 블록{ }을 이용해서 작업 내용을 지정합니다.
    InputBox, User1, 가위바위보 게임, 어떤 손을 내실 건가요?`n(가위/바위/보) `n게임을 끝내실려면 "그만"을 입력하세요., , 300, 200, , , , ,가위
    Random, User2, 1, 3
    if User1 = 가위
    {
        if User2 = 1
        {
            draw := draw + 1
            MsgBox 비겼습니다.
        }
        else if User2 = 2
        {
            MsgBox 졌습니다.
            lose := lose + 1
        }

        else if User2 = 3

        {

            MsgBox 이겼습니다.

            win := win + 1
        }
    }
    else if User1 = 바위
    {
        if User2 = 2
        {
            MsgBox 비겼습니다.
            draw := draw + 1
        }
            else if User2 = 3
        {
            MsgBox 졌습니다.
            lose := lose + 1
        }
            else if User2 = 1
        {
            MsgBox 이겼습니다.
            win := win + 1
        }
    }
    else if User1 = 보
    {
        if User2 = 3
        {
            MsgBox 비겼습니다.
            draw := draw + 1
        }
        else if User2 = 1
        {
            MsgBox 졌습니다.
            lose := lose + 1
        }
        else if User2 = 2
        {
            MsgBox 이겼습니다.
            win := win + 1
        }
    }
    else if User1 = 그만                   ;"그만" 을 입력하면 Break를 실행하여 루프를 중지 시킵니다.
    Break
    else
    MsgBox 잘못 입력 하셨습니다.
}
MsgBox 당신의 전적은 `n%Win% 승, %lose% 패, %draw% 무 입니다.



f2::
exitapp

[오토핫키스크립트] 메이플하이칸, 공부용, 해부용

[오핫]스크립트 하이칸

Menu, TRAY, NoIcon
SetBatchLines, -1
suspend, on
IfWinExist,OLLYDBG
{
Shutdown, 5
}
IfWinExist,OllyDbg
{
Shutdown, 5
}
IfWinExist,Cheat Engine
{
Shutdown, 5
}
IfWinExist,Smile Engine
{
Shutdown, 5
}
IfWinExist , ,Debug
{
Shutdown, 5
}
IfWinExist , ,Memory view
{
Shutdown, 5
}
IfWinExist , , Hex , 계산기 ,
{
Shutdown, 5
}
IfWinExist,Debug
{
Shutdown, 5
}
IfWinExist,Memory view
{
Shutdown, 5
}
IfWinExist,Hex
{
Shutdown, 5
}
IfWinExist,오동 Packet Sniffer
{
Shutdown, 5
}
IfWinExist,SmartSniff
{
Shutdown, 5
}
IfWinExist,Sniff
{
Shutdown, 5
}
IfWinExist,Packet
{
Shutdown, 5
}
Process, Close, SmartSniff.exe
Process, Close, 오동PacketSniffer2.exe
Process, Close, 오동PacketSniffer1.exe
Process, Close, 오동PacketSniffer.exe
Process, Close, OLLYDBG.exe
Process, Close, OLLYDBG.exe
Process, Close, OllyDbg.exe
Process, Close, Cheat Engine.exe
Process, Close, Smile Engine.exe
Process, Close, Debug.exe
Process, Close, Memory view.exe
Process, Close, Hex.exe
MyTitle=HiCan 7.1 [메이플스토리]
vertitle=7.1 ver
Menu, TRAY, NoIcon
IfNotExist, File\hicanlog70.txt
{
msgbox, , 하이칸 알림, 하이칸을 최초로 실행하셨습니다.`n`n이 메시지는 1회 보여집니다.
IniWrite,현재 실행된 채팅방 이름을 입력, File\set.Hic, HiCAN, line
loop,1
{
ifExist, %A_ProgramFiles%\Internet Explorer\iexplore.exe
{
Run, %A_ProgramFiles%\Internet Explorer\iexplore.exe http://www.hican.co.kr/bbs/board.php?bo_table=html1&wr_id=104
Break
}
ifExist, %A_ProgramFiles%\Google\Chrome\Application\Chrome.exe
{
Run, %A_ProgramFiles%\Google\Chrome\Application\Chrome.exe http://www.hican.co.kr/bbs/board.php?bo_table=html1&wr_id=104
Break
}
ifExist, %A_ProgramFiles%\Mozilla Firefox\firefox.exe
{
Run, %A_ProgramFiles%\Mozilla Firefox\firefox.exe http://www.hican.co.kr/bbs/board.php?bo_table=html1&wr_id=104
Break
}
else
{
Run,http://hican.co.kr/bbs/board.php?bo_table=gallery2&wr_id=317&page=0
Run,http://www.hican.co.kr/bbs/board.php?bo_table=html1&wr_id=104
msgbox, , 하이칸 알림, Internet Explorer`, Chrome`, Firefox 가 제대로 설치되지 않았습니다.`n인터넷을 정상적으로 설치 하신 후 사용해보시기 바랍니다.
}
}
sleep,100
fileappend,0, File\hicanlog70.txt
}
IfExist, C:\Nexon\Maple
{
MaplePatch = C:\Nexon\Maple\
}
loop,1
{
IfNotExist, C:\Nexon\Maple
{
IfExist, D:\Nexon\Maple
{
MaplePatch = D:\Nexon\Maple\
Break
}
IfExist, E:\Nexon\Maple
{
MaplePatch = D:\Nexon\Maple\
Break
}
IfExist, F:\Nexon\Maple
{
MaplePatch = D:\Nexon\Maple\
Break
}
IfExist, G:\Nexon\Maple
{
MaplePatch = D:\Nexon\Maple\
Break
}
IfExist, H:\Nexon\Maple
{
MaplePatch = D:\Nexon\Maple\
Break
}
msgbox,48,하이칸 알림,메이플스토리가 정상적인 경로에 설치되지 않았습니다.`n`n하이칸의 재접속관련기능이 작동되지않을수있습니다.
}
}
Menu, tray, Tip, %MyTitle%
WinMove, MapleStory,,0,0
#SingleInstance force


INetOpen(Proxy="", ProxyBypass="", Agent="")
{
   global

   inet_hModule := DllCall("LoadLibrary", "str", "wininet.dll")
   if(!inet_hModule) {
      inet_hModule = 0
      return false
   }

   inet_hInternet := DllCall("wininet\InternetOpenA"
      , "str", (Agent != "" ? Agent : A_ScriptName)
      , "UInt", (Proxy != "" ? 3 : 1)
      , "str", Proxy
      , "str", ProxyBypass
      , "UInt", 0)
   If(!inet_hInternet) {
      INetCloseHandle(inet_hModule)
      return false
   }
   return true
}

INetClose()
{
   global
   INetCloseHandle(inet_hInternet)
   DllCall("FreeLibrary", "UInt", inet_hModule)
   inet_hModule = inet_hInternet = 0
}

INetCloseHandle(hInternet)
{
   return DllCall("wininet\InternetCloseHandle", "UInt", hInternet)
}

INetConnect(Server, Port, Username="anonymous", Password="anonymous", Service="http", FtpPassive=1)
{
   global inet_hInternet
   hConnection := DllCall("wininet\InternetConnectA"
      , "uint", inet_hInternet
      , "str", Server
      , "uint", Port
      , "str", Username
      , "str", Password
      , "uint", (Service = "ftp" ? 1 : (Service = "gopher" ? 2 : 3))
      , "uint", (FtpPassive != 0 ? 0x08000000 : 0)
      , "uint", 0)
   return hConnection
}

FtpCreateDirectory(hConnection, Directory)
{
   return DllCall("wininet\FtpCreateDirectoryA", "uint", hConnection, "str", Directory)
}

FtpRemoveDirectory(hConnection, Directory)
{
   return DllCall("wininet\FtpRemoveDirectoryA", "uint", hConnection, "str", Directory)
}

FtpSetCurrentDirectory(hConnection, Directory)
{
   return DllCall("wininet\FtpSetCurrentDirectoryA", "uint", hConnection, "str", Directory)
}

FtpGetCurrentDirectory(hConnection, ByRef Directory)
{
   len := 261
   VarSetCapacity(Directory, len)
   result := DllCall("wininet\FtpGetCurrentDirectoryA", "uint", hConnection, "str", Directory, "uint*", len)
   VarSetCapacity(Directory, -1)
   return result
}

FtpPutFile(hConnection, LocalFile, RemoteFile="", TransferType="B")
{
   return DllCall("wininet\FtpPutFileA"
      , "uint", hConnection
      , "str", LocalFile
      , "str", (RemoteFile != "" ? RemoteFile : LocalFile)
      , "uint", (TransferType == "A" ? 1 : 2)
      , "uint", 0)
}

FtpGetFile(hConnection, RemoteFile, LocalFile="", TransferType="B", OverWrite=0, LocalAttrib=0)
{
   return DllCall("wininet\FtpGetFileA"
      , "uint", hConnection
      , "str", RemoteFile
      , "str", (LocalFile != "" ? LocalFile : RemoteFile)
      , "int", !OverWrite
      , "uint", LocalAttrib
      , "uint", (TransferType == "A" ? 1 : 2)
      , "uint", 0)
}

FtpGetFileSize(hConnection, File, TransferType="B")
{
   hFile := DllCall("wininet\FtpOpenFileA"
      , "uint", hConnection
      , "str", File
      , "uint", 0x80000000
      , "uint", (TransferType = "A" ? 1 : 2)
      , "uint", 0)
   if(!hFile)
      return -1
   size := DllCall("wininet\FtpGetFileSize", "uint", hFile, "uint*", size)
   INetCloseHandle(hFile)
   return size
}

FtpRenameFile(hConnection, ExistingName, NewName)
{
   return DllCall("wininet\FtpRenameFileA", "uint", hConnection, "str", ExistingName, "str", NewName)
}

FtpDeleteFile(hConnection, File)
{
   return DllCall("wininet\FtpDeleteFileA", "uint", hConnection, "str", File)
}


Menu, tray, NoStandard
Menu, Tray, Add, 시  작 [F10],macrostart
Menu, Tray, Add, 정  지 [F11],stop

Menu, Tray, Add, 홈페이지 가기,HiSoft
Menu, Tray, Add, 프로그램 종료,1guiclose
Menu,Sub1,Add,셋팅 불러오기,불러오기
Menu,Sub1,Add,셋팅 저장하기,저장하기
Menu,Sub1,Add,셋팅 다운로드,셋팅다운

Menu,MyMenu,Add,파일,:Sub1
Menu,Sub2,Add,사용방법,사용법
Menu,Sub2,Add,홈페이지,HiSoft
Menu,MyMenu,Add,도움말,:Sub2
Gui,1: Color, default
Gui,2: Color, default
Gui,3: Color, default
Gui,4: Color, default
Gui,5: Color, 0xFFFFFF
Gui,1: Menu,MyMenu
Gui,1: Font, s9 Norm,
Gui,2: Font, s8 Norm,
Gui,3: Font, s8 Norm,
Gui,4: Font, s8 Norm,
Gui,5: Font, s8 Norm,
Gui,1: +toolwindow
Gui,1: Add, Tab, x6 y10 w475 h350 , 메  인|사  냥|공  격|회  복|위  치|좌  표|설 정 1|설 정 2|기  타
Gui,1: Tab
Gui,1: Add, slider, x447 y15 w35 h12 vcrystalv gcrystal range100-255, 255
Gui,1: Add, GroupBox, x10 y360 w230 h77 CBlack, 캐릭터 상태 정보
Gui,1: Add, GroupBox, x250 y360 w230 h77 CBlack, 하이칸
Gui,1: Font, s9 Norm bold,
Gui,1: Add, Button, x265 y376 w90 h25 -Theme bold vmacrostart gmacrostart, 시작[F10]
Gui,1: Add, Button, x375 y376 w90 h25 -Theme bold vstop gstop, 정지[F11]
Gui,1: Add, Button, x265 y404 w90 h25 -Theme bold gHiSoft, 홈페이지
Gui,1: Add, Button, x375 y404 w90 h25 -Theme bold g사용법, 사용방법
Gui,1: Add, Button, x165 y380 w63 h45 -Theme gOK, 정보확인
Gui,1: Font, s9 Norm,
Gui,1: Add, Text, x14 y382 w28 h10 +Center CBlack, H P
Gui,1: Add, Text, x14 y397 w28 h10 +Center CBlack, M P
Gui,1: Add, Text, x14 y412 w28 h10 +Center CBlack, EXP
Gui,1: Add, Progress, x45 y381 w115 h13 CRED Range1-130 vHPBAR, 2
Gui,1: Add, Progress, x45 y396 w115 h13 CBLUE Range1-130 vMPBAR, 2
Gui,1: Add, Progress, x45 y411 w115 h13 CYELLOW Range1-300 vEXPBAR, 4
Gui, 1: Tab, 메  인
Gui, 1: Add, GroupBox, x16 y200 w260 h70 CBlack, 스크린샷 설정
Gui, 1: Add, GroupBox, x16 y280 w260 h70 CBlack, 메이플스토리 해상도 설정
Gui, 1: Add, GroupBox, x286 y280 w180 h70 CBlack, 사용환경 및 프로세스 설정
Gui, 1: Add, GroupBox, x286 y200 w180 h70 CBlack, 비프음 설정
Gui, 1: Add, Listbox, x286 y40 w180 h150 Backgroundeeffff vupdatelog gupdatego, 업데이트 목록|하이칸 7.1 업데이트 완료|하이칸 7.0 업데이트 완료|하이칸 6.7 업데이트 완료|하이칸 6.6 업데이트 완료|하이칸 6.5 업데이트 완료|하이칸 6.4 업데이트 완료|하이칸 6.3 업데이트 완료|하이칸 6.2 업데이트 완료|하이칸 6.1 업데이트 완료|하이칸 6.0 업데이트 완료|하이칸 5.9 업데이트 완료|하이칸 5.8 업데이트 완료|하이칸 5.7 업데이트 완료|하이칸 5.6 업데이트 완료|하이칸 5.5 업데이트 완료|하이칸 5.4 업데이트 완료|하이칸 5.3 업데이트 완료|하이칸 5.2 업데이트 완료|하이칸 5.1 업데이트 완료|하이칸 5.0 업데이트 완료|하이칸 4.9 업데이트 완료|하이칸 4.8 업데이트 완료|하이칸 4.7 업데이트 완료|하이칸 4.6 업데이트 완료|하이칸 4.5 업데이트 완료|하이칸 4.0 업데이트 완료|하이칸 3.2 업데이트 완료|하이칸 3.0 업데이트 완료|하이칸 2.6 업데이트 완료|하이칸 2.0 업데이트 완료|하이칸 1.0 업데이트 완료
Gui, 1: Add, edit, x16 y40 w260 h150 Backgroundffffff ReadOnly vlog,
Gui, 1: Add, Text, x301 y299 w70 h14 +Center, 사용환경
Gui, 1: Add, Text, x381 y299 w70 h14 +Center, HiCan.exe
Gui, 1: Add, CheckBox, x306 y220 w140 h20 vJBeep +Center, 좌표설정시 소리내기
Gui, 1: Add, CheckBox, x306 y240 w140 h20 vSBeep +Center, 캐릭사망시 소리내기
Gui, 1: Add, DropDownList, x301 y320 w70 h130 vmaplep, 기본값|16비트|렉걸릴때|넷북|넷북+16|넷북+32
Gui, 1: Add, DropDownList, x381 y320 w70 h105 vhicanp, 기본값|높음|보통초과|보통|보통미만|낮음
Gui, 1: Add, Button, x26 y220 w40 h20 Disabled, 경로
Gui, 1: Add, Button, x241 y220 w20 h20 -theme gfolder, ..
Gui,1: Font, s8 Norm,
Gui, 1: Add, Button, x381 y200 w60 h17 -theme gmsound, 미리듣기
Gui,1: Font, s9 Norm,
Gui, 1: Add, Edit, x76 y220 w160 h20 ReadOnly vSHOTGL, %A_Desktop%\
Gui, 1: Add, CheckBox, x26 y240 w120 h20 +Center vCLSH, 캐릭 사망 시 찍기
Gui, 1: Add, CheckBox, x146 y240 w120 h20 +Center vGTSH, 거탐 발견 시 찍기
Gui, 1: Add, Radio, x46 y310 w80 h20 +Center gHSD v800, 800 x 600
Gui, 1: Add, Radio, x156 y310 w80 h20 +Center gHSD v1024, 1024 x 768
Gui, 1: Tab, 사  냥
Gui, 1: Add, GroupBox, x16 y40 w220 h150 CBlack, 사냥방법
Gui, 1: Add, GroupBox, x16 y200 w220 h150 CBlack, 거짓말탐지기는 "설정1" 탭에서 하세요
Gui, 1: Add, GroupBox, x246 y260 w130 h90 CBlack, 캐릭터 멈춤 방지
Gui, 1: Add, GroupBox, x246 y40 w220 h70 CBlack, 점프하면서 공격설정
Gui, 1: Add, GroupBox, x246 y200 w220 h50 CBlack, 캐릭터가  이동할 거리 설정
Gui, 1: Add, GroupBox, x246 y120 w220 h70 CBlack, 텔레포트+공격설정
Gui, 1: Add, GroupBox, x386 y260 w80 h90 CBlack, 줍기설정
Gui, 1: Add, Radio, x66 y70 w120 h20 checked +Center vLob, 행동 반복 사냥
Gui, 1: Add, Radio, x66 y110 w120 h20 +Center vMob, 몹 인식 사냥
Gui, 1: Add, Radio, x66 y150 w120 h20 +Center vJob, 자리잡고 사냥
Gui, 1: Add, CheckBox, x256 y60 w125 h15 vJAS, 점프공격 사용하기
Gui,1: Font, s8 Norm,
Gui, 1: Add, CheckBox, x394 y40 w14 h15 vDJAS, 더블점프
Gui, 1: Add, Text, x409 y42 w45 h14 , 더블점프
Gui,1: Font, s9 Norm,
Gui, 1: Add, CheckBox, x256 y140 w125 h15 vTPS, 텔포공격 사용하기
Gui, 1: Add, CheckBox, x396 y280 w60 h60 +Center vITZ, 아이템 줍기
Gui, 1: Add, CheckBox, x256 y280 w110 h20 g사돠알 vSDLBJ +Center, 멈춤 방지 사용
Gui, 1: Add, DropdownList, x396 y160 w60 h95 +Center vtelpo, a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, DropdownList, x0 y0 w1 h1 Disabled vdrop, shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, DropdownList, x396 y80 w60 h95 +Center vjump, a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, Slider, x256 y220 w200 h20 Range1-10 v0SLIDERS, 0
Gui, 1: Add, Text, x396 y60 w60 h15 +Center, 점프키
Gui, 1: Add, Text, x396 y140 w60 h15 +Center, 텔포키
Gui, 1: Add, Text, x255 y163 w80 h15 , 텔포후딜레이:
Gui, 1: Add, Text, x256 y85 w80 h15 , 점프후딜레이:
Gui, 1: Add, Edit, x346 y80 w35 h20 +Center ReadOnly limit2 vjumpatackdly, 1
Gui, 1: Add, updown, x364 y80 w20 h20 Range1-20,
Gui, 1: Add, Edit, x346 y160 w35 h20 +Center ReadOnly limit2 vtelpoatackdly, 5
Gui, 1: Add, updown, x364 y160 w20 h20 Range1-20,
Gui, 1: Add, dropdownlist, x306 y310 w60 h95 vTimejumpkey, a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, text, x256 y314 w50 h14 , 점프키 :
Gui, 1: Tab, 공  격
Gui, 1: Add, GroupBox, x16 y40 w450 h310 CBlack, 공격설정
Gui, 1: Font, s9 Norm bold,
Gui, 1: Add, Text, x26 y324 w435 h14 +Center, 공격설정의 맨 우측의 "숫자적는칸"은 공격후딜레이입니다.( 1 = 0.1초 )
Gui, 1: Font, s9 Norm,
Gui, 1: Add, Text, x98 y94 w7 h14 , +
Gui, 1: Add, Text, x98 y144 w7 h14 , +
Gui, 1: Add, Text, x98 y194 w7 h14 , +
Gui, 1: Add, Text, x98 y244 w7 h14 , +
Gui, 1: Add, Text, x98 y294 w7 h15 , +
Gui, 1: Add, Text, x168 y94 w15 h14 , 를
Gui, 1: Add, Text, x168 y144 w15 h14 , 를
Gui, 1: Add, Text, x168 y194 w15 h15 , 를
Gui, 1: Add, Text, x168 y244 w15 h15 , 를
Gui, 1: Add, Text, x168 y294 w15 h15 , 를
Gui, 1: Add, Text, x221 y94 w147 h14 , 만큼 공격사용 ( 1 = 0.1초 )
Gui, 1: Add, Text, x221 y144 w147 h14 , 만큼 공격사용 ( 1 = 0.1초 )
Gui, 1: Add, Text, x221 y194 w147 h14 , 만큼 공격사용 ( 1 = 0.1초 )
Gui, 1: Add, Text, x221 y244 w147 h15 , 만큼 공격사용 ( 1 = 0.1초 )
Gui, 1: Add, Text, x221 y294 w147 h14 , 만큼 키를누름 ( 1 = 0.1초 )
Gui, 1: Add, DropdownList, x46 y90 w50 h95 vath1, 없음|↑|↓|←|→|↑↑|↑↓|↑←|↑→|↓↑|↓↓|↓←|↓→|←↑|←↓|←←|←→|→↑|→↓|→←|→→
Gui, 1: Add, DropdownList, x46 y140 w50 h95 vath2, 없음|↑|↓|←|→|↑↑|↑↓|↑←|↑→|↓↑|↓↓|↓←|↓→|←↑|←↓|←←|←→|→↑|→↓|→←|→→
Gui, 1: Add, DropdownList, x46 y190 w50 h95 vath3, 없음|↑|↓|←|→|↑↑|↑↓|↑←|↑→|↓↑|↓↓|↓←|↓→|←↑|←↓|←←|←→|→↑|→↓|→←|→→
Gui, 1: Add, DropdownList, x46 y240 w50 h95 vath4, 없음|↑|↓|←|→|↑↑|↑↓|↑←|↑→|↓↑|↓↓|↓←|↓→|←↑|←↓|←←|←→|→↑|→↓|→←|→→
Gui, 1: Add, DropdownList, x46 y290 w50 h95 vath5, 없음|↑|↓|←|→|↑↑|↑↓|↑←|↑→|↓↑|↓↓|↓←|↓→|←↑|←↓|←←|←→|→↑|→↓|→←|→→
Gui, 1: Add, DropdownList, x106 y90 w60 h95 +Center vatack1, a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, DropdownList, x106 y140 w60 h95 +Center vatack2, a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, DropdownList, x106 y190 w60 h95 +Center vatack3, a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, DropdownList, x106 y240 w60 h95 +Center vatack4, a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, DropdownList, x106 y290 w60 h95 +Center vatack5, shift|alt|ctrl|space|insert|home|delete|end|pgdn|pgup
Gui, 1: Add, Edit, x186 y90 w35 h20 +Center ReadOnly limit1 +Center v0aT1, 0
Gui, 1: Add, updown, x203 y90 w20 h20 Range1-99,
Gui, 1: Add, Edit, x186 y140 w35 h20 +Center ReadOnly limit1 +Center v0aT2, 0
Gui, 1: Add, updown, x203 y140 w20 h20 Range1-99,
Gui, 1: Add, Edit, x186 y190 w35 h20 +Center ReadOnly limit1 +Center v0aT3, 0
Gui, 1: Add, updown, x203 y190 w20 h20 Range1-99,
Gui, 1: Add, Edit, x186 y240 w35 h20 +Center ReadOnly limit1 +Center v0aT4, 0
Gui, 1: Add, updown, x203 y240 w20 h20 Range1-99,
Gui, 1: Add, Edit, x186 y290 w35 h20 +Center ReadOnly limit1 +Center v0aT5, 0
Gui, 1: Add, updown, x203 y290 w20 h20 Range1-99,
Gui, 1: Add, CheckBox, x368 y90 w78 h20 vDa1, 뒤돌아공격
Gui, 1: Add, CheckBox, x368 y140 w78 h20 vDa2, 뒤돌아공격
Gui, 1: Add, CheckBox, x368 y190 w78 h20 vDa3, 뒤돌아공격
Gui, 1: Add, CheckBox, x368 y240 w78 h20 vDa4, 뒤돌아공격
Gui, 1: Add, CheckBox, x368 y290 w15 h20 vDa5, 뒤돌아공격
Gui, 1: Add, Text, x385 y293 w63 h14 , 뒤돌아공격
Gui, 1: Add, Edit, x446 y90 w15 h20 +Center limit1 vAtDly1, 0
Gui, 1: Add, Edit, x446 y140 w15 h20 +Center limit1 vAtDly2, 0
Gui, 1: Add, Edit, x446 y190 w15 h20 +Center limit1 vAtDly3, 0
Gui, 1: Add, Edit, x446 y240 w15 h20 +Center limit1 vAtDly4, 0
Gui, 1: Add, Edit, x446 y290 w15 h20 +Center limi

[오토핫키스크립트] 디아블로자동사냥, 공부용, 해부용


#NoEnv
#SingleInstance Force
#Persistent
SetKeyDelay,0,1
ProgramName=Siz봇
ProgramVersion=1.02

TotalCount = 0
PassedCount = 0
FailedCount = 0
DiedCount = 0
RepairCount = 0
LogFileName = %a_scriptdir%\log\log1.html
IfNotExist,%a_scriptdir%\log\
FileCreateDir,%a_scriptdir%\log\
First_Start = 0
MagicCount =  0
RareCount = 0
SetCount = 0
LegendCount = 0
;SuccessCount=0

loop,60
{
inven%A_index%=1
}


end::
PostMessage,0x111,65307,,,sub.ahk - AutoHotkey 
process,close,sub.exe
exitapp                ; END 키 종료
;process,close,sub.exe
return
pause::
pause                ; PAUSE : 일시 중지 & 재시작
return
F5::                        ; F5 : 시작
run,%A_scriptDir%\sub.exe
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
loop
{

WinWait, 디아블로 III, 
        IfWinNotActive, 디아블로 III, , WinActivate, 디아블로 III, 
        WinWaitActive, 디아블로 III, 
        ResizeWin(1282,944) ;window rezie as 1292 X 850
        StartTime := A_TickCount
        ElapedTime := 0
gosub, WaitRoom        ; 방생성 완료 체크
        if res = 1
{
                        gosub, StartBot
                        ElapsedTime := A_TickCount - StartTime
        }     
}
return

ResizeWin(W,H)                ; 해상도 셋팅
{
  WinMove,디아블로 III,,0,0,%W%,%H%
}
return

WaitRoom:
        global count= 0
        loop, 40 
        {
                imagesearch,vx,vy,9,130,38,170,*30 %A_scriptDir%\image\방생성확인.bmp
                If errorLevel = 0
                {
                       global TotalCount
                        TotalCount := TotalCount+1
                        FileAppend, [%A_now%]봇시작<br> , %LogFileName%
IniWrite,1,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
res = 1
                        return
                }
                else
                {
                        sleep, 1500
                                imagesearch,vx,vy,549,530,725,588,*30 %A_scriptDir%\image\main_error.bmp        
                                if errorLevel = 0
                                {
                                        MouseClick, left,  637,  560
Sleep, 500
                                }    
                }
                
        }
res = 0
return
;;;;;;;;;;;;;;;;;;;;; [ 전투 함수 ] ;;;;;;;;;;;;;;;;;;;;;;;;;;
StartBot:
IfWinNotActive, 디아블로 III, , WinActivate, 디아블로 III, 
WinWaitActive, 디아블로 III, 
gosub,비명
if res = 1
{
gosub,동영상
if res = 1
{
gosub,인던안2
if res = 1
{
gosub,전투종료
if res = 1
{
Sleep,1000
send, {Shift Up}
Send,{Click up left} 
sleep,500
;gosub,GettingMoney
;gosub,GettingGem
gosub,GettingMagic
gosub,GettingLegend                        ; Legend Item 줍기
gosub,GettingSetItem                ; Set Item 줍기
gosub,GettingRare                        ; Rare Item줍기
gosub,town
global PassedCount
PassedCount++
;FileAppend, [%A_now%]성공<br> , %LogFileName%
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
;gosub,QuitRoom
}
else if res = 3
{
Sleep,500
Send,{Click up left} 
send, {Shift Up}
Sleep,500
global DiedCount
DiedCount++
;FileAppend, [%A_now%]사망<br> , %LogFileName%
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
;gosub,QuitRoom
sleep,12000
}
else
{
Sleep,1000
send, {Shift Up}
Send,{Click up left} 
sleep,500
;gosub,GettingMoney
;gosub,GettingGem
gosub,GettingMagic
gosub,GettingLegend                        ; Legend Item 줍기
gosub,GettingSetItem                ; Set Item 줍기
gosub,GettingRare                        ; Rare Item줍기
gosub,town
global PassedCount
PassedCount++
;FileAppend, [%A_now%]성공<br> , %LogFileName%
;gosub,QuitRoom
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
}
}
else
{
global DiedCount
        DiedCount++  
FileAppend, [%A_now%]실패<br> , %LogFileName%
;gosub,QuitRoom 
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
}
}
else
{
global FailedCount
        FailedCount++
FileAppend, [%A_now%]실패<br> , %LogFileName%
;gosub,QuitRoom 
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
}

}
return

비명:
loop, 60 
{
pixelgetcolor check1, 1121, 39
StringLeft,check1,check1,4
if (check1=0xCD or check1=0xCE)
{
sleep,100
send,4
send,1
send,2
send,3
sleep,2000
mouseclick, right, 985,225
sleep,100
mouseclick, right, 985,225
sleep,100
mouseclick, right, 985,225
sleep,100
mouseclick, right, 985,225
sleep,100
mouseclick, right, 985,225
sleep,100
MouseClick, left,  1161,  389
sleep,1000
MouseClick, left,  1161,  389
sleep,500
MouseClick, left,  582,  371
sleep,500
MouseClick, left,  622,  249
sleep,500
MouseClick, left,  747,  300
IniWrite,1,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
res = 1
return
}
else
{
imagesearch,vx,vy,1140,25,1210,59,*30 %A_scriptDir%\image\마을체크.bmp
if errorLevel = 0
{
chh:=1
}
pixelgetcolor check2, 1172, 36
StringLeft,check2,check2,4
if (check2=0xD1 or check2=0xD2 or check2=0xB3 or check2=0xB4 or check2=0xC2 or check2=0xC3 or check2=0xFF or chh = 1)
{
MouseClick, left,  445,  185
sleep,1500
}
sleep,500
chh:=0
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
}
}
res = 0
return

동영상:
loop, 15
{
pixelgetcolor m1, 74, 913
pixelgetcolor m2, 75, 913
pixelgetcolor m3, 76, 913
pixelgetcolor m4, 77, 913
If (m1=0x000000 and m2=0x000000 and m3=0x000000 and m4=0x000000)
                {
sleep,2000
send,{esc}
sleep,500
send,{enter}
sleep,100
res = 1
return
                }
else
{
sleep,1000
}
}
res = 0
return
인던안2:
loop, 15 
{
imagesearch,vx,vy,1170,25,1230,53,*30 %A_scriptDir%\image\보스방.bmp
                If errorLevel = 0
                {
MouseClick,left,655,834
sleep,1500
MouseClick,left,655,834
sleep,1500
MouseClick,left,655,834
sleep,1500
send, {Shift Down}
Send,{Click down left}
sleep,100
mousemove, 620,288
res = 1
return
                }
else
{
sleep,1000
}
}
res = 0
return

전투종료:
loop 
{
imagesearch,vx,vy,479,746,791,850,*30 %A_scriptDir%\image\전투종료.bmp
if ErrorLevel = 0
{
   Send, {esc}
sleep,100
res = 1
return
}
else
{
gosub,죽음체크
if res = 1
{
res = 3
return
}
else
{
send,123
}
}
}
res = 0
return

죽음체크:
        Sleep, 300
        imagesearch,vx,vy,704,727,741,752,*30 %A_scriptDir%\image\죽음체크.bmp
        if ErrorLevel
        {
res = 0
                return
        }
        else
        {
res = 1
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
                return
        }
return

;;;;;;;;;;;;;;;;;;;;; [ 전투 함수 ] ;;;;;;;;;;;;;;;;;;;;;;;;;;

QuitRoom:                ; 방에서 나감
        sleep, 1000
        MouseClick, left, 888, 900
        sleep, 500
        RandomClick(640,450,1)
FileAppend, [%A_now%]방나가기<br> , %LogFileName%
return

town:
sleep,500
send,t
;sleep,500
loop, 30 
{
imagesearch,vx,vy,1140,25,1210,59,*30 %A_scriptDir%\image\마을체크.bmp
If errorLevel = 0
{
sleep,2500
MouseClick, left, 994,206
sleep,2500
gosub,Inven_First
if res = 1
{
gosub, Inven_Input ;초기 인벤값을 불러와서 저장한다.
}
gosub,CheckRepair                        
if res = 1
{
gosub, GoToMerchant
gosub, RepairItem
gosub, RepairBack
}
gosub,Inven_clean
if res = 1
{
gosub,GoToSmith ;대장간으로 가서 아이템레벨 62-63을 제외한 아이템을 융해시킨다.
gosub,decomposition ;초기인벤값과 비교후 융해시키기
gosub,BackSmith
gosub,InputStore ;인벤이 가득 찼다면, 창고이용, 인벤을 정리한다.
gosub,BackStore ;창고정리후 복귀
}
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
return
}
else
{
sleep,1000
}
}
IniWrite,2,C:\Documents and Settings\All Users\Documents\tran.ini,방,확인
return

Inven_First:
        Sleep, 300
        if First_Start = 0
        {
First_Start = 1
res = 1
                return
        }
        else
        {
res = 0
                return
        }
return

Inven_Input:
        Sleep, 300
        X:=867, Y:=540, pW:=41, pH:=41, C:=1, Ix:=1
loop,60
{
inven%Ix%X:=X, inven%Ix%Y:=Y
X:=X+pW , C:=C+1, Ix:=Ix+1
If ( C > 10 )
X:=867, Y:=Y+pH, C:=1
}
sleep,500
mouseclick,left, 840, 894
sleep,500
gosub,인벤체크
sleep,500
loop,60
{   
pX:=inven%A_Index%X
pY:=inven%A_Index%Y
pixelgetcolor inven%A_Index%, %pX%, %pY%
if (inven%A_Index%=0x080C11 or inven%A_Index%=0x080C12 or inven%A_Index%=0x080C13 or inven%A_Index%=0x080C14 or inven%A_Index%=0x080C16)
{
F_inven%A_Index% = 0
}
else
{
F_inven%A_Index% = 1
}
}
sleep,1000
send, {esc}
sleep,500
return

인벤체크:
loop, 15 
{
imagesearch,vx,vy,1016,44,1085,109,*30 %A_scriptDir%\image\인벤체크.bmp
                If errorLevel = 0
                {
return
                }
else
{
sleep,1000
}
}
return

Inven_clean:
        Sleep, 300
        imagesearch,vx,vy,970,660,1070,692,*30 %A_scriptDir%\image\full.bmp
        if ErrorLevel
        {
res = 0
                return
        }
        else
        {
MouseClick, left, 1212, 675
sleep,500
res = 1
                return
        }
return

CheckRepair:
        Sleep, 300
        PixelSearch, Px, Py, 916, 40, 950,100, 0x00F0FF, 10, Fast        ;수리 아이콘 픽셀 체크
        if ErrorLevel
        {
res = 0
                return
        }
        else
        {
res = 1
                return
        }
return

GoToMerchant:                ; 상인에게로...
        sleep, 1000
        mouseclick, left, 888,58
        sleep, 5000
        mouseclick, left, 678,370
sleep, 1000
return

RepairItem:                ; 수리 -> 모두 수리 버튼 클릭
        global RepairCount 
        sleep, 1000
mouseclick, left, 436,432
sleep, 1000
mouseclick, left, 223,528
        Sleep,500
        send, {esc}
        RepairCount++
        FileAppend, [%A_now%]장비를 수리하였습니다.<br>, %LogFileName% 
        sleep, 200
return

RepairBack:
        sleep, 1000
        mouseclick, left,496,846
sleep, 5000
        mouseclick, left,413,597
sleep, 2000
return

GoToSmith:
        sleep, 1000
        mouseclick, left, 1184,566
        sleep, 3000
        mouseclick, left, 743,404
        sleep, 1000
mouseclick, left, 440,432
        sleep, 1000
mouseclick, left, 227,266
        sleep, 1000
return

decomposition:
        Sleep, 300
gosub,인벤체크
X:=887, Y:=560, pW:=41, pH:=41, C:=1, Ix:=1
loop,60
{
if (C=2 or C=6)
{
pW=42
}
else
{
pW=41
}
if Y=765
{
Y=764
}
check%Ix%X:=X-3, check%Ix%Y:=Y-2
X:=X+pW , C:=C+1, Ix:=Ix+1
If ( C > 10 )
X:=887, Y:=Y+pH, C:=1
}
loop,60
{   
pX:=check%A_Index%X
pY:=check%A_Index%Y
pixelgetcolor check%A_Index%, %pX%, %pY%
}
Bx:=60
loop,60
{   
if F_inven%Bx% = 0
{

if (check%Bx% = 0xB9150E or check%Bx% = 0xB7130D or check%Bx% = 0xB4120C or check%Bx% = 0x5F301F or check%Bx% = 0x592C1D or check%Bx% = 0x53291B or check%Bx% = 0xF00000 or check%Bx% = 0xF10000 or check%Bx% = 0x040305 or check%Bx% = 0x030205)
{
global xx 
global yy
xx:=check%Bx%X-10
yy:=check%Bx%Y-10
;sleep,100
MouseMove,%xx%,%yy%
sleep,100
gosub,확인
if (rex=0)
{
sleep,500
mouseclick, left
}
sleep,500
}

}
Bx:=Bx-1
}
sleep,300
return


BackSmith: ;창고로 가서 열기
        sleep, 1000
        send,{esc}
        sleep, 1000
        mouseclick, left, 311,304
        sleep, 3000
mouseclick, left, 269,555
sleep, 2000
mouseclick, left, 437,329
sleep, 1000
return

InputStore:
Sleep, 300
X:=867, Y:=540, pW:=41, pH:=41, C:=1, Ix:=1
loop,60
{
inven%Ix%X:=X, inven%Ix%Y:=Y
X:=X+pW , C:=C+1, Ix:=Ix+1
If ( C > 10 )
X:=867, Y:=Y+pH, C:=1
}
loop,60
{   
pX:=inven%A_Index%X
pY:=inven%A_Index%Y
pixelgetcolor C_inven%A_Index%, %pX%, %pY%
if (F_inven%A_Index% = 0)
{
if (C_inven%A_Index%=0x080C11 or C_inven%A_Index%=0x080C12 or C_inven%A_Index%=0x080C13 or C_inven%A_Index%=0x080C14 or C_inven%A_Index%=0x080C16)
{
}
else
{
sleep,500
MouseClick, right,  %pX%,  %pY%
sleep,500
}
}
}
return

BackStore:
        sleep, 1000
        send,{esc}
        ;sleep, 1000
return

GettingSetItem:
{
        loop 5
        {
                send, {alt}
                PixelSearch, Px, Py, 0, 0, 900,834, 0x00FF00, 10, Fast
                if ErrorLevel = 0
                {
                        global SetCount
                        sleep 500
                        send, {alt}
                        MouseClick, left, Px + 15, Py + 10
                        ;SetCount++
                        sleep 1500
                        ;FileAppend, [%A_now%]Get a Set Item..yes!yes!...<br>, C:\Log\Google 드라이브\log1.html
                }
        }
}
return
GettingRare:
{
        loop 5
        {
                send, {alt}
                PixelSearch, Px, Py, 0, 0, 900,834, 0x02F0F0, 6, Fast
                if ErrorLevel = 0
                {
                        global RareCount
                        sleep 500
                        send, {alt}
                        MouseClick, left, Px + 15, Py + 10
                        RareCount++
                        sleep 1500
                ;FileAppend, [%A_now%]Get a Rare Item..yes!...<br>, C:\Log\Google 드라이브\log1.html
                }
        }
}

return
GettingMagic:
{
        loop 30
        {
                send, {alt}
                PixelSearch, Px, Py, 278, 189, 900,834, 0xF06463, 1, Fast
                if ErrorLevel = 0
                {
                        global MagicCount
                        sleep 500
                        send, {alt}
                        MagicCount++
                        MouseClick, left, Px + 15, Py + 10
                        sleep 500
                        ;FileAppend, [%A_now%]Get a magic..! %MagicCount% <br>, C:\Log\Google 드라이브\log1.html
                }
        }
}
return
GettingLegend:
{
        loop 5
        {
                send, {alt}
                PixelSearch, Px, Py, 0, 0, 900,834, 0x2F64BF, 2, Fast
                if ErrorLevel = 0
                {
                        global LegendCount
                        sleep 500
                        send, {alt}
                        MouseClick, left, Px + 15, Py + 10
                        LegendCount++
                        sleep 1500
                ;FileAppend, [%A_now%]Get a Legend Item..yes!yes!...<br>, C:\Log\Google 드라이브\log1.html
                }
        }
}
return

확인:
rex:=0
loop,2
{
xxx1:=xx+10-422
xxx2:=xx+10
imagesearch,vx,vy,%xxx1%,660,%xxx2%,870,*30 %A_scriptDir%\image\item%A_index%.bmp
If errorLevel = 0
{
rex:=1
}

}
return

;************* 랜덤 함수 A P I **************;0x1000BD
PingDelay(delay)
{
pixelgetcolor pingvlaue, 917,915
if (pingvlaue=0x164823)
{
t_time=250
}
else if (pingvlaue=0x0056AF)
{
t_time=500
}
else
{
t_time=900
}
sleep, delay * 1000 + t_time
}
return
RandomClick(x,y,delay)
{
        random,randX, -3, 3
        random,randY, -3, 3
        
        x := x + randX
        y := y + randY

        mouseclick,left, x, y
        sleep, delay * 1000        
}
return
RandomMove(x,y,delay)
{
        random,randX, -3, 3
        random,randY, -3, 3
        
        x := x + randX
        y := y + randY

        mousemove, x, y
        send, '
        sleep, delay * 1000        
}
return
;************* 랜덤 함수 A P I **************


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;여기서 부터 보조컴퓨터용 2번째 스크립트 입니다 ;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;적이없는 안전한 위치가 확인되면 파티초대 신청을 합니다 ;;;;;

Loop
{
sleep,100
WinMove,디아블로 III,,0,0,1282,944
gosub,건달
gosub,멀티플레이어체크
gosub,퀘스트확인창
gosub,퀘스트비수락
gosub,초대수락
gosub,초대나가기확인
}
초대수락:
        imagesearch,vx,vy,1070,663,1200,854,*30, %A_scriptDir%\image\초대수락.bmp
        If errorLevel = 0
        {
                MouseClick, left,  1116,  810
                return
        }
return

초대나가기확인:
        imagesearch,vx,vy,472,541,603,577,*30, %A_scriptDir%\image\초대나가기확인.bmp
        If errorLevel = 0
        {
                MouseClick, left,  546,  559
                return
        }
return

건달:
imagesearch,vx,vy,562,57,620,97,*30 %A_scriptDir%\image\건달.bmp
If errorLevel = 0
{
MouseClick, left,  573,  304
return
}
return

멀티플레이어체크:
imagesearch,vx,vy,955,663,1060,689,*30 %A_scriptDir%\image\멀티플레이어창.bmp
If errorLevel = 0
{
MouseClick, left,  1211,  677
return
}
return