Results 1 to 7 of 7

Thread: Counting help!

  1. #1
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Counting help!

    read post at bottom
    Last edited by uncfan1119; 10-30-2009 at 10:03 PM.
    "SRL is the best SCAR community in the World, with the most talented programmers: adjust your volume."
    -Wizzup?

  2. #2
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    if Clicks >= 9 then
    begin
      repeat
        wait(5);
      until(Find());
    end;
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  3. #3
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    SCAR Code:
    {Directions: Load game(600x450), specify target, start script}
    program itchyinvasion; //by uncfan1119

    var
      x, y: integer;
      clicks: integer;
    procedure MainScreen;
    begin
      ClickMouse(103, 413,true);
      Wait(2000);
      ClickMouse(84, 34,true);
      Wait(250);
      ClickMouse(100,100,true);
    end;

    procedure Invasion;
    begin
      repeat
        repeat
      if findcolortolerance(x, y, 10027263, 23, 135, 577, 311, 5) then
         begin
           clickmouse(x,y,true);;
          wait(50);
     end else if findcolortolerance(x, y, 16711422, 23, 135, 577, 311, 1) then
        begin
          clickmouse(x,y,true);
          wait(50);
     end else if findcolortolerance(x, y, 3368703, 23, 135, 577, 311, 1) then
         begin
           clickmouse(x,y,true);
          wait(50);
      end else if findcolortolerance(x, y, 5893948, 23, 135, 577, 311, 5) then
        begin
          clickmouse(x,y,true);
          wait(50);
     end else if findcolortolerance(x, y, 16724940, 23, 135, 577, 311, 5) then
        begin
          clickmouse(x,y,true);
          wait(50);
     end else if findcolortolerance(x, y, 213, 23, 135, 577, 311, 5) then
        begin
          clickmouse(x,y,true);
          wait(50);
     end else if findcolortolerance(x, y, 6750207, 23, 135, 577, 311, 5) then
        begin
          clickmouse(x,y,true);
          wait(50);
        end;
      wait(50);
    { This part below, finds when the ammo is low, it needs to click a certain color creature }
    until findColortolerance(x,y,12104575,227,14,224,18,25);
    repeat
    wait(10)
    if findColortolerance(x,y,6750003,227,14,224,18,25) then
    ClickMouse(x,y,true);
    clicks := clicks + 1;
    {after it clicks the creature, it should go back to the main loop, until it finds low ammo?}
    until(clicks = 1);
    until(false);
    end;

    begin
      MainScreen;
      Invasion;
    end.

    Can anyone try to see what's wrong with my script now? It automatically thinks the ammo is low.
    "SRL is the best SCAR community in the World, with the most talented programmers: adjust your volume."
    -Wizzup?

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    You do say:
    clicks := clicks + 1;
    and:
    until(clicks = 1);

    but the second time, it will run the code, clicks is already 1, so 1+1 = 2, And it will not end the loop... forever!!

  5. #5
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Firstly, explain to me what this code is supposed to do, and where to use it, and I'll assist you.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  6. #6
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    You do say:
    clicks := clicks + 1;
    and:
    until(clicks = 1);

    but the second time, it will run the code, clicks is already 1, so 1+1 = 2, And it will not end the loop... forever!!
    I made the line until (clicks= 2);, but still the same effect


    Quote Originally Posted by Sex View Post
    Firstly, explain to me what this code is supposed to do, and where to use it, and I'll assist you.
    http://www.neopets.com/games/play.ph...r&quality=high


    It shoots monsters. But it has to shoot a certain monster to "refuel" the ammo, or else the game is over.
    If you have MSN we could talk there?
    "SRL is the best SCAR community in the World, with the most talented programmers: adjust your volume."
    -Wizzup?

  7. #7
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I've PMed you my MSN.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

Thread Information

Users Browsing this Thread

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

Posting Permissions

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