Jump to content
Tovar

A little Problem, Please help.

Recommended Posts

Well I have a little problem with my script, this script is about fish, you throw the bait and you need wait some seconds until appear the bubbles to catch the fish, well I want apart of this press a Key, but it have delay to use it again, HOW I CAN DO TO PRESS THE KEY AND START THE SCRIPT AGAIN WITHOUT WAIT HIS 20 SECONDS OF DELAY?

 

program New;
 var
 x, y: integer;
 i:integer;

begin
 i:=1;
 while (i < 5) do
 if FindColorTolerance (x, y, 16375555, 413, 98, 434, 105,40) or FindColorTolerance (x, y, 13413890, 413, 98, 434, 105,40) or FindColorTolerance (x, y, 9530881, 413, 98, 434, 105,40) then   //color de la hp y coordenadas del pokemon en battle
 begin
   keydown(VK_f10)                //hotkey a utilizar
   wait(200)
   keyup(VK_f10)
   wait(200)
   keydown(VK_control)
   wait(100)
   keydown(VK_down)
   wait(100)
   keyup(VK_down)
   wait(100)
   keydown(VK_up)
   wait(100)
   keyup(VK_up)
   wait(100)
   keyup(VK_control)
     end else

 begin
i:=0;
repeat
   keydown(VK_f11)
   Wait (300)                 
ClickMouse (424, 117, true)// coordenadas del fishing spot1
wait(300)
 i:=i+1;                 //valor por ejecucion de la variable (0 = infinito)
until(i = 1)              //valor tope para que cambie de variable
 end;
 begin
   wait(300)
   wait(20000)
   keydown(VK_f5)
 end;
end.

Link to comment
Share on other sites

Heres an example, but there is many ways to do this and get the same result

[scar]

program New;

 

Procedure ThrowBait;

var

x, y: integer;

i:integer;

begin

i:=1;

while (i < 5) do

if FindColorTolerance (x, y, 16375555, 413, 98, 434, 105,40) or FindColorTolerance (x, y, 13413890, 413, 98, 434, 105,40) or FindColorTolerance (x, y, 9530881, 413, 98, 434, 105,40) then //color de la hp y coordenadas del pokemon en battle

begin

keydown(VK_f10) //hotkey a utilizar

wait(200)

keyup(VK_f10)

wait(200)

keydown(VK_control)

wait(100)

keydown(VK_down)

wait(100)

keyup(VK_down)

wait(100)

keydown(VK_up)

wait(100)

keyup(VK_up)

wait(100)

keyup(VK_control)

end else

begin

i:=0;

repeat

keydown(VK_f11)

Wait (300)

ClickMouse (424, 117, true)// coordenadas del fishing spot1

wait(300)

Inc(I);

until(i = 1) //valor tope para que cambie de variable

end;

end;

 

Procedure CheckKey; // this will run ever 100 ms in the background

Begin

SetTimeout(100,'CheckKey'); // this sets the timeout again ea time this is called.

If IsFKeyDown(VK_f5) then // F% will restart the throw bait proc

ThrowBait;

end;

 

Begin

CheckKey;

Repeat

ThrowBait;

Wait(20000);

until False;

end.

[/scar]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...