Lagging!! Whats wrong with my script?

Discussion in 'Scar/Simba Help' started by slydevil420, May 21, 2009.

Lagging!! Whats wrong with my script?
  1. Unread #1 - May 21, 2009 at 2:44 PM
  2. slydevil420
    Joined:
    May 21, 2009
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    slydevil420 Newcomer

    Lagging!! Whats wrong with my script?

    This script should run in only a few secs. but it takes forever to finish. I'm attempting to make a guild fisher again. This step scans for fishing spots. It does this by looking for a color in the first 2500 sq pixels then if not found moves on the the next 2500 and so on. If u try running it it dose not matter if it finds spot or not right now im just trying to get the lagging problem solved. I added in a timer to help show you the time it takes to search each grid. Thx for the help.

    Code:
    program Find_Fishing_Spot;
     
    var x,y,Ne,F,a,b,n,m,c,q,z,e,r,harpoon,FishSpot,Seconds,Now:integer;
        SpotFound:Boolean;
        Time:String;
     
    Procedure Get_Time;
    Begin
      Seconds:=(GetSystemTime-Now) div 1000;
      Time:=inttostr(Seconds)+' Seconds';
    End;
     
    procedure find;
    begin
    if(FindColorSpiralTolerance(x,y,12629423,a,b,n,m,10))then
        begin
        MoveMouseSpline(x,y,2,2);
        wait(500+random(500));
        if(FindBitmapMaskTolerance(Ne,x,y,1,1,16,18,50,50))and
          (FindBitmapMaskTolerance(F,x,y,27,1,44,18,50,50))then
          begin
          SpotFound:=true;
          end;
        end;
    end;
     
    procedure findfish(q,w:integer);
    begin
    SpotFound:=false;
    c:=0;
    q:=0;
    z:=0;
    a:=50;
    b:=50;
    n:=100;
    m:=100;
     repeat
      repeat
      get_time;
      //will tell you the grid its searching in
      WriteLn('looking in grid ('+inttostr(a)+','+inttostr(b)+','+inttostr(n)+','+inttostr(m)+')'+(time))
       //repeat
       find;
       wait(3+random(2))
       //z:=z+1;
       //until(z>5)or(SpotFound=true)
       z:=0;
       c:=c+1;
       a:=a+50;
       n:=n+50;
      until(c>19)or(SpotFound=true)
     c:=0;
     q:=q+1;
     a:=50;
     b:=b+50;
     n:=100;
     m:=m+50;
     until(q>11)or(SpotFound=true)
    end;
     
     
    procedure Fish;
    begin
     findfish(e,r);
     if(spotFound=true)then
     begin
     alert('Found')
     writeln('Found')
     getmousepos(x,y)
     clickmouse(x,y,false)
     wait(250+random(100))
     if(FindBitmapMaskTolerance(harpoon,x,y,1,1,1278,646,50,50))then
      begin
      MoveMouseSpline(x+40,y+15,20,3)
      wait(200+random(100))
      getmousepos(x,y)
      clickmouse(x,y,true)
      end;
     end;
    end;
     
     
     
     
     
    begin
    FishSpot := BitmapFromString(13, 11, 'beNpdkdlOg1AURX9US5lp' +
           'ae1AQaZbRoOVX7AgyEyRtD6b+OJ/eW4hjTE5Idywsva+B/k4d9uFd' +
           '1r4Lbcvv75//s5UfWNRJroVh/Lty1kKz7dPtJmTegrAcBywhVfvwg' +
           'scARb9TrBr3ipBy5jvxGMMM8Bzp9yFn/AihRfg10EnurXoVEuvmdk' +
           'FY6SUhrWUnsBz89yvg34V9NtDL7oNNOH3BRg4lA3pk6t2FeBEPF4L' +
           'uSwCT8ZbBaWnkDtRoiEagJl7EuwGWrGoZFDOmnhILZnIxzvp9doKd' +
           'xOclrcbYOCmjAmhuWDlgw2HKtHmMG6Ds2p2X9FGRhkZqKAYto1Y/P' +
           'D0QZvFbWnATNUEmpPauDpQ3cvR0u9YVJF6RqjJv79AaTGhRBj7BSG' +
           '49bc=');
    N := BitmapFromString(7, 10, 'beNpNzAEKwCAMA8D9/5G2c9pWnPiF' +
           'BeLcQpF6RFVaZLd8vPFQjNVTJGGIESqaNtJRUxU34ArQ7AK2Vnmlu' +
           'xecEYV4344OM2fDDhzjw96NiGCh8xVx//DHVX4AvJ2MhA==');
    F := BitmapFromString(6, 10, 'beNpjYHjylPnpM+Znz1meg9Gz58xA' +
           'kTt3GBmQAFCWGJHbdxhu3wYZiKQGWQkD0CI0EbBdmGoY8ekCAD5VL' +
           'iM=');
    harpoon := BitmapFromString(13, 21, 'beNpjYACC/0iAAQbQBJFlc' +
           'bFJVYbLUlxcPOL4DcRqyCigLiAmFUFEcCUPgikEa7wTTGwkKSNsKQ' +
           'BSluYa');
    Now:=GetSystemTime
    ////////////////////////////////////////////////////////////////
     
    fish;
    end.
     
  3. Unread #2 - May 27, 2009 at 9:57 AM
  4. slydevil420
    Joined:
    May 21, 2009
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    slydevil420 Newcomer

    Lagging!! Whats wrong with my script?

    Please anybody its been 4 days? Gotta be some advanced scripters left around somewhere. What happended to rscheatnet.com?
     
< Help plz | Need help. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site