티스토리 뷰

오토핫키로 만드는 비활성 테라M매크로 ver6입니다. 기존 스크립트로 작업을 시키면 인벤토리가 가득차서 진행이 안되는 경우가 생깁니다. 인벤토리를 루비를 주고 많이 늘려놨으면 덜 불편 하겠지만, 인벤토리가 작은 분들은 많이 불편하게되죠, 그랫 이번 시간에는 던전에 들어가서 인벤토리를 한번씩 비워주는 작업을 할겁니다. 


인벤토리를 비우는 경우는 좌표값만을 사용하면 되는데요, 좌표값을 이미지로 보여드리겠습니다.


제가 구한 아이템 판매 좌표는 위 이미지와 같습니다. 


#01 인벤토리 클릭 327,482 

#02 인벤토리안에서 판매클릭 660,477

#03 일관판매 클릭 734,477

#04 확인 506,388

#05 두번째 확인 385,390

#06 나가기 776,43

이렇게 구했습니다.


판매는 이순서로 좌표값을 클릭해주면 됩니다. 그전에 일관판매의 필터 설정을 해주셔야되는데요, 

제가 설정한 필터는 


이렇게만 판매하게끔 해놓았습니다.

한번설정해놓으면 바뀌지 않으니 이렇게 설정해놓고 하심 됩니다. 


스크립트 보시기전에 구동에 필요한 이미지 파일, ahk, 원본스크립트 txt까지 올려드립니다.

Chapter_21.zip


스크립트 보시겠습니다

gui,show,w300 h350 center,chapter21

gui,Add,Tab,x0 y0 w300 h300 vTAB ,던전|토벌대

gui,Tab,던전

gui,Add,Text, x10 y50 w120 h20 , 독립군 보급기지

gui,Add,Text, x10 y80 w120 h20 , 후카족 마을 수복전

gui,Add,Text, x10 y110 w120 h20 , 밤피르의 저택

gui,Add,Text, x10 y140 w120 h20 , 달의 호수 쟁탈전

gui,Add,Text, x10 y170 w120 h20 , 황금의 미궁

gui,Add,Text, x10 y200 w120 h20 , 왕자의 궁전

gui,Add,Text, x10 y230 w120 h20 , 불의 제단

gui,Add,Edit, x140 y50 w50 h20 vA01 Number, 0

gui,Add,Edit, x140 y80 w50 h20 vA02 Number, 0

gui,Add,Edit, x140 y110 w50 h20 vA03 Number, 0

gui,Add,Edit, x140 y140 w50 h20 vA04 Number, 0

gui,Add,Edit, x140 y170 w50 h20 vA05 Number, 0

gui,Add,Edit, x140 y200 w50 h20 vA06 Number, 0

gui,Add,Edit, x140 y230 w50 h20 vA07 Number, 0

gui,Tab,토벌대

gui,Add,Text, x10 y50 w120 h20 , 벤튤라

gui,Add,Text, x10 y80 w120 h20 , 데미안

gui,Add,Text, x10 y110 w120 h20 , 그림자 기수

gui,Add,Text, x10 y140 w120 h20 , 굴

gui,Add,Text, x10 y170 w120 h20 , 티라누스

gui,Add,Text, x10 y200 w120 h20 , 라우라바

gui,Add,Edit, x140 y50 w50 h20 vB01 Number, 0

gui,Add,Edit, x140 y80 w50 h20 vB02 Number, 0

gui,Add,Edit, x140 y110 w50 h20 vB03 Number, 0

gui,Add,Edit, x140 y140 w50 h20 vB04 Number, 0

gui,Add,Edit, x140 y170 w50 h20 vB05 Number, 0

gui,Add,Edit, x140 y200 w50 h20 vB06 Number, 0


gui,Tab

gui,Add,Checkbox, x10 y260 w200 h20 visSell,아이템을 판매합니다.

#지난 챕터에서 설명했던부분은 넘어갑니다. 스크립트가 너무 길어서 다설명 못드려요 ㅠㅠ

이부분은 checkbox를 넣었습니다 아이템을 판매할지 말지 결정하는 창입니다. check여부는 isSell에 저장합니다.

gui,Add,Button,x0 y300 w150 h50 gStart, Start

gui,Add,Button,x150 y300 w150 h50 gStop, Stop

return


#Include Gdip.ahk

#Include Gdip_ImageSearch.ahk

#Include Search_img.ahk


sellItem(isSell){

#sellItem(isSell)합수를 만들었습니다. isSell은 gui에서 check 여부 입니다.

체크시 값은 "1" 입니다.

if(isSell="1"){

값이 "1" 과 같으면 실행됩니다. 위에서 설명드렸던 좌표들을 1초단위로 클릭합니다.

PostClick(327,482)

sleep,1000

PostClick(660,477)

sleep,1000

PostClick(734,477)

sleep,1000

PostClick(506,388)

sleep,1000

PostClick(385,390)

sleep,1000

PostClick(776,43)

sleep,1000

}

}


PostClick(FoundX,FoundY){

lparam:=FoundX|FoundY<<16

PostMessage,0x201,1,%lparam%,,녹스 플레이어

PostMessage,0x202,0,%lparam%,,녹스 플레이어

Sleep, 1000

}


Auto_D(MatchingName,MatchingY,ClearNum,isSell){

#파라미터로 isSell의 값을 추가로 받아옵니다.

sleep,2000

PostClick(100,MatchingY)

sleep,1000

loop{

WinGet,Nox,ID,녹스 플레이어

if(Search_img("Matching.bmp",Nox,x,y)){

if(ClearNum=0){

break

}

PostClick(x,y)

isAuto:=true

}

if(isAuto){

sleep,2000

PostClick(775,80)

if(Search_img("Auto.bmp",Nox,x,y)){

PostClick(x,y)

isAuto:=false

isSkip:=true

Sleep,2000

#이부분이 퀘스트 수행을 하고 나서 입니다.

sellItem(isSell)

#isSell이 1이면 아이템을 판매합니다.

아래 토벌대도 같은 원리입니다 토벌대는 설명하지 않겠습니다.

}

}

if(isSkip){

sleep,1000

if(Search_img("Plus.bmp",Nox,x,y)=false){

PostClick(775,40)

isSkip:=false

Sleep,1000

}

}

if(Search_img("Matching_Exit.bmp",Nox,x,y)){

ClearNum-=1

GuiControl,,%MatchingName%,%ClearNum%

Gui,Submit,NoHide

sleep,1000

PostClick(x,y)

}

}

}

Auto_T(MatchingName,MatchingY,ClearNum,isSell){

sleep,2000

PostClick(100,MatchingY)

sleep,1000


loop{

WinGet,Nox,ID,녹스 플레이어

if(Search_img("Matching.bmp",Nox,x,y)){

if(ClearNum=0){

break

}

PostClick(x,y)

isAuto:=true

}

if(isAuto){

sleep,2000

PostClick(775,80)

if(Search_img("Auto.bmp",Nox,x,y)){

PostClick(x,y)

isAuto:=false

Sleep,2000

sellItem(isSell)

}

}

if(Search_img("Matching_Exit.bmp",Nox,x,y)){

ClearNum-=1

GuiControl,,%MatchingName%,%ClearNum%

Gui,Submit,NoHide

sleep,1000

PostClick(x,y)

}

}

}


Start:

gui,Submit,NoHide

if(TAB="던전"){

if(A01>0){

Auto_D("A01",140,A01,isSell)

#isSell의 값을 같이 보내줍니다.

}

if(A02>0){

Auto_D("A02",190,A02,isSell)

}

if(A03>0){

Auto_D("A03",240,A03,isSell)

}

if(A04>0){

Auto_D("A04",290,A04,isSell)

}

if(A05>0){

Auto_D("A05",340,A05,isSell)

}

if(A06>0){

Auto_D("A06",390,A06,isSell)

}

if(A07>0){

Auto_D("A07",440,A07,isSell)

}

}else if(TAB="토벌대"){

if(B01>0){

Auto_T("B01",160,B01,isSell)

}

if(B02>0){

Auto_T("B02",210,B02,isSell)

}

if(B03>0){

Auto_T("B03",260,B03,isSell)

}

if(B04>0){

Auto_T("B04",310,B04,isSell)

}

if(B05>0){

Auto_T("B05",360,B05,isSell)

}

if(B06>0){

Auto_T("B06",410,B06,isSell)

}

}

return



Stop:

ExitApp

return


GuiClose:

ExitApp

return


아이템 판매하기까지 해봤습니다. 체크를 해주면 매번 던전을 시작할때마다 아이템을 비워줍니다. 자기전에 켜놓으면 좋겠네요.

댓글