Jump to content

Help please


Recommended Posts

HotKeySet("{ESC}", "MyExit")

While 1 ; repeat statements over

; look for monster and attack him

$CoordMonster = PixelSearch ( 972,101,1006,131,0xbd0000,34 )

If Not @error Then

MouseClick ( "Right" , $CoordMonster[0], $CoordMonster[1] , 1,1)

EndIf

; if mana is empty replenish it

If PixelGetColor( 119, 780) = (0x94929c) Then

For $i = 3 to $i = 1 Step -1

Send("{F7}")

Sleep(2000)

Next

EndIf

Wend

Func MyExit()

Exit

EndFunc

this is just a code i used for something else,,, how can i change it so that the exit hotkey is shift?

and instead of attacking monster, how can i make it so

if there is FFFFFF in 972,101,1006,131, then move mouse to 0,0

Link to comment
Share on other sites

hotkeyset("{lshift}", "MyExit")

thats all you have to do

I left this one for you B):o


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

To answer both of your questions (also adapting Nuffilein's answer):

; Declare your variables!
Local $Monster, $i

HotkeySet('{LSHIFT}', 'MyExit')
HotkeySet('{RSHIFT}', 'MyExit')

; Loop indefinitely
While 1

; Search for monster
    $Monster = PixelSearch(972, 101, 1006, 131, 0xBD0000, 34)
    If Not @Error Then MouseMove(0, 0, 0)
    
; Replenish empty mana
    If PixelGetColor(119, 780) = 0x94929C Then
        For $I = 1 To 3
            Send('{F7}')
            Sleep(2000)
        Next
    EndIf

; Pause briefly to avoid excessive CPU
    Sleep(100)
    
WEnd

Func MyExit()
    Exit
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...