Results 1 to 11 of 11

Thread: Help with smelting script.

  1. #1
    Join Date
    Apr 2007
    Location
    Here
    Posts
    109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with smelting script.

    Hi, I am in the process of finishing up my reflection Smelter. The only error that I keep getting is that occasionally I will be sitting at the furnace and my script will just jump to the end of the main loop and say that it is finished. I haven't been able to isolate the problem more than that i'm sad to say. If you would like to help I can offer you my script to look at but I don't want to release it in full view of the public until it is ready. Thank in advance.


    edit: here is my most recent proggy of it happening(The proggy needs to updated lol)
    |==============================================|
    | Welcome To Smelting at Falador |
    |==============================================|
    Time Running 1 Hours, 6 Minutes and 50 Seconds
    cbsteel Bars Made: 197
    Banked: 1
    Bars Left: 1803
    |==============================================|
    Checking For sleep time
    Player Done
    NextPlayer
    Successfully executed

    edit2: Here is another one I JUST ran, this shows how random the bug is:
    |==============================================|
    Time Running 3 Minutes and 56 Seconds
    cbsteel Bars Made: 9
    Banked: 1
    Bars Left: 1802
    |==============================================|
    Checking For sleep time
    Player Done
    NextPlayer

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    do you have a link where we can see the script?

  3. #3
    Join Date
    Apr 2007
    Location
    Here
    Posts
    109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I guess here, I really didn't want to do this yet but oh well lol...

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

    Default

    you haven't added a repeat for when its doing next player i think so it just does that then leaves the next player logged inuntil it logs out you need to add this instead of your submainloop although i haven't tested its jus what springs to mind the script looks good actually
    SCAR Code:
    Procedure SubMainLoop;
    begin
      repeat
        repeat
          begin
            if not(LoggedIn) then exit;
            begin
              wait(300+random(25));
              OpenUpBank;
              WalkPathTo('furnace');
              SmeltItUp;
              WalkPathTo('bank');
              Proggy;
              Sleepy;
            end;
         end;
         until (barsleft<=0) or not(loggedin);
         Writeln('Player Done');
         //Logout;    isnt needed
         NextPlayer(False);
       until AllPlayersInactive;
    end;
    oh but in your smelting people dont trust coord clicking especially as there are no failsafes id make colorclicking as the main attempt and then coordclicking eg
    SCAR Code:
    'silver': begin
                      Wait(1000+random(200));
                      if findcolortolerance(x, y, 00000, xs, ys, xe, ye, 20) then
                      begin
                        mouse(x, y, 5, 5, false)
                      end else
                        begin
                          Mouse(200,435,2,2,False);
                        end;
                      Wait(200+random(20));
                      ChooseOption('X');
                      Wait(1000+random(200));
                      TypeSend(IntToStr(28+random(500)));//<whats this btw? itd just send a number
                    end;
    Edit:i didn't test either of them its just what i think :P


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

    Default

    Quote Originally Posted by sandos1234 View Post
    you haven't added a repeat for when its doing next player i think so it just does that then leaves the next player logged inuntil it logs out you need to add this instead of your submainloop although i haven't tested its jus what springs to mind the script looks good actually
    SCAR Code:
    Procedure SubMainLoop;
    begin
      repeat
        repeat
          begin
            if not(LoggedIn) then exit;
            begin
              wait(300+random(25));
              OpenUpBank;
              WalkPathTo('furnace');
              SmeltItUp;
              WalkPathTo('bank');
              Proggy;
              Sleepy;
            end;
         end;
         until (barsleft<=0) or not(loggedin);
         Writeln('Player Done');
         //Logout;    isnt needed
         NextPlayer(False);
       until AllPlayersInactive;
    end;
    oh but in your smelting people dont trust coord clicking especially as there are no failsafes id make colorclicking as the main attempt and then coordclicking eg
    SCAR Code:
    'silver': begin
                      Wait(1000+random(200));
                      if findcolortolerance(x, y, 00000, xs, ys, xe, ye, 20) then
                      begin
                        mouse(x, y, 5, 5, false)
                      end else
                        begin
                          Mouse(200,435,2,2,False);
                        end;
                      Wait(200+random(20));
                      ChooseOption('X');
                      Wait(1000+random(200));
                      TypeSend(IntToStr(28+random(500)));//<whats this btw? itd just send a number
                    end;
    Edit:i didn't test either of them its just what i think :P
    Coord clicking is safe with randomness, as well, that was to type in how many bars .
    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
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Im lookin over it i will post what i think in a min

    Edit: 700th post

    Edit2:
    SCAR Code:
    Procedure SubMainLoop;
    Label
      BeginOfLoop;
    begin
     BeginOfLoop:
     repeat
       begin
         begin
           wait(300+random(25));
           OpenUpBank;
           WalkPathTo('furnace');
           SmeltItUp;
           WalkPathTo('bank');
           Proggy;
           Sleepy;
         end;
       end;
       until (barsleft<=0) or not(loggedin);
       if (barsleft<=0) or (not loggedin) then
       begin
         Writeln('Player Done');
         Logout;
         NextPlayer(False);
      end;
      if AllPlayersInactive then
       begin
         Writeln('No more players');
         Writeln('Terminating script')
         Proggy;
         TerminateScript;
       end;
         Goto BeginOfLoop;
    end;

    That is one way to do it with labels which i find very easy

    also your repeat until loop for the main loop says "until not loggedin" get rid of that as the submainloop should take care of that you also should make another qualifier for sleeping because it will do it every load...

    and you can do it like
    SCAR Code:
    Procedure SubMainLoop;
    begin
      repeat
        setupplayer    
        repeat
          begin
            begin
              wait(300+random(25));
              OpenUpBank;
              WalkPathTo('furnace');
              SmeltItUp;
              WalkPathTo('bank');
              Proggy;
              Sleepy;
            end;
          end;
        until (barsleft<=0) or not(loggedin);
        if (barsleft<=0) or (not loggedin) then
        begin
          Writeln('Player Done');
          Logout;
          NextPlayer(False);
        end;
      until AllPlayersInactive
        if AllPlayersInactive then
        begin
          Writeln('No more players');
          Writeln('Terminating script')
          Proggy;
          TerminateScript;
        end;
    end;

    there you go and i believe that should work fine, and you have my approval to post as-is if you would like to... you can get rid of the mainloop function altogether with this too

  7. #7
    Join Date
    Apr 2007
    Location
    Here
    Posts
    109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sirlaughsalot View Post
    Im lookin over it i will post what i think in a min

    Edit: 700th post

    Edit2:
    SCAR Code:
    Procedure SubMainLoop;
    Label
      BeginOfLoop;
    begin
     BeginOfLoop:
     repeat
       begin
         begin
           wait(300+random(25));
           OpenUpBank;
           WalkPathTo('furnace');
           SmeltItUp;
           WalkPathTo('bank');
           Proggy;
           Sleepy;
         end;
       end;
       until (barsleft<=0) or not(loggedin);
       if (barsleft<=0) or (not loggedin) then
       begin
         Writeln('Player Done');
         Logout;
         NextPlayer(False);
      end;
      if AllPlayersInactive then
       begin
         Writeln('No more players');
         Writeln('Terminating script')
         Proggy;
         TerminateScript;
       end;
         Goto BeginOfLoop;
    end;

    That is one way to do it with labels which i find very easy

    also your repeat until loop for the main loop says "until not loggedin" get rid of that as the submainloop should take care of that you also should make another qualifier for sleeping because it will do it every load...

    and you can do it like
    SCAR Code:
    Procedure SubMainLoop;
    begin
      repeat
        setupplayer    
        repeat
          begin
            begin
              wait(300+random(25));
              OpenUpBank;
              WalkPathTo('furnace');
              SmeltItUp;
              WalkPathTo('bank');
              Proggy;
              Sleepy;
            end;
          end;
        until (barsleft<=0) or not(loggedin);
        if (barsleft<=0) or (not loggedin) then
        begin
          Writeln('Player Done');
          Logout;
          NextPlayer(False);
        end;
      until AllPlayersInactive
        if AllPlayersInactive then
        begin
          Writeln('No more players');
          Writeln('Terminating script')
          Proggy;
          TerminateScript;
        end;
    end;

    there you go and i believe that should work fine, and you have my approval to post as-is if you would like to... you can get rid of the mainloop function altogether with this too
    I'm going to test right now. Thanks for the help, and what do you mean I need to make another qualifier for sleep? It works fine :-P


    Edit: It didn't fix my problem, but I like the mainloop so i'm keeping it (credits you)
    |==============================================|
    | Welcome To Smelting at Falador |
    |==============================================|
    Time Running: 10 Minutes and 17 Seconds
    Bars Made: 9
    Cannon Balls Made:36
    Loads Till Sleep: 3
    Bars Left: 791
    |==============================================|

    Player Done
    NextPlayer

  8. #8
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by welcome View Post
    I'm going to test right now. Thanks for the help, and what do you mean I need to make another qualifier for sleep? It works fine :-P
    It works fine, but it only runs through it once and then sleeps, for instance make it where you have a varible (user defined) for how many loads or how much time before sleep, and have it randomised, and how long you will sleep and such...

  9. #9
    Join Date
    Apr 2007
    Location
    Here
    Posts
    109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sirlaughsalot View Post
    It works fine, but it only runs through it once and then sleeps, for instance make it where you have a varible (user defined) for how many loads or how much time before sleep, and have it randomised, and how long you will sleep and such...
    It is already that way :-P it's not the sleeping i'm having a problem with. It will be in the middle of something (usually smelting) and just randomly jump through the procedures in the script; thus you get the

    Player Done
    NextPlayer

    I have no clue what is causing this. It is really funny to me because I have watched it happen probably 20+ times and everytime nothing is the same.

    Edit: If you look at my script again you will see that I have a procedure, sleepy, that checks if it is sleeping time which is the number of loads(user input) to do before sleeping. You won't see that user input in the script because it is a playerform declarations same as sleep time and if you even want the script to sleep.

  10. #10
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Dude i wish i knew what to tell you, (i have a hard time looking for errors in other peoples scripts) how bout you try writeln's a lot of places where you think it might be and see what is causing it that way

  11. #11
    Join Date
    Apr 2007
    Location
    Here
    Posts
    109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sirlaughsalot View Post
    Dude i wish i knew what to tell you, (i have a hard time looking for errors in other peoples scripts) how bout you try writeln's a lot of places where you think it might be and see what is causing it that way
    I know it's tough. I've tried for about four days to find it on my own. I did try the writeln's, the thing is that it is completley random. I'm thinking it is going to take a rewrite But before I did that I wanted to see if anyone else could figure it out. Thanks though for the mainloop I will definatly use that!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SmeltYourMother Dedicated Steel Smelting Script
    By hotice in forum First Scripts
    Replies: 60
    Last Post: 11-06-2009, 10:46 PM
  2. Richard's First Smelting Script
    By Richard in forum First Scripts
    Replies: 15
    Last Post: 03-07-2009, 08:07 PM
  3. Smelting Script
    By Shaxper in forum News and General
    Replies: 10
    Last Post: 12-01-2008, 05:38 PM
  4. [Beta]Welcome to Smelting[R] (First Script)
    By welcome in forum RS3 Outdated / Broken Scripts
    Replies: 34
    Last Post: 10-10-2008, 07:41 AM
  5. XCAN'S Smelting script
    By donderwolkq in forum First Scripts
    Replies: 1
    Last Post: 01-03-2008, 08:34 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
  •