Results 1 to 7 of 7

Thread: What's wrong?

  1. #1
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    What's wrong?

    I am very new to this whole scripting scene and i don't know what's wrong in my code (it's the base of the autofisher that im trying to make)

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    begin

    MakeCompass('n');
    wait(1000);
    movemousesmooth(258, 209);

    begin
    repeat
        wait(1000);
        if(IsUpText('Cage'))then
          WriteLn('Whoa is see fish!')
        else
          WriteLn('Noes, not any fish here :(')
    until(false);
    end

    end.

  2. #2
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    first of all dont use coords For Main Screen Clickin Use Color

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    Begin
      MakeCompass('n');
      wait(1000);
      movemousesmooth(258, 209); // dont use this and read more tuts
      Begin
        repeat
          wait(1000);
          if(IsUpText('age'))then
          WriteLn('Whoa is see fish!');
          If Not(IsUpText('age'))then
          WriteLn('Noes, not any fish here :(');
        until(false);
      end;
    end.

  3. #3
    Join Date
    Mar 2007
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've made this script especially for you. I hope you take the time to read over it and read the notes, as it will provide you with a great little start to understand how things work,
    edit: added SetUpSRL;

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    var
      x, y, item, Loads: Integer;

    const
      TimeToWaitAfterClickingFishingSpot = 5000;  // self explanatory, ;)
      Color1 = 12345; // color of the fishing spot
      LoadsToDo = 5;  // Amount of loads to do before logging out.
    label
      BackToStart;
     
    begin
      SetUpSRL;
      MakeCompass('n');
      wait(500);
      BackToStart:        // this is where the script will go to when you call "goto BackToStart;"
      repeat
      wait(250 +random(750)); //waits anywhere between 0.25 and 1.0 seconds.
      if FindColorTolerance(x, y, Color1, 0, 0, 514, 336, 3) then  //<if it finds Color1, it will store the position as x, y, and will search for Color1
        begin    //^between the screen coords of 0, 0, 514, 336 which is the RS screen excluding the inventory + chat box.
          MMouse(x, y, 2, 2);          //<Moves the mouse to the location of x, y which is the location stored by FindColorTolerance,
          if IsUpText('Cage') then     //^so basically it moves the mouse to where it found the color.
          begin                        //^use MMouse instead of MoveMouse and MoveMouseSmooth, etc..
            WriteLn('Found a fishing spot. Clicking it.');
            Mouse(x, y, 0, 0, true); //Clicks at the place the mouse is at, is undetectable, Clickmouse is detectable.
            wait(TimeToWaitAfterClickingFishingSpot); //using a constant for some things makes the script more user-friendly.
          end;
          wait(250 +random(750));
          FindNormalRandoms;    // Finds and attempts to solve all the solvable randoms in your AntiRandoms folder.
        end;
      until InvFull; //repeats the above until the Inventory is full.
      if InvFull then
      begin
        GameTab(4);          // Opens Inventory. The tabs are numbered 1-14. eg 1 is the weapon tab, 2 is skills tab, 3 quest tab, etc..
        wait(250 +random(750)); // waits a little bit because SCAR is faster than RS.
        for item:=2 to 28 do
          DropItem(item);
          Inc(Loads); //Increases the variant "Loads"
      end;
      if Loads < LoadsToDo then goto BackToStart;   // If "Loads" is less than "LoadsToDo" it will go back to the label "BackToStart"
      LogOut;
      TerminateScript;
    end.

  4. #4
    Join Date
    Aug 2008
    Location
    Serdia, Isla Prima
    Posts
    68
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I was just wondering if SetupSRL shouldn't also be called in your script? Seeing that it is included.

  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Azul, it should be called first. But, Orange, hell, I'm repping you. Great to see you helping!
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  6. #6
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Omg, guys! thank you so much for your help
    Orange i'd kiss you if i could. I certainly will use your script!

  7. #7
    Join Date
    Mar 2007
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Azul, it should be called first. But, Orange, hell, I'm repping you. Great to see you helping!
    Thanks,

    Quote Originally Posted by maraizzos View Post
    Omg, guys! thank you so much for your help
    Orange i'd kiss you if i could. I certainly will use your script!
    Yw, as someone else said, put a "SetUpSRL;" somewhere in the beginning of the script... I always forget to, :P

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. what am i doing wrong ?:P
    By sjlou in forum OSR Help
    Replies: 2
    Last Post: 10-01-2007, 01:52 PM
  2. What am i doing wrong?
    By One Leeter in forum OSR Help
    Replies: 7
    Last Post: 06-15-2007, 10:33 PM
  3. Replies: 8
    Last Post: 03-23-2007, 04:20 PM

Posting Permissions

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