컴퓨터&매크로/오토핫키_중급

[오토핫키스크립트]J게임 매크로

릭나스 2014. 11. 12. 10:30
반응형

;////////////////////////////프로그램의 젤 위에 붙여주세요//////////////////////////

#Persistent

SetControlDelay , -1

SetKeyDelay , -1

SetMouseDelay -1

SetWinDelay -1

SetBatchLines -1

CoordMode ,Relative, mouse ,Pixel


Ver = 1.0.4

dates = 2014-01-20

count = 0

sleeptime = 1

itm_cnt = 0


주소 = MCmbTUbk

;====================================================================================================================================================================================================;


;====================================================================================================================================================================================================;

; 버젼확인

filedelete,C:\version

URLDownloadToFile, http://pastebin.com/raw.php?i=%주소%, C:\Version

FileReadLine,version,C:\version,1

fileread, sts,C:\version

StringLen,Delete,Version

delete := delete+2

StringTrimLeft, text, sts, %delete%

filedelete,C:\version


if (ver >= version)

msgbox,제노니아 매크로 ver. %version% 입니다. `n개발일자 %dates% `n확인버튼 클릭 시 정상 사용 가능합니다.


}


if (ver < version)

{

msgbox,새 업데이트가 필요합니다.`n제노니아 매크로 ver.  %ver% -> 제노니아 매크로 ver.  %version%`n`n확인버튼 클릭 시 다운로드 페이지로 이동합니다.

run ,  iexplore.exe http://nannayabyc.blog.me/80204637116

exitapp

}



;====================================================================================================================================================================================================;


;====================================================================================================================================================================================================;

gui,add,text,x2 w180 vtext Center 

Gui, Add, Text, x2 y30 w180 h80 cBlue Center , 제노니아 Macro ver. %version%  `n`n개발일자 %dates% `n`n Created by MacroMaker


Gui, Font, s12 w700 cNavy

Gui, Add, Text, x2 y130 w180 h40 Center vsearch,  매크로 시작전입니다

Gui, Font, s9 norm cDefault


Gui, Add, Text, x2 y180 w180 h20 Center vcount,  %count% 회 돌았습니다.

Gui, Add, Text, x20 y230 w180 h20 Left ,비활성

Gui, Add, Button, x2 y250 w70 h30 cNavy gNote, 노트2`n갤2 LTE

Gui, Add, Button, x2 y280 w70 h30 gs2, 갤2

Gui, Add, Button, x2 y310 w70 h30 gpatch, 패치노트

Gui, Add, Button, x2 y340 w70 h30 ghelp, 홈페이지

Gui, Add, Button, x72 y250 w110 h60 gstart_game, 매크로 시작

Gui, Add, Button, x72 y310 w110 h30 gbpause, 미사용

Gui, Add, Button, x72 y340 w110 h30 gbreload, 재기동

Gui, Add, DropDownList, x200 y350 w40 h20 r7 vc_wait_time,

Gui, Add, Text, x200 y330 w200 h20 Left ,던전 최소시간을 설정합니다.

Gui, Add, Text, x242 y355 w20 h20 Left ,분


Gui, Add, DropDownList, x400 y350 w100 h20 r7 vc_hp_type,

Gui, Add, Text, x400 y330 w200 h20 Left ,핸드폰 기종선택


i := 1

loop 10 {

GuiControl,, c_wait_time, %i%

i++

}

GuiControl, choose , c_wait_time, 1


GuiControl,, c_hp_type , galaxyS2

GuiControl,, c_hp_type , galaxyS2lte

GuiControl,, c_hp_type , galaxyS3

GuiControl,, c_hp_type , galaxynote2


GuiControl, choose , c_hp_type ,1


;Gui, Add, edit, x200 y340 w300 h30 vsleeptime, 던전 최소 소요시간을 입력해주세요 2분 = 2 * 60 * 1000


Gui, Add, Picture, x200 y70 w400 h240 Center vimage, 

; Generated using SmartGUI Creator for SciTE

Gui, Show, AutoSize, 제노니아 Macro Created by MacroMaker


settimer,time,1000



file_name = %A_Workingdir%\제노니아config\제노니아.cfg

log_detail = %A_Workingdir%\제노니아_log\제노니아_log.txt



ifNotExist, 제노니아_config\

{

FileCreateDir, 제노니아_config\

}


ifNotExist, 제노니아_log\

{

FileCreateDir, 제노니아_log\

}


ifExist, %log_detail%

{

FileGetSize, old_file_size, %log_detail%


if ( old_file_size > 10000000 ) {

FileDelete, %log_detail%

}

}

return



;====================================================================================================================================================================================================;


;====================================================================================================================================================================================================;


log_write(type_select, sentence){

global log_detail

global reboot_log


if ( type_select = 1 ) {

FileAppend, [%A_Mon%-%A_Mday%-%A_Hour%:%A_Min%:%A_Sec%:%A_MSec%][%sentence%]`n, %log_detail%

} else if ( type_select = 2 ){

FileAppend, [%sentence%]`n, %log_detail%

} else if ( type_select = 3 ){

FileAppend, [%A_Mon%-%A_Mday%-%A_Hour%:%A_Min%:%A_Sec%:%A_MSec%][%sentence%]`n, %reboot_log%

}

}



;search function

search(name)

{

global x   ; X좌표값

global y   ; Y좌표값

error=1     ; 리턴값

num = 1   ; 조회순서


loop

{

ifexist,%A_Workingdir%\%name%%num%.png     ; 이미지가 존재한다면 실행한다

imagesearch,x,y,0,0, *10  A_screenwidth,A_screenheight,%A_Workingdir%\%name%%num%.png      ;name  + num  으로 조합된 이미지 파일을 검색한다

else

{

if num=1               

return 1

else

return errorlevel

}

if errorlevel=1        ;num = 1 발견실패시  2번으로 이동

num+=1

else

{

error=0 ;발견시 리턴값 0

return errorlevel

}

}

}

return





pixsearch(name,color,x1,y1,x2,y2)

{

GuiControl,,search, %name%검색중..

global x

global y

loop ,3

{

PixelSearch, x, y, x1, y1, x2 ,y2 , color, 3, fast

if ErrorLevel 

{

return 1

}

else

{

GuiControl,,search, %name% 발견

return 0

}

}

}

return




check(name)

{

if search(name)=0

msgbox,%name%%num% 발견

}

return



;====================================================================================================================================================================================================;

;====================================================================================================================================================================================================;

image:

WinWait, ViewerWnd, 

IfWinNotActive, ViewerWnd, , WinActivate, ViewerWnd, 

WinWaitActive, ViewerWnd, 

Send, {CTRLDOWN}1{CTRLUP}

sleep , 300

Loop C:\Users\Public\Documents\Rsupport\Mobizen\*.*

GuiControl, , image ,C:\Users\Public\Documents\Rsupport\Mobizen\%A_LoopFileName%

filedelete C:\Users\Public\Documents\Rsupport\Mobizen\*.* 

WinWait, 제노니아 Macro Created by MacroMaker, 

IfWinNotActive, 제노니아 Macro Created by MacroMaker, , WinActivate, 제노니아 Macro Created by MacroMaker, 

WinWaitActive, 제노니아 Macro Created by MacroMaker, 

return


;====================================================================================================================================================================================================;

;던전사냥 시작

;====================================================================================================================================================================================================;


start_game:


loop

{

gui,submit,nohide

gosub ,image

if itm_cnt = 10

{

GuiControl,,search , 아이템 판매루트로 진입합니다.

sleep , 5000

gosub , item

}

else if pixsearch("던전1",0x1002EF,542,251,558,267) = 0

{

if  c_hp_type = galaxyS2

{

controlclick, x381 y184,ViewerWnd  ;던전

log_write( 1 , "던전을 발견했습니다.")

gosub ,image

sleep , 3000

}

else

{

controlclick, x409 y181,ViewerWnd  ;던전

log_write( 1 , "던전을 발견했습니다.")

gosub ,image

sleep , 3000

}

}

else if pixsearch("던전2",0xFBF1DF,542,251,558,267) = 0

{

if c_hp_type = galaxyS2

{

controlclick, x381 y184,ViewerWnd  ;던전

log_write( 1 , "던전을 발견했습니다.")

gosub ,image

sleep , 3000

}

else

{

controlclick, x409 y181,ViewerWnd  ;던전

log_write( 1 , "던전을 발견했습니다.")

gosub ,image

sleep , 3000

}

}

else if pixsearch("던전3",0x0A01E7,542,251,558,267) = 0

{

if c_hp_type = galaxyS2

{

controlclick, x381 y184,ViewerWnd  ;던전

log_write( 1 , "던전을 발견했습니다.")

gosub ,image

sleep , 3000

}

else

{

controlclick, x409 y181,ViewerWnd  ;던전

log_write( 1 , "던전을 발견했습니다.")

gosub ,image

sleep , 3000

}

}

else if pixsearch("던전선택-초기",0x7FBDF8,358,272,446,284) = 0 

{

controlclick, x222 y208,ViewerWnd  ;맵선택

log_write( 1 , "던전선택을 발견했습니다. ")

gosub ,image

sleep , 3000

}

else if pixsearch("던전선택-노말",0xE0AA00,358,272,446,284) = 0 

{

controlclick, x219 y207,ViewerWnd   ;입장

log_write( 1 , "던전선택(노말)을 발견했습니다.")

gosub ,image

sleep , 3000

}

else if pixsearch("던전선택-하드",0x2A2BC9,358,272,446,284) = 0 ;

{

controlclick, x219 y207,ViewerWnd   ;입장

log_write( 1 , "던전선택(하드)을 발견했습니다.")

gosub ,image

sleep , 3000

}

else if pixsearch("던전선택-헬",0x2A2BC9,358,272,446,284) = 0 

{

controlclick, x219 y207,ViewerWnd   ;입장

log_write( 1 , "던전선택-헬을 발견했습니다.")

gosub ,image

sleep , 3000

}

else if pixsearch("던전입장",0x5BAE00,469,261,550,281) = 0 

{

controlclick, x333 y191,ViewerWnd   ;입장

log_write( 1 , "던전입장을 발견했습니다.")

gosub ,image

sleep , 3000

}

else if pixsearch("사냥방식",0x75CC00,330,205,472,226) = 0

{

controlclick, x222 y128,ViewerWnd    ;;솔플확인

log_write( 1 , "사냥방식을 발견했습니다..")

gosub ,image

sleep , 3000

}

else if pixsearch("자동사냥",0xEFD219,377,323,444,332) = 0

{

gosub ,image

controlclick, x243 y251,ViewerWnd  ; 자동사냥

log_write( 1 , "자동사냥을 발견했습니다..")

if  c_wait_time = 1

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 1 * 60 * 1000

}

else if  c_wait_time = 2

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 2 * 60 * 1000

}

else if  c_wait_time = 3

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 3 * 60 * 1000

}

else if  c_wait_time = 4

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 4 * 60 * 1000

}

else if  c_wait_time = 5

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 5 * 60 * 1000

}

else if  c_wait_time = 6

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 6 * 60 * 1000

}

else if  c_wait_time = 7

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 7 * 60 * 1000

}

else if  c_wait_time = 8

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 8 * 60 * 1000

}

else if  c_wait_time = 9

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 9 * 60 * 1000

}

else if  c_wait_time = 10

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 10 * 60 * 1000

}

}

else if pixsearch("아이템",0x0F689A,357,168,400,210) = 0

{

gosub ,image

log_write( 1 , "아이템을 발견했습니다..")

controlclick, x222 y127,ViewerWnd  ;아이템

sleep , 10000

}

else if pixsearch("마을1",0xEFBF54,571,307,589,322) = 0

{

controlclick, x431 y250,ViewerWnd  ;마을

log_write( 1 , "마을을 발견했습니다..")

gosub ,image

sleep , 3000

count++

itm_cnt++

GuiControl,,count,%count% 회 돌았습니다.

}

else if pixsearch("마을2",0x5C3C0C,571,307,589,322) = 0

{

controlclick, x431 y250,ViewerWnd  ;마을

log_write( 1 , "마을을 발견했습니다..")

gosub ,image

sleep , 3000

count++

itm_cnt++

GuiControl,,count,%count% 회 돌았습니다.

}

else if pixsearch("마을3",0xEFA33F,571,307,589,322) = 0

{

controlclick, x431 y250,ViewerWnd  ;마을

log_write( 1 , "마을을 발견했습니다..")

gosub ,image

sleep , 3000

count++

itm_cnt++

GuiControl,,count,%count% 회 돌았습니다.

}

else if pixsearch("마을4",0xECB543,571,307,596,330) = 0

{

controlclick, x431 y250,ViewerWnd  ;마을

log_write( 1 , "마을을 발견했습니다.")

gosub ,image

sleep , 3000

count++

itm_cnt++

GuiControl,,count,%count% 회 돌았습니다.

}

else if pixsearch("사망.....",0xDCCE79,311,275,392,301) = 0

{

controlclick, x159 y215,ViewerWnd  

log_write( 1 , "사망을 발견했습니다..")

gosub ,image

sleep , 3000

count++

GuiControl,,count,%count% 회 돌았습니다.

}

else if pixsearch("젠상점 클릭1",0x5655CF,339,198,483,274) = 0

{

controlclick, x222 y180,ViewerWnd  

log_write( 1 , "알림창을 발견했습니다..")

gosub ,image

sleep , 3000

}

else if pixsearch("아이템상점",0x3972D9,410,320,465,329) = 0

{

controlclick, x26 y13,ViewerWnd  ;마을

log_write( 1 , "아이템상점에서 빠져나옵니다.")

gosub ,image

sleep , 3000

}

else if pixsearch("케릭정보창",0x3CB1FC,364,146,462,178) = 0

{

controlclick, x26 y13,ViewerWnd  ;마을

log_write( 1 , "케릭정보창에서 빠져나옵니다.")

gosub ,image

sleep , 3000

}

else

{

GuiControl,,search, Nothing Found `n2sec wait!

sleep , 2000

}

}




item:


if c_hp_type = galaxyS2

{

controlclick, x350 y247,ViewerWnd  ;NPC

sleep , 1000

controlclick, x182 y101,ViewerWnd  ;여자

sleep , 1000

controlclick, x346 y250,ViewerWnd  ;팔기

sleep , 1000

loop , 20

{

controlclick, x160 y93,ViewerWnd  ; 아이템

sleep , 800

controlclick, x357 y215,ViewerWnd  ;판매

sleep , 800

controlclick, x222 y188,ViewerWnd  ;확인

sleep , 800

}

sleep , 1000

controlclick, x67 y129,ViewerWnd  ;장신구

loop , 10

{

controlclick, x160 y93,ViewerWnd  ; 아이템

sleep , 800

controlclick, x357 y215,ViewerWnd  ;판매

sleep , 800

controlclick, x222 y188,ViewerWnd  ;확인

sleep , 800

send , {esc}

sleep , 5000

gosub,image

itm_cnt = 0

}

else

{

controlclick, x376 y250,ViewerWnd  ;NPC

sleep , 1000

controlclick, x196 y109,ViewerWnd  ;여자

sleep , 1000

controlclick, x346 y243,ViewerWnd  ;팔기

sleep , 1000

loop , 15

{

controlclick, x172 y93,ViewerWnd  ; 아이템

sleep , 800

controlclick, x357 y215,ViewerWnd  ;판매

sleep , 800

controlclick, x236 y186,ViewerWnd  ;확인

sleep , 800

}

sleep , 1000

controlclick, x67 y129,ViewerWnd  ;장신구

loop , 10

{

controlclick, x172 y93,ViewerWnd  ; 아이템

sleep , 800

controlclick, x357 y215,ViewerWnd  ;판매

sleep , 800

controlclick, x236 y186,ViewerWnd  ;확인

sleep , 800

send , {esc}

sleep , 5000

gosub,image

itm_cnt = 0

}


return



reboot:

return


breload:

Reload

return


help:

run ,  iexplore.exe http://nannayabyc.blog.me/80204637116

return


^f5::

check("던전")

check("던전선택")

MsgBox, 이미지 체크 종료

return


^`::  ; Control+Alt+Z hotkey.

gui,submit,nohide

MouseGetPos, MouseX, MouseY

PixelGetColor, color, %MouseX%, %MouseY%

MsgBox The color at the current cursor position is %color%||%MouseX%|| %MouseY%.

return


bpause:

return


note:

;노트 2


GuiControl,,search, 비활성 Note2 갤2LTE 시작

loop

{

gui,submit,nohide

 controlclick, x417 y186,ViewerWnd  ;던전

GuiControl,,search, 던전

Sleep, 1500

 controlclick, x240 y208,ViewerWnd  ;맵선택

 GuiControl,,search, 맵선택

Sleep, 1500

 controlclick, x240 y208,ViewerWnd  ; 던전선택

GuiControl,,search, 던전선택

Sleep, 1500

 controlclick, x362 y199,ViewerWnd  ; 던전입장

GuiControl,,search, 던전입장

Sleep, 1500

 controlclick, x237 y128,ViewerWnd  ; 솔플

GuiControl,,search, 솔플

Sleep, 15000

 controlclick, x243 y251,ViewerWnd  ; 자동사냥

GuiControl,,search, 자동사냥

if  c_wait_time = 1

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 1 * 60 * 1000

}

 else if  c_wait_time = 2

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 2 * 60 * 1000

}

 else if  c_wait_time = 3

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 3 * 60 * 1000

}

 else if c_wait_time = 4

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 4 * 60 * 1000

}

 else if c_wait_time = 5

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 5 * 60 * 1000

}

 else if c_wait_time = 6

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 6 * 60 * 1000

}

 else if  c_wait_time = 7

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 7 * 60 * 1000

}

 else if c_wait_time = 8

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 8 * 60 * 1000

}

 else if c_wait_time = 9

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 9 * 60 * 1000

}

 else if c_wait_time = 10

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 10 * 60 * 1000

}

 controlclick, x245 y127,ViewerWnd  

 GuiControl,,search, 아이템

Sleep, 15000

 controlclick, x451 y247,ViewerWnd 

 GuiControl,,search, 마을

Sleep, 15000

}

return


s2:

GuiControl,,search, 비활성 갤럭시S2 시작

;~ ;갤2

loop

{

gui,submit,nohide

 controlclick, x381 y184,ViewerWnd  ;던전

 GuiControl,,search, 던전

Sleep, 1500

 controlclick, x222 y208,ViewerWnd  ;맵선택

 GuiControl,,search, 맵선택

Sleep, 1500

 controlclick, x222 y208,ViewerWnd  ; 던전선택

 GuiControl,,search, 던전선택

Sleep, 1500

 controlclick, x333 y191,ViewerWnd  ; 던전입장

 GuiControl,,search, 던전입장

Sleep, 1500

 controlclick, x222 y128,ViewerWnd  ; 솔플

 GuiControl,,search, 솔플

Sleep, 15000

 controlclick, x243 y251,ViewerWnd  ; 자동사냥

 GuiControl,,search, 자동사냥

 if c_wait_time = 1 

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 1 * 60 * 1000

}

 else if c_wait_time = 2

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 2 * 60 * 1000

}

 else if c_wait_time = 3

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 3 * 60 * 1000

}

 else if c_wait_time = 4

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 4 * 60 * 1000

}

 else if c_wait_time = 5

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 5 * 60 * 1000

}

 else if c_wait_time = 6

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 6 * 60 * 1000

}

 else if c_wait_time = 7

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 7 * 60 * 1000

}

 else if c_wait_time = 8

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 8 * 60 * 1000

}

 else if c_wait_time = 9

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 9 * 60 * 1000

}

 else if c_wait_time = 10

{

GuiControl,,search,  %c_wait_time%분간 대기합니다 

sleep , 10 * 60 * 1000

}

 controlclick, x222 y127,ViewerWnd  

 GuiControl,,search, 아이템

Sleep, 15000

 controlclick, x431 y250,ViewerWnd  

 GuiControl,,search, 마을

Sleep, 15000

}

return



^f3::


Pause


time: 

FormatTime, time, , h:mm:ss tt 

guicontrol,,text,%time% 

return



patch:

msgbox ,4160, 패치노트, 1.0.0 기본프로그램 구현`n1.0.1 galaxyS2lte|galaxyS3|galaxynote2 단위테스트 완료`n        비활성매크로 내장`n1.0.2 아이템 판매추가 ( 10판마다 한번씩)

msgbox, 4160, 패치노트, 업데이트 예정 X  


return

s2lte:

return


guiclose:

exitapp



728x90