Results 1 to 4 of 4

Thread: [OSR] First PowerMiner

  1. #1
    Join Date
    Dec 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [OSR] First PowerMiner

    I made this from Torrent of Flame's tutorial: "Updated Guide to Making a PowerMiner". I'd give you a link but I can't yet. Just search for that exact thread title.

    It is slightly outdated and I haven't found anything better for OSRS scripts yet. (Like a kiddie walk-thru script write)

    I have a some questions.

    1) Do I need to call the procedure AntiRandoms in my main loop? Flame's tut excluded it from his main loop.

    2) I tried to include
    Code:
    FindFight;
    in my AntiRandoms procedure. It wasn't found. Is there an alternative to this? Does "FindNormalRandoms" call this? It was included in Flame's tut.

    3) Like "2)" except with
    Code:
    FindLamp;
    . Same questions. I ended up removing the AntiRandoms procedure entirely.

    3) Did I call
    Code:
    FindNormalRandoms;
    correctly? Sin's tutorial: "[TUT]Calling FindNormalRandoms Correctly!" indicates that I didn't. However I don't fully comprehend why Sin's version is correct and what it does.

    Code compiles. I sat it at the mine south of the legends guild. It right clicked about 10 times until it found the rock which it then mined. It continued to mine the depleted rock

    Script:
    Code:
    program CheapMiner;
    
    {$DEFINE SMART8}
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    
    //Creds to Torrent of Flame. I followed his powerminer tutorial
    
    
    const
    RockColor1= 1976128;
    RockColor2= 2700888;
    OreColorIron= 2305869;
    
    var
      x, y, Tries: Integer;
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0
    
      Players[0].Name   :='';
      Players[0].Pass   :='';
      Players[0].Nick   :='';
      Players[0].Active := True;
    end;
    
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(63) of
        1: HoverSkill('random', False);
        2: RandomMovement;
        3: PickUpMouse;
        4: RandomRClick;
        5: BoredHuman;
        6: ExamineInv;
        7: RandomTab(True);
        8: HoverSkill('mining', False);
        9: Wait(2394 + Random(4829));
      end;
    end;
    
    procedure MineRocks;
    begin
    if not LoggedIn then
      Exit;
      if (not (FindObjCustom(x, y, ['Mi', 'ne'], [RockColor1, RockColor2], 7))) then
        Wait(100+Random(100));
        Tries := Tries + 1;
        if (Tries = 20) then
          begin
            Logout;
            Exit;
          end else
      if FindObjCustom (x, y, ['Min', 'ine'], [RockColor1, RockColor2], 7) then
      repeat
        case (Random(2)) of
          1: begin Mouse(x, y, 4, 4, False);
          ChooseOption('ine');
          end;
          2: Mouse(x, y, 4, 4, True);
        end;
      until (InvFull);
    end;
    
    procedure DropInv;
    begin
      if FindObjCustom(x, y, ['Ore'], [OreColorIron], 7) then
      DropAllExcept([1]);
    end;
    
    begin
      SetupSRL;
      DeclarePlayers;
      LogInPlayer;
      repeat
        MineRocks;
        DropInv;
        AntiBan;
      until (False)
    end.
    Any tips/tutorials/ways to learn to code are appreciated. I have a lot of trouble finding something to make with the tutorials available.

    Thanks
    Last edited by Ender; 12-11-2013 at 10:26 AM.

  2. #2
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Well Ok I will try and break it down.
    First, on the calling the randoms, you should be able to just call FindNormalRandoms, but in all honestly so few randoms are actually working atm it usually won't pick them up and in my experience will just go out of range if a random is found. Seeing as you edited your post with it now working, i'm glad you figured out that you need to have a begin and end on each of the cases. It looks good for your first script, I would just suggest looking at other peoples scripts and read more tutorials. The next thing that you will want to learn about is using Auto Color and TPA's. The latter will completely change the way that your scripts run.
    Pm me if you have any questions or need anything!
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  3. #3
    Join Date
    Dec 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks a lot elfyyy. I'll definitely check out those tuts. I'm looking at pascal tutorials as well. I appreciate your offer for help in the future!

    All the best!

  4. #4
    Join Date
    Dec 2013
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    29 Post(s)

    Default

    Good try man trying to make one atm myself

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
  •