기본적으로 800x480 160dpi 에서 돌아가는 스크립트이나..
상황과 스크립트가 다 다르기 때문에 참고만 하셔서 스크립트에 짜 넣어주시면 됩니다.
주석없는 스크립트에 이글을 적으면서 즉흥적으로 다는 주석이기에.. 해석이 틀릴수도 있습니다.
이해 안가는부분이나 주석 잘못된부분 질문주시면 최대한 답변해보겠습니다.
//인벤정리 스크립트의 시작
:invenclear
//마을에서 장비 버튼 인식 및 클릭
getcolor #color #invenx #inveny
if #color == #invenc
touchPress 0 #invenx #inveny
sleep 4000
goto :itemsell
endif
//인식 못할경우는 곧 팝업창이 떳을때 이므로 팝업창 제거 분기로 이동.
goto :popup
//itemsell 분기를 반복실행가능하게 하고 스크립트가 헛돌경우 스크립트를 멈추고 오류메세지를 email 로 보내기 위한 분기.
:loopitemsell
#loopitemcount = #loopitemcount + 1
if #loopitemcount == 100
goto :email
endif
goto:itemsell
:itemsell
//장비창 안에서 좌상단의 장비 버튼 클릭 하여 장비가 위로오게 정렬.
touchPress 0 406 26
sleep 300
// 가방사이즈 체크해서 정리할수있는 가방사이즈를 넘어설경우 이메일로 오류보고.
if #bag > #bagsize
goto :email
endif
// 인벤의 빈좌표를 인식하여 인벤이 비어있다면 나가기를 클릭하고 팝업 제거 분기로 이동.
getcolor #color #inven1x #inven1y
if #color == #inven1c
touchPress 0 60 34
sleep 1000
#invenfull = 0
#bag = 1
goto :popup
endif
//인벤 총 16칸을 일일이 색값을 체크하여, 보라~흰색 일경우 sell 분기로 이동.
getcolor #color2 #item1x #item1y
if #color2 == #purple or #color2 == #blue or #color2 == #green or #color2 == #white
#tempx = #item1x
#tempy = #item1y + 30
goto :sell
endif
//인벤 총 16칸을 일일이 색값을 체크하여, 보라~흰색 일경우 sell 분기로 이동.
getcolor #color3 #item1x #item2y
if #color3 == #purple or #color3 == #blue or #color3 == #green or #color3 == #white
#tempx = #item1x
#tempy = #item2y + 30
goto :sell
endif
getcolor #color4 #item1x #item3y
if #color4 == #purple or #color4 == #blue or #color4 == #green or #color4 == #white
#tempx = #item1x
#tempy = #item3y + 30
goto :sell
endif
getcolor #color5 #item1x #item4y
if #color5 == #purple or #color5 == #blue or #color5 == #green or #color5 == #white
#tempx = #item1x
#tempy = #item4y + 30
goto :sell
endif
getcolor #color6 #item2x #item1y
if #color6 == #purple or #color6 == #blue or #color6 == #green or #color6 == #white
#tempx = #item2x
#tempy = #item1y + 30
goto :sell
endif
getcolor #color7 #item2x #item2y
if #color7 == #purple or #color7 == #blue or #color7 == #green or #color7 == #white
#tempx = #item2x
#tempy = #item2y + 30
goto :sell
endif
getcolor #color8 #item2x #item3y
if #color8 == #purple or #color8 == #blue or #color8 == #green or #color8 == #white
#tempx = #item2x
#tempy = #item3y + 30
goto :sell
endif
getcolor #color9 #item2x #item4y
if #color9 == #purple or #color9 == #blue or #color9 == #green or #color9 == #white
#tempx = #item2x
#tempy = #item4y + 30
goto :sell
endif
getcolor #color2 #item3x #item1y
if #color2 == #purple or #color2 == #blue or #color2 == #green or #color2 == #white
#tempx = #item3x
#tempy = #item1y + 30
goto :sell
endif
getcolor #color3 #item3x #item2y
if #color3 == #purple or #color3 == #blue or #color3 == #green or #color3 == #white
#tempx = #item3x
#tempy = #item2y + 30
goto :sell
endif
getcolor #color4 #item3x #item3y
if #color4 == #purple or #color4 == #blue or #color4 == #green or #color4 == #white
#tempx = #item3x
#tempy = #item3y + 30
goto :sell
endif
getcolor #color5 #item3x #item4y
if #color5 == #purple or #color5 == #blue or #color5 == #green or #color5 == #white
#tempx = #item3x
#tempy = #item4y + 30
goto :sell
endif
getcolor #color6 #item4x #item1y
if #color6 == #purple or #color6 == #blue or #color6 == #green or #color6 == #white
#tempx = #item4x
#tempy = #item1y + 30
goto :sell
endif
//인벤 총 16칸을 일일이 색값을 체크하여, 보라~흰색 일경우 sell 분기로 이동.
getcolor #color7 #item4x #item2y
if #color7 == #purple or #color7 == #blue or #color7 == #green or #color7 == #white
#tempx = #item4x
#tempy = #item2y + 30
goto :sell
endif
getcolor #color8 #item4x #item3y
//4번째줄 왼쪽에서 3번째칸의 아이템 색을 체크하고 주황/빨강색이고 마지막 (인벤 다뚫으면 가방이 총 4개..)가방이라면 email 분기로 이동하여 오류메세지 전송.
//히로매크로는 우측으로 90도 돌려서 이미지를 보기때문에 스크립트 상으론 4x 3y 로 표시되나 실제 게임상으론 3x 4y .
if #bag == #bagsize and #color8 == orange
goto :email
elseif #bag == #bagsize and #color8 == red
goto :email
endif
if #color8 == #purple or #color8 == #blue or #color8 == #green or #color8 == #white
#tempx = #item4x
#tempy = #item3y + 30
goto :sell
endif
getcolor #color9 #item4x #item4y
if #bag == #bagsize and #color9 == #orange
goto :email
elseif #bag == #bagsize and #color9 == #red
goto :email
endif
// 인벤칸 4x 4y를 체크하여 마지막 가방이 아니고, 주황-빨강 색일경우 다음 가방으로 이동.
if #color9 == #red or #color9 == #orange
#bag = #bag + 1
touchPress 0 59 647
sleep 3000
goto :loopitemsell
endif
if #color9 == #purple or #color9 == #blue or #color9 == #green or #color9 == #white
#tempx = #item4x
#tempy = #item4y + 30
goto :sell
endif
//sell 분기로 무작정 이동하지 않기위한 goto 문.
goto :loopitemsell
:sell
//윗 분기에서 받아온 아이템 좌표를 클릭한이후 판매 - 일괄판매 선택.?
//이때 이벤트중이라 포션판매는 처리되지 않기에 차후 이벤트 종료시 포션 판매 처리는 sell 분기에서 처리하면됨.
touchPress 0 #tempx #tempy
sleep 2000
touchPress 0 42 534
sleep 1000
touchPress 0 160 317
sleep 2000
//동급이하 판매가 없는 템 (이벤트템과 ss, sss템) 을 실수로 잘못 클릭할경우, x를 눌러 나가기.
getcolor #color #itemoutx #itemouty
if #color == #white
touchPress 0 #itemoutx #itemouty
sleep 2000
else
sleep 5000
endif
//loopitemsell 분기로 보내서 헛돌고있는지 체크하고 itemsell 분기를 재차 실행.
goto :loopitemsell