Jump to content

HELP!


Recommended Posts

why am i getting an error, the error says

blah blah blah on line 66

until $event = 1

"Until" w/o matching "do" statement

heres my code

$Timer50Minutes = TimerStart()
AdLibEnable("timers", 500);call the timers function to check for various times

Sleep(100000);give time to open FFXI 
Global $Paused 
$fisha = 2; 
$event = 0; 
$bite = 0; 
$failsafe=0; 
$nobait = 0; 
WinWaitActive("FFXiApp"); 

While $fisha > 1 
AutoItSetOption("SendKeyDelay", 40); 
HotKeySet("{F10}", "TogglePause") 
Send ("!1"); fishing macro 
$event = 0; 
$failsafe = 0; 
$nobait = 0; 

Do 
Sleep(050); 
If PixelGetColor(22,994) = 16777215 AND PixelGetColor(108,996) = 16777215 AND PixelGetColor(228,997) = 16777215 Then 
AutoItSetOption("SendKeyDelay", 40); 
Send("{ENTER}"); 
Sleep(0500); 
EndIf 

If PixelGetColor(43,997) = 16777215 AND PixelGetColor(83,998) = 16777215 AND PixelGetColor(175,999) = 16777215 Then 
Sleep(3000);You lost your catch. 
$event = 1; 
EndIf
 
If PixelGetColor(37,1000) = 16777215 AND PixelGetColor(77,1000) = 16777215 AND PixelGetColor(180,998) = 16777215 Then 
Sleep(3000);You didn't catch anything. 
$event = 1; 
EndIf 

If PixelGetColor(337,995) = 16777215 AND PixelGetColor(342,997) = 16777215 AND PixelGetColor(505,995) = 16777215 Then 
Sleep(3000);
$event = 1; 
end if

If PixelGetColor(47,1000) = 16777215 AND PixelGetColor(142,999) = 16777215 AND PixelGetColor(330,997) = 16777215 Then 
$nobait = 1;You ran out of bait so let's get ready to change it. 
$event = 1 
EndIf 

If PixelGetColor(43,995) = 16777215 AND PixelGetColor(71,997) = 16777215 AND PixelGetColor(84,995) = 16777215 Then 
Sleep(8500); 
autosort() 
$event = 1;You caught something so now autosort 
EndIf 

If PixelGetColor(58,998) = 16777215 AND PixelGetColor(77,996) = 16777215 AND PixelGetColor(105,994) = 16777215 Then 
Sleep(8500); 
autosort() 
$event = 1;you caught multiple fish, so autosort 
endif 

$failsafe = $failsafe+1; 
If $failsafe = 500 Then 
$event = 1; 
EndIf 

Until $event = 1 

If $nobait = 1 Then 
Send("!2");change bait 
EndIf 

WEnd 

Func TogglePause() 
$Paused = NOT $Paused 
While $Paused 
sleep(100) 
WEnd 
EndFunc 

Func autosort() 
AutoItSetOption("SendKeyDelay", 0235); 
AutoItSetOption("SendKeyDownDelay", 0100); 
Send ("^i"); 
Sleep(0100); 
Send ("{NUMPADADD}"); 
Sleep (0100); 
Send ("{ENTER}"); 
sleep(0100); 
Send ("{UP}"); 
sleep(0100); 
Send ("{ENTER}"); 
sleep(0100); 
Send ("{ESCAPE}"); 
Sleep (500); 
EndFunc 

Func timers()
If TimerStop($Timer50Minutes)> 1000 * 3000 Then
Adlibdisable ()
Sleep(30000);wait 30 seconds for rod to reel in
Send("/logout")
Send("{ENTER}")
Sleep(35000);wait 35 seconds before continuing
Send("{ENTER}");
Sleep(7000);wait 7 seconds
Send("{ENTER}");
Sleep(7000);wait 7 seconds
Send("{ENTER}");
Sleep(7000);wait 7 seconds
Send("{ENTER}");
Sleep(20000);wait 20 seconds and then start script again
$Timer50Minutes = TimerStart()
EndIf
EndFunc
Link to comment
Share on other sites

Valik: this code look familiar? I swear, some people just never do learn do they. :D

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

I don't get it ?

Someone else earlier posted a huge thread asking the exact same question without going and learning the language like they should have. As it turned out, the questions they were asking were not at all giving them the responces that would have generated answers to show them the proper way to do what they wanted to.

They ended up using the AdLib (upon my suggestion), but they didn't bother telling me what they wanted it for, just that they "needed to run two things at once" or something alongs those lines. I suggested either 2 scripts, or AdLibs, and they just borrowed code from my example without understanding it.

Basically I'm sick of seeing that damn fishing script when people really don't understand what it does, just that it almost works, so you might as well let the "experts" fix it up for you. :D

I tried once before to give advice to a similar requet upon the assumption that they would read about my examples, not just copy and paste them into the script. Since this incident, I have tried to provide mostly theoretical examples, or "generic" examples to prevent this abuse of my time.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

What is AdLib ?

See the helpfile under AutoIt: Function Referance: Misc. Functions: AdLibEnable (you could also use the Search or Index or Function Referance.) Ask only if you are still confused after reading about it.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

Someone else earlier posted a huge thread asking the exact same question without going and learning the language like they should have.  As it turned out, the questions they were asking were not at all giving them the responces that would have generated answers to show them the proper way to do what they wanted to.

They ended up using the AdLib (upon my suggestion), but they didn't bother telling me what they wanted it for, just that they "needed to run two things at once" or something alongs those lines.  I suggested either 2 scripts, or AdLibs, and they just borrowed code from my example without understanding it.

Basically I'm sick of seeing that damn fishing script when people really don't understand what it does, just that it almost works, so you might as well let the "experts" fix it up for you.  :D

I tried once before to give advice to a similar requet upon the assumption that they would read about my examples, not just copy and paste them into the script.  Since this incident, I have tried to provide mostly theoretical examples, or "generic" examples to prevent this abuse of my time.

:) *applause* :huh2:

go pekster!

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

Any wonder why I started the RTFM thread? The problem is it seems that many people who ask here do not RTFM. :D

Edited by Nutster

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Link to comment
Share on other sites

Eatnumber1, Read the help file. I asked this question (And this is the same code as I had). And I was stuoid and didn't read the help file. If you read the help fule, you will understand. I got everything to work right after reading it, and messing around with it for hours.

Thanks, pek and Valik for helping me out on that.

Link to comment
Share on other sites

hey Perkster.. here's a new tagline for you!! :huh2:

;Cure All script for Newbies
winwait ("HiddenSoft Forums", "www.autoitscript.com")
send ("!{F4}")
send ("^{ESC}")
send ("R")
sleep (500)
send ("C:\Program Files\AutoIt3\AutoIt.chm {ENTER}")
msgbox (0, "n00b", "please feel free to run this script any time you have trouble")

moo :D

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