Jump to content

Please help with this script


 Share

Recommended Posts

I'm making a script for world of warcraft, for buying items at the darkmoon faire.

This is how i would like it to work, but i get an error message...

It says that WEnd can't be used after a "Then" keyword. Is there any way to make this work? Please help!

MsgBox(1, "hai", "hoi")

HotKeySet ( " " , "stop")

func stop()
exit
EndFunc

Sleep(1000)

While 1
MouseMove(366, 230, 0);Move to Lhara
MouseClick("right");Click Lhara
MouseMove(1067, 230, 0);Move to Thaddeus

While 2;Wait for Lhara trade window
Sleep(10)
$trade = Hex(PixelGetColor(41, 456), 6)
If $trade = "1B1A1B" Then WEnd Else EndIf

MouseClick("right");Click Thaddeus

While 3; Wait for thaddeus first window
Sleep(10)
$thaddeus = Hex(PixelGetColor(250, 265), 6)
If $thaddeus = "CCA471" Then WEnd Else EndIf

MouseMove(146, 287, 0)
MouseClick("right")

While 2;Wait for thaddeus trade window
Sleep(10)
$trade = Hex(PixelGetColor(41, 456), 6)
If $trade = "1B1A1B" Then WEnd Else EndIf

WEnd
Link to comment
Share on other sites

I see alot of "Then Wend Else EndIf"

The Endif in that is not necessary (because it's only one line)

and you have to replace the Wend with Exit Loop

For example:

If $thaddeus = "CCA471" Then ExitLoop

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

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...