Results 1 to 14 of 14

Thread: Script ends after mining one ore =/

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

    Default Script ends after mining one ore =/

    http://orange.pastebin.com/d338997e7

    No idea why it's doing that, can anyone help?

    and theres the same script with repeats and until's instead of labels and goto's

    http://orange.pastebin.com/m5590c890


    Solution:

    SCAR Code:
    Inc(Players[CurrentPlayer].Extendeds[2]);

    Can't Inc a float, should be

    SCAR Code:
    Players[CurrentPlayer].Extendeds[2] := Players[CurrentPlayer].Extendeds[2] + 1;

  2. #2
    Join Date
    Feb 2007
    Posts
    211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    At very first glance not looking through your script it seems you have a main loop you wish to do multiple times but you do not actually ever loop it in your script, you could do something like

    SCAR Code:
    Procedure MainLoop;
    begin
        SetUps;
      repeat
        MineOre;
      until(false);
    end;

    begin
      MainLoop;
    end.

    which will help it if my first glance is correct, sorry if its not I just woke up >_<!!
    Current Project: Catching up on what I missed, re-writing some old includes I done in the past.
    Upcoming Project: Open For Suggestions

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

    Default

    Naw, theres a repeat inside MineOre, and several labels too, it only exits MineOre if all players are inactive.

  4. #4
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    WHAT IS THIS!!!?!?!?!!!!! you go behind my back and ask teh noobs how to fix it???
    ~ Metagen

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

    Default

    /me cries. *

    Help me oh wise one... i mean, Help me Metagen..

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

    Default

    And you don't ask me?

    Again, cheating...

    Watch the Label loops, use regulars, they are more reliable and easier to follow.
    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

  7. #7
    Join Date
    Jul 2008
    Posts
    907
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    irc buddy! (i think) but yeah i don't like labels use regular loops and erm after a guick glance i noticed you made a procedure to set 2 chats off when there's already a funtion in srl and surely that proggy cn be shortened in one way or another but i cba checking its 23:50 :P


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

    Default

    HAHA! Woot! I managed to fuck up this script so bad that even Wizzup couldn't figure out what was wrong! Well he had to go, but tomorrow he's looking at it, and I reckon I might win some sort of medal for the most screwed up script!

  9. #9
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Watch the Label loops, use regulars, they are more reliable and easier to follow.
    I thought it might be something with the labels too. Drop them and try normal loops.
    :-)

  10. #10
    Join Date
    Sep 2008
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not sure but, If your scripts logs you out and doesn't work it's because of this stuff:

    Code:
    Inc(SafeOre);
    
        if FindColorSpiralTolerance(x, y, RockColor, 0, 0, 514, 336, 10) then
    Code:
    if (SafeOre > 25) then
      begin
        Loads := 0;
        LogOut;
        NextPlayer(false);
      end;
    If it doesn't find the color it will just keep adding to SafeOre until it finds it, and if you mine an ore and it can't find another one then it will just keep looping through and possibly finishing your script. I would suggest a better method of finding a rock like possibly the SRL mining rock records. But if I am wrong then I am sorry lol...
    Free Scripts Pl0x!

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

    Default

    Quote Originally Posted by Leech View Post
    If it doesn't find the color it will just keep adding to SafeOre until it finds it, and if you mine an ore and it can't find another one then it will just keep looping through and possibly finishing your script. I would suggest a better method of finding a rock like possibly the SRL mining rock records. But if I am wrong then I am sorry lol...
    SCAR Code:
    Inc(SafeOre);
        if FindColorSpiralTolerance(x, y, RockColor, 0, 0, 514, 336, 10) then
        begin
          Status('Clicking Ore');
          MMouse(x, y, 8, 8);
          wait(120 +random(80));
          if IsUpText('ock') then
          begin
            SafeOre := 0;    //   <--- Check mate
            GetMousePos(x, y);
            if random(20) = 1 then
            begin
              Mouse(x, y, 0, 0, false);
              wait(85 +random(165));
              ChooseOption('ine');
            end else
            Mouse(x, y, 0, 0, true);
            Status('Mining Ore');
            AntiRandoms;
            WaitWhileMine;
          end;

  12. #12
    Join Date
    Sep 2008
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by orange View Post
    SCAR Code:
    Inc(SafeOre);
        if FindColorSpiralTolerance(x, y, RockColor, 0, 0, 514, 336, 10) then
        begin
          Status('Clicking Ore');
          MMouse(x, y, 8, 8);
          wait(120 +random(80));
          if IsUpText('ock') then
          begin
            SafeOre := 0;    //   <--- Check mate
            GetMousePos(x, y);
            if random(20) = 1 then
            begin
              Mouse(x, y, 0, 0, false);
              wait(85 +random(165));
              ChooseOption('ine');
            end else
            Mouse(x, y, 0, 0, true);
            Status('Mining Ore');
            AntiRandoms;
            WaitWhileMine;
          end;
    If it doesn't find the color, it won't reset SafeOre... So it will again, just loop incrimenting SafeOre and possibly finishing your script.
    Free Scripts Pl0x!

  13. #13
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Leech: If it doesn't fine the ore colour, then it will keep incrementing. If it reaches 25, we can safely assume there are no ores, the ore colour is wrong or something similar to that extent, thus logging out the person is the reasonable thing to do as it can do nothing if it can't find the ore colour.

    Also, just for clarity, problem was uncovered when I told him to properly debug script with a Writeln after every line in the main loop MineOre, which revealed WaitWhileMine as the problem. He then did the same thing to WaitWhileMine and uncovered the Inc(float) at which point I told him he can't use Inc for it as it won't error but it will throw a fuss (in the case of termination).
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  14. #14
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Don't mean to gravedig... but NICE CATCH
    ~ Metagen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need Help With My Mining Script.
    By Claymore in forum OSR Help
    Replies: 4
    Last Post: 07-12-2008, 02:39 AM
  2. Looking for a Mining script or two
    By The Claw in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 04-24-2007, 05:33 PM
  3. Script for mining
    By Annighlater in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 03-27-2007, 09:59 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
  •