'피싱마스터 매크로'에 해당되는 글 1건

  1. 2017.11.29 피싱마스터 매크로 만들기 [비활성]

피싱마스터 매크로 만들기



안녕하세요 :)


이번 포스팅은 피싱마스터 모바일 게임

매크로만들기에 관한 포스팅을 하겠습니다.


피싱마스터 모바일 게임은 낚시 게임으로

낚시의 캐스팅, 챔질, 릴링의 요소가 잘갖추어진 

게임으로 실제 낚시형태와 유사한듯합니다.



포스팅순서는 피싱마스터 게임에대한 간략한 소개와

비활성 이미지서치에대한 포스팅을 하도록 하겠습니다.


시작하기전 당부의 말씀을 드리면 본 포스팅은 프로그램 배포는 하지않습니다.

제작방법을 알려드리는 포스팅 이며 제작방법에 대한 강의나 스크립트 의뢰는 가능합니다 :D


피싱마스터 매크로 만들기 피싱마스터 매크로 만들기

피싱마스터 매크로 만들기 피싱마스터 매크로 만들기


피싱마스터 모바일 게임 



게임빌에서 개발한 모바일 낚시 게임으로 , 에너지를 소모하여 플레이 할 수 있습니다.

에너지는 일정시간이후 회복이 되거나, 캐시 구매를 통해 얻을수 있는 스타로 구매할 수 있습니다.


기본 조작은 낚시대를 물가로 던지는 캐스팅과, 낚아올리는 챔질, 물고기를 끌고오는 릴링으로

구성되어 있으며 물고기의 상태에 따라 게이지등 공략에 약간의 차이가 있습니다.


낚시 게임이지만 특유의 그래픽적인 요소도 잘 살려낸 게임 입니다.

각 캐릭터마다 다양한 코스튬을 장착 할 수 있으며 다양한 미끼를 사용할 수 있습니다.



피싱마스터 매크로 만들기 피싱마스터 매크로 만들기


피싱마스터 매크로 만들기 피싱마스터 매크로 만들기

피싱 마스터 매크로 제작 - 매크로 제작 방법은 ?


전체 소스를 공개하기에는 무리가 있어 

제작방법에 대한 안내의 포스팅으로 진행하겠습니다.


아래는 피싱마스터 매크로를 제작할때 사용한 비활성 이미지서치 함수와에 대한

안내가 있으니 직접 제작해보실 분들은 관련 함수를 참고하시면 좋을듯합니다.



오토핫키 스크립트 작성법이나 다른 스크립트 제작의뢰도 같이 받고있습니다.

이메일 : cai6452@naver.com


피싱마스터 매크로 만들기 피싱마스터 매크로 만들기

피싱마스터 매크로 - 스크립트 제작방법



물론 이미지서치는 굳이 비활성 이미지서치를 사용할 필요는 없습니다.

활성 ImageSearch 명령어로도 충분히 제작이 가능하며 

오히려 더 쉽게 코드를 작성 할 수 있습니다.


* Gdip ImageSearch를 사용하기 위해서는 Gdip 라이브러리가 필요합니다.


1.    먼저 반복구문의 형태를 구성해야 합니다. 

Loop 문으로 할건지, Settimer 로 할건지 Goto 로 할건지 정한이후

반복구문안에 이미지서치 함수를 사용하여 조건문을 구성합니다.


2.    이미지서치 성공의 경우 ControlClick 혹은 MouseClick 명령어를 사용해서 

클릭이벤트를 발생 합니다. 끊김이나 오류없는 반복을 위해서는 예외로 나타날수있는

팝업 메세지나 문구에대한 이미지 반응도 염두하여 코드를 작성해야 합니다.



Gdip_ImageSearch(pBitmapHaystack,pBitmapNeedle,ByRef OutputList=""

,OuterX1=0,OuterY1=0,OuterX2=0,OuterY2=0,Variation=0,Trans=""

,SearchDirection=1,Instances=1,LineDelim="`n",CoordDelim=",") {


    ; Some validations that can be done before proceeding any further

    If !( pBitmapHaystack && pBitmapNeedle )

        Return -1001

    If Variation not between 0 and 255

        return -1002

    If ( ( OuterX1 < 0 ) || ( OuterY1 < 0 ) )

        return -1003

    If SearchDirection not between 1 and 8

        SearchDirection := 1

    If ( Instances < 0 )

        Instances := 0


    ; Getting the dimensions and locking the bits [haystack]

    Gdip_GetImageDimensions(pBitmapHaystack,hWidth,hHeight)

    ; Last parameter being 1 says the LockMode flag is "READ only"

    If Gdip_LockBits(pBitmapHaystack,0,0,hWidth,hHeight,hStride,hScan,hBitmapData,1)

    OR !(hWidth := NumGet(hBitmapData,0))

    OR !(hHeight := NumGet(hBitmapData,4))

        Return -1004


    ; Careful! From this point on, we must do the following before returning:

    ; - unlock haystack bits


    ; Getting the dimensions and locking the bits [needle]

    Gdip_GetImageDimensions(pBitmapNeedle,nWidth,nHeight)

    ; If Trans is correctly specified, create a backup of the original needle bitmap

    ; and modify the current one, setting the desired color as transparent.

    ; Also, since a copy is created, we must remember to dispose the new bitmap later.

    ; This whole thing has to be done before locking the bits.

    If Trans between 0 and 0xFFFFFF

    {

        pOriginalBmpNeedle := pBitmapNeedle

        pBitmapNeedle := Gdip_CloneBitmapArea(pOriginalBmpNeedle,0,0,nWidth,nHeight)

        Gdip_SetBitmapTransColor(pBitmapNeedle,Trans)

        DumpCurrentNeedle := true

    }


    ; Careful! From this point on, we must do the following before returning:

    ; - unlock haystack bits

    ; - dispose current needle bitmap (if necessary)


    If Gdip_LockBits(pBitmapNeedle,0,0,nWidth,nHeight,nStride,nScan,nBitmapData)

    OR !(nWidth := NumGet(nBitmapData,0))

    OR !(nHeight := NumGet(nBitmapData,4))

    {

        If ( DumpCurrentNeedle )

            Gdip_DisposeImage(pBitmapNeedle)

        Gdip_UnlockBits(pBitmapHaystack,hBitmapData)

        Return -1005

    }

    

    ; Careful! From this point on, we must do the following before returning:

    ; - unlock haystack bits

    ; - unlock needle bits

    ; - dispose current needle bitmap (if necessary)


    ; Adjust the search box. "OuterX2,OuterY2" will be the last pixel evaluated

    ; as possibly matching with the needle's first pixel. So, we must avoid going

    ; beyond this maximum final coordinate.

    OuterX2 := ( !OuterX2 ? hWidth-nWidth+1 : OuterX2-nWidth+1 )

    OuterY2 := ( !OuterY2 ? hHeight-nHeight+1 : OuterY2-nHeight+1 )


    OutputCount := Gdip_MultiLockedBitsSearch(hStride,hScan,hWidth,hHeight

    ,nStride,nScan,nWidth,nHeight,OutputList,OuterX1,OuterY1,OuterX2,OuterY2

    ,Variation,SearchDirection,Instances,LineDelim,CoordDelim)


    Gdip_UnlockBits(pBitmapHaystack,hBitmapData)

    Gdip_UnlockBits(pBitmapNeedle,nBitmapData)

    If ( DumpCurrentNeedle )

        Gdip_DisposeImage(pBitmapNeedle)


    Return OutputCount

}



피싱마스터 매크로 만들기 피싱마스터매크로 매크로 피싱마스터

Posted by Khan64
,