Jump to content
Sign in to follow this  
ecstatic

Func ; Not working

Recommended Posts

ecstatic

K heres my code

Func Pindle()
    Send("{F1}")
    Sleep(250)
    MouseMove(444, 128)
    MouseDown("right")
    MouseUp("right")
    Sleep(250)
    MouseMove(700, 141)
    MouseDown("right")
    MouseUp("right")
    Sleep(250)
    MouseMove(728, 157)
    MouseDown("right")
    MouseUp("right")
    Sleep(250)
    MouseMove(687, 110)
    MouseDown("right")
    MouseUp("right")
    Sleep(250)
    Send("{F3}")
    Sleep(50)
    Do
        Sleep(20)
        $MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters)
        If Not @error Then
            MouseClick("right", $MonsterFind[0], $MonsterFind[1])
        EndIf
    Until 1
    Send("{F1}")
    Sleep(250)
    MouseMove(673, 197)
    MouseDown("right")
    MouseUp("right")
; Pickit
    Sleep(250)
    MouseMove(673, 198)
    MouseDown("right")
    MouseUp("right")
    Sleep(250)
; Walk to halls of anguish so we dont get raped by the xtras
    MouseMove(536, 199)
    MouseDown("left")
    MouseUp("left")
    Sleep(250)
    EndGame()

All this does is teleport to an area.

Then it kills all the modded monsters which are orange, and it is supposed to kill all of them. Hence the loop

Unfortunatly, it doesnt even perform the loop.

Does anyone know why?

Share this post


Link to post
Share on other sites
hendrikhe

Hmm try:

$MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters,100) for a shade-variation

Share this post


Link to post
Share on other sites
ecstatic

Ok

now it is killing 1 monster

but it will not loop until all are gone.

Share this post


Link to post
Share on other sites
Mat

don't play the game personally but

MouseMove(444, 128)
    MouseDown("right")
    MouseUp("right")

??

mouseclick surely as there is no gap between?

3 lines into 1!

also:

sleep (20)

don't bother, thats 1/500 th of a second.

until 1?

try until @error = 1 ??

I can't run it I don't have the game, but try it!

Edit: code! - Much neater!

Send("{F1}")
    Sleep(250)
    MouseClick ("Right", 444, 128, 1)
    Sleep(250)
    MouseClick ("Right", 700, 141, 1)
    Sleep(250)
    MouseClick ("Right", 728, 157, 1)
    Sleep(250)
    MouseClick ("Right", 687, 110, 1)
    Sleep(250)
    Send("{F3}")
    Do
        $MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters)
        If Not @error Then
            MouseClick("right", $MonsterFind[0], $MonsterFind[1])
        EndIf
    Until @Error <> 0
    Send("{F1}")
    Sleep(250)
    MouseClick ("Right", 673, 197, 1)
; Pickit
    Sleep(250)
    MouseClick ("Right", 673, 198, 1)
    Sleep(250)
; Walk to halls of anguish so we dont get raped by the xtras
    MouseClick ("Left", 536, 199, 1)
    Sleep(250)
    EndGame()
Edited by mdiesel

Share this post


Link to post
Share on other sites
ecstatic

don't play the game personally but

MouseMove(444, 128)
    MouseDown("right")
    MouseUp("right")

??

mouseclick surely as there is no gap between?

3 lines into 1!

also:

sleep (20)

don't bother, thats 1/500 th of a second.

until 1?

try until @error = 1 ??

I can't run it I don't have the game, but try it!

Edit: code! - Much neater!

Send("{F1}")
    Sleep(250)
    MouseClick ("Right", 444, 128, 1)
    Sleep(250)
    MouseClick ("Right", 700, 141, 1)
    Sleep(250)
    MouseClick ("Right", 728, 157, 1)
    Sleep(250)
    MouseClick ("Right", 687, 110, 1)
    Sleep(250)
    Send("{F3}")
    Do
        $MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters)
        If Not @error Then
            MouseClick("right", $MonsterFind[0], $MonsterFind[1])
        EndIf
    Until @Error <> 0
    Send("{F1}")
    Sleep(250)
    MouseClick ("Right", 673, 197, 1)
; Pickit
    Sleep(250)
    MouseClick ("Right", 673, 198, 1)
    Sleep(250)
; Walk to halls of anguish so we dont get raped by the xtras
    MouseClick ("Left", 536, 199, 1)
    Sleep(250)
    EndGame()
Heh the 3 lines were from a copy-tool.

One novice question.

Do

$MonsterFind = PixelSearch(0, 0, 800, 600, $Monsters)

If Not @error Then

MouseClick("right", $MonsterFind[0], $MonsterFind[1])

EndIf

Until @Error <> 0

Whats the <> Mean.

Share this post


Link to post
Share on other sites
Mat

is not equal to. in maths terms, would be similar to:

----------//--

---------//---

--------//----

===========

------//------

===========

----//--------

---//---------

--//----------

(couldn't help it sorry)

@error = 0 means success

@error <> 0 means failure

Edited by mdiesel

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.