Results 1 to 13 of 13

Thread: Im fixing a powermner..

  1. #1
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default Im fixing a powerminer..

    Im fixing a powerminer thats going to be realeased soon but i was wondering how do you drop uncuts?

    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    make bitmaps / dtms of the uncuts. If you find them in your inventory after full load, call a drop procedure
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  3. #3
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Quote Originally Posted by Starblaster100 View Post
    make bitmaps / dtms of the uncuts. If you find them in your inventory after full load, call a drop procedure

    So i would have to mine till i get every uncut? I was was thinking of something easier...

  4. #4
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, no you mine normally. And after ever full load of coal / iron, you check your inventory if there are any uncuts there. If so, then you drop them.
    PHP Code:
    Procedure DropUncuts;
    Begin
      
    While(FindDTM(UncutDTMxyMIX1MIY1MIX2MIY2))do
      
    Begin
        Mouse
    (xy33False);
        
    Wait(100 Random(70));
        If(
    FindText(xy'Drop'UpCharsMIX1MIY1MIX2MIY2))then
        Begin
          Mouse
    (xy33True);
          
    Wait(500 Random(500));
        
    end;
      
    end;
    end
    Something i quickly whipped together May need a little editting, and you have to create the DTM
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  5. #5
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Star i was wondering... Whats the difference of using 'While' 'Do' instead of 'If' 'Then'?

  6. #6
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    While does it multiple times. If does it once. Repeat if is the same as while. However I like repeat if better because it offers more flexibilty in the until condition.
    SCAR Code:
    program New;

    const
    booger=2; //dont touch
    whichone='whiledo'; //choose 'whiledo' or 'ifthen' or 'repeatifthen'

    begin
      case whichone of
        'whiledo':
        begin
          while booger=2 do
          begin
            writeln('lala');
          end;
        end;
        'ifthen':
         begin
           if booger =2 then writeln('lala');
         end;
        'repeatifthen':
         begin
           repeat
             if booger =2 then writeln('lala');
           until not(booger=2);
         end;
      end;
    end.



    Similiarly, I like
    SCAR Code:
    repeat
     i:=i+1;
     dostuff;
    until i=some number;

    //better than
    for i= 0 to some number do
    dostuff;
    end;

  7. #7
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Quote Originally Posted by Starblaster100 View Post
    lol, no you mine normally. And after ever full load of coal / iron, you check your inventory if there are any uncuts there. If so, then you drop them.
    PHP Code:
    Procedure DropUncuts;
    Begin
      
    While(FindDTM(UncutDTMxyMIX1MIY1MIX2MIY2))do
      
    Begin
        Mouse
    (xy33False);
        
    Wait(100 Random(70));
        If(
    FindText(xy'Drop'UpCharsMIX1MIY1MIX2MIY2))then
        Begin
          Mouse
    (xy33True);
          
    Wait(500 Random(500));
        
    end;
      
    end;
    end
    Something i quickly whipped together May need a little editting, and you have to create the DTM
    Thanks stary i will give you credit too

    And please unblock me on msn for whatever reason i did which i dont know.

    Thanks

  8. #8
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    np,

    As Boreas said above:

    PHP Code:
    While See_DTM do
    Begin
    ...
    end
    Is the same as:
    PHP Code:
    Repeat
    ...
    Until not(See_DTM
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  9. #9
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Not totally true.

    From SCAR Manual :

    Repeat loop is very similar, except the condition is checked at the end of the loop and it's exit condition (if it's true, the loop ends), so it always go through repeat-until loop at least 1 time.
    While-Do, won't go through the loop at least once.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  10. #10
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Then you can wrap everything in the repeat with an if then to check it before going through. Repeat until FTW!!

  11. #11
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Ok, i made the dtm for a uncut and puted it in, renamed it, changed the procedure a little bit star :P and put the procedure in the main loop, it compiles but it still just does the ores , any ideas?

  12. #12
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Ok i made the dtm, changed ur procedure a little bit star to fix the dtm and added the drop uncuts into the main line and it compiles but doesnt drop the uncuts still any ideas?

  13. #13
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    it hasnt found the dtm, simple as that. Remake it
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. fixing screen right after log in
    By x[Warrior]x3500 in forum OSR Help
    Replies: 2
    Last Post: 03-10-2009, 01:44 AM
  2. Fixing DTM's
    By AbsTrACt'^.| in forum OSR Help
    Replies: 14
    Last Post: 05-23-2008, 04:57 AM
  3. 4 errors Need Help Fixing
    By NiCbaZ in forum OSR Help
    Replies: 1
    Last Post: 04-11-2008, 06:10 AM
  4. help fixing a script
    By Raskolnikov in forum OSR Help
    Replies: 1
    Last Post: 01-15-2008, 12:16 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
  •