|
Post by Destructor506 on Oct 14, 2004 9:18:26 GMT -5
I wanted to know if there is a way to pause a script (ex. fishing bot) in FF11 without logging off. At times when i come back try to take my charcter to the AH or the fishing guild to buy more supplies or sell my fish. Only problem is i try to do it quick so i dont log off and the bot makes the camera move in and out and locks onto people and cancels commands often. Knowing if it is possible to pause an AutoIT script will be very helpful to know and is appreciated.
|
|
|
Post by TinyTerror on Oct 14, 2004 9:32:34 GMT -5
Try running FFXI with the windower. You can minimize the game and do other things without logging out. Running, stopping, and editing scripts without exiting the game is easy to do with this setup.
|
|
metalo
Junior Member
Posts: 50
|
Post by metalo on Oct 14, 2004 13:19:52 GMT -5
What I did in my fish bot script for pause/unpause was I created a macro that simply did /echo ~ Pause ~ I use FrontCam to get snaps of that when it's displayed up in yellow. I then look for pixel placements in the "~" begining and end. I have a small peice of code like this that does my Pause Toggle: Func TogglePause() AutoItSetOption("SendKeyDelay", 4); AutoItSetOption("SendKeyDownDelay", 4); $Paused = 1 While $Paused > 0 $pix1=0; $pix2=0; $pix3=0; sleep(2100); $pix1=PixelGetRGB(28,997); $pix2=PixelGetRGB(27,997); $pix3=PixelGetRGB(30,997); If $pix1[1] = 211 AND $pix1[2] = 208 AND $pix1[3] = 132 AND $pix2[1] = 215 AND $pix2[2] = 206 AND $pix2[3] = 133 AND $pi x3[1] = 211 AND $pix3[2] = 208 AND $pix3[3] = 132 OR $pix1[1] = 193 AND $pix1[2] = 190 AND $pix1[3] = 125 AND $pix2[1] = 194 AND $pi x2[2] = 187 AND $pix2[3] = 124 AND $pix3[1] = 192 AND $pix3[2] = 189 AND $pix3[3] = 126 Then $Paused = 0; $event=1; send("/p <call11> Unpaused {ENTER}"); Sleep(350); Send("{ESC}"); Sleep(350); Endif WEnd; EndFunc Please adjust the pixel color stuff to your card. NOTE: Please the above code snibbit is not a fishing bot dont run it and ask me why it's not fishing ^^ I'm sure I could make it nicer with a select case statement but I'm not that advanced uber coder in AutoIT yet I think we all know my $event, kicks in the fishing loop, to start over. I didn't want my toggle pause to wait until the fail safe kicked in, so I evented it to jump and reloop. Metalo
|
|
|
Post by Destructor506 on Oct 15, 2004 20:44:05 GMT -5
kool only question i have now is where do i put it in the script i use for fishing bot? or does it even matter where i place it. if u need to see the script i use ill post it
$Timer50Minutes = TimerStart() AdLibEnable("timers", 500);call the timers function to check for various times
;Here we have the variants based on what the script will do in memory while running Sleep (60000); $fish = 2; $event = 0; $bite = 0; $failsafe = 0; $nobait = 0; $dc = 0; WinWaitActive("FFXiApp");
;Below is the command string to fish While $fish > 1 AutoItSetOption("SendKeyDelay", 40); Send ("!1"); $event = 0; $failsafe = 0; $nobait = 0; Do
;----------------------------------------------NORMAL FISHING COMMENTS------------------------------------------------- ;here we have the command string"reel in" your fish Sleep(250); If PixelGetColor(25,745) = 16777215 AND PixelGetColor(109,744) = 16777215 AND PixelGetColor(200,739) = 16777215 Then AutoItSetOption("SendKeyDelay", 40); Sleep(Random(5100,5400)); Send ("{ENTER}"); Sleep(5400); EndIf
;The "You didn't catch anything" keep fishing command string If PixelGetColor(25,740) = 16777215 AND PixelGetColor(62,739) = 16777215 AND PixelGetColor(163,741) = 16777215 Then Sleep(Random(5100,5400)); $event = 1; EndIf
;Here we have the command string to keep fishing when you get "lost your catch" If PixelGetColor(23,736) = 16777215 AND PixelGetColor(97,746) = 16777215 AND PixelGetColor(171,736) = 16777215 Then Sleep(Random(5100,5400)); $event = 1; EndIf
;Here is the command string to keep fishing when you get "Whatever you caught was too small for this rod" If PixelGetColor(353,736) = 16777215 AND PixelGetColor(435,735) = 16777215 AND PixelGetColor(507,736) = 16777215 Then Sleep(Random(5100,5400)); $event = 1; EndIf
;----------------------------------------------RUSTY SECTION-----------------------------------------------------------
;The script below sends the "Dump Rusty Buckets" If PixelGetColor(22,738)= 16777215 AND PixelGetColor(90,739) = 16777215 AND PixelGetColor(90,744) = 16777215 AND PixelGetColor(204,744) = 16777215 Then autodump() Sleep(Random(2100,2200)); $event = 1; EndIf
;The script below sends the "Rusty Leggings" If PixelGetColor(22,738)= 16777215 AND PixelGetColor(90,739) = 16777215 AND PixelGetColor(90,744) = 16777215 AND PixelGetColor(215,745) = 16777215 Then autodump() Sleep(Random(2100,2200)); $event = 1; EndIf
;The script below sends the "Rusty Subligar" If PixelGetColor(22,738)= 16777215 AND PixelGetColor(90,739) = 16777215 AND PixelGetColor(90,744) = 16777215 AND PixelGetColor(212,745) = 16777215 Then autodump() Sleep(Random(2100,2200)); $event = 1; EndIf
;------------------------------------------------------SPECIAL FISHING INSTRUCTIONS------------------------------------
;The script below states you have obtained something, stop fishing, and "autosort fish" If PixelGetColor(27,744) = 16777215 AND PixelGetColor(85,737) = 16777215 AND PixelGetColor(43,738)= 16777215 Then autosort () Sleep(Random(2100,2200)); $event = 1; EndIf
;Here is the command string to tell script "you are out of bait" If PixelGetColor(23,736) = 16777215 AND PixelGetColor(205,738)= 16777215 AND PixelGetColor(338,744) = 16777215 Then $nobait = 1; EndIf
;here is the command to send a logout when you have full inventory, no bait, broken rod
$failsafe = $failsafe+1; If $failsafe = 175 Then $event = 1; EndIf
Until $event = 1
sleep(2000); If $dc = 1 Then Send("!3"); Sleep(30000); EndIf
If $nobait = 1 Then Send("!2"); EndIf
WEnd
Func autosort() Sleep(9000); AutoItSetOption("SendKeyDelay", 0235); AutoItSetOption("SendKeyDownDelay", 0100); Send ("!i"); Sleep(0250); Send ("{NUMPADADD}"); Sleep (0250); Send ("{ENTER}"); sleep(0350); Send ( "{UP}" ); sleep(0350); Send ("{ENTER}"); sleep(0250); Send ("{ESCAPE}"); sleep(0250); Send ("{ESCAPE}"); Sleep (0250); EndFunc
Func autodump() Sleep(9000); AutoItSetOption("SendKeyDelay", 0235); AutoItSetOption("SendKeyDownDelay", 0100); Send ("!i"); Sleep(0250); Send ("{DOWN 50}"); Sleep (0250); Send ("{ENTER}"); sleep(0350); Send ( "{DOWN}" ); sleep(0350); Send ("{ENTER}"); sleep(0250); Send ("{UP}"); sleep(0250); Send ("{ENTER}"); Sleep (0250); Send ("{ESCAPE}"); Sleep (0250); Send ("{ESCAPE}"); Sleep (0250); EndFunc
Func timers() If TimerStop($Timer50Minutes)> 1000 * 3000 Then Adlibdisable () Sleep(30000);wait 30 seconds for rod to reel in Send("!3") 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() AdLibEnable("timers", 500); EndIf
EndFunc Also if you know what the wait is b4 u fish id appreciate it so i dont have that long of delay of trying to fish again
|
|
metalo
Junior Member
Posts: 50
|
Post by metalo on Oct 15, 2004 23:28:56 GMT -5
I guess what I would do is in your main fishing loop put something like this in
$pix1=PixelGetRGB(28,997); $pix2=PixelGetRGB(27,997); $pix3=PixelGetRGB(30,997); If $pix1[1] = 211 AND $pix1[2] = 208 AND $pix1[3] = 132 AND $pix2[1] = 215 AND $pix2[2] = 206 AND $pix2[3] = 133 AND $pi x3[1] = 211 AND $pix3[2] = 208 AND $pix3[3] = 132 OR $pix1[1] = 193 AND $pix1[2] = 190 AND $pix1[3] = 125 AND $pix2[1] = 194 AND $pi x2[2] = 187 AND $pix2[3] = 124 AND $pix3[1] = 192 AND $pix3[2] = 189 AND $pix3[3] = 126 Then
TogglePause()
EndIf
Remember my pixel placements and color will not be the same as yours so please adjust.
Metalo
|
|