Results 1 to 4 of 4

Thread: Why my skript freezes rs window?

  1. #1
    Join Date
    Apr 2007
    Location
    Estonia
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default Why my skript freezes rs window?

    Hi!

    Im in the middle of a Drynor willow cutter and banker, but i have a problem, when i statr my script then rs window just freezes

    here is my script-log in and put ur man near the willows and try if it works...

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    const
      TreeColor = 2319190 ;
      TreeColor1 = 1791306;

    procedure Chop;
     var
      CuttingTime : integer;
      x, y: integer;

    begin
    repeat
    if(FindColor(x,y,TreeColor,0,0,700,700)) or
        (FindColor(x,y,TreeColor1,0,0,700,700)) and
        IsUpText('illow') then
    begin
           Wait(1000 +random(1000))
          Mouse(x, y, 3, 3, True);   // after it has clicked on willow tree rs window freezes
    end;
    MarkTime(CuttingTime);
          repeat
          if (InvFull) then Exit;

          until (TimeFromMark(CuttingTime) > 8000+random(2000));
        //Wait(6000 + Random(2000));

    until (InvFull)
    If (InvFull) then
     Exit;
     else
     Chop;
    end;

    begin
     SetupSRL;
     Wait(3000 +random(1000))
     Chop;

    end.

    Ty for help

  2. #2
    Join Date
    Jun 2007
    Posts
    246
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try including waits in the repeat until timefrommark thing. thats the only thing that i could see woudl be wrong.

  3. #3
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    const
      TreeColor = 2319190 ;
      TreeColor1 = 1791306;

    procedure Chop;
     var
      CuttingTime : integer;
      x, y: integer;

    begin
    repeat
    if(FindColorTolerance(x,y,TreeColor,MSX1,MSY1,MSX2,MSY2,5)) or
        (FindColorTolerance(x,y,TreeColor1,0,0,700,700,5)) and
        IsUpText('illow') then
           Wait(1000 +random(1000))
          Mouse(x, y, 3, 3, True);   // after it has clicked on willow tree rs window freezes
    MarkTime(CuttingTime);
          repeat
          if (InvFull) then Exit;

          until (TimeFromMark(CuttingTime) > 8000+random(2000));
        //Wait(6000 + Random(2000));

    until (InvFull)
    If (InvFull) then
     Exit;
     else
     Chop;
    end;

    begin
     SetupSRL;
     Wait(3000 +random(1000));
     Chop;

    end.
    This should work, I'm going to test it just in case...
    You did a good job, there aren't many people who just join that can do this.
    Work on standards though.
    Active only during the Summer...

  4. #4
    Join Date
    Apr 2007
    Location
    Estonia
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Ty vm =)
    I thought that it was something to with the TimeFromMark but didnt knew it was so simple And thatswhy my WalkToTheBank doesnt work

    Tested the whole script works fine, but...little bug in finding the willows but theres a bigger problem in chopping willows(look the script...)

    I wanna make a better cutter:
    when it click on willow, it waits until willow is gone or 15 seconds(no moving and clicking meanwhile)
    Have no idea how to make that, wanted to use if not IsUpText('illow') then Chop; put there is a problem, when im standing away from willow the coordinates changes(the characer moves close to willow and the cursor moves away from willow-and there goes IsUpText('illow'))

    But ty anyways guys, going to add antirandoms and failsafe and need to read the standards :P hopefully gonna relese my script in a few days

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. IsKeyDown(C: Char) freezes window?
    By eFox in forum OSR Help
    Replies: 6
    Last Post: 10-19-2007, 08:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •