Results 1 to 23 of 23

Thread: Neitiznot Gold Bar Maker

  1. #1
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Neitiznot Gold Bar Maker

    In the last week AK Smelter has been so temperamental that today I decided to write a script for myself in order to continue smelting. So within the last ten or so hours I taught myself the basic scripting for here and Pascal stuff and got to work.

    I am pretty certain that the following script works next to flawlessly. All suggestions on improving the script, be it a minor more effective way to write a line or a more substantial recommendation would be warmly welcomed!

    Simba Code:
    // !!!!!!!!!!! BEFORE PUBLISIHING REMOVE USER AND PASSWORD !!!!!!!!!!!!
    program iSmelter;
    {$i srl/srl/misc/smart.scar}
    {.include srl/srl.scar}

    const
      TOLERANCE = 35; // Change to min which works!

    var
      X, Y: integer;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
      NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
      CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
      Players[0].BoxRewards := ['Xp', 'ostume', 'oins', 'aphire', 'ssence']; // change to whatever suits
    end;

    procedure AntiRandoms;
    begin
      FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
      LampSkill := 'prayer'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the woddcutting skill
      LevelUp; // This is an Antiban procedure, but I find it more useful when called here because AntiRandoms is usually called more often than Antiban
    end;

    // maybe one for open bank, one for running and one for smelting?!?!
    procedure Antiban; // make this far more dynamic asap
    begin
      case Random(280) of // Random(x) generates a random integer from 0 to (x - 1)
        0: Wait(100+random(750));
        10: RandomRClick;
        20: HoverSkill('smithing', False);
        30: PickUpMouse;
        40..42: RandomMovement;
        50..52: BoredHuman;
        60: ExamineInv;
        70: RandomAngle(1);
        80..89: mMouse(0, 0, random(750), random(500));
        90: case Random(50) of
              0:  Typesend('cmon');
              1:  Typesend('lol');
              2:  Typesend('lagg');
              3:  Typesend('hmm');
              4:  Typesend('hurry');
              5:  Typesend('bored XD');
            end;
        100: GameTab(RandomRange(tab_Combat, tab_Notes));
      end;
    end;

    procedure SetCompass;
    var Deg: Variant;
    begin
      Deg := rs_GetCompassAngleDegrees;
      if (Deg > 9) then // works as an approx
      begin
       MakeCompass(7);
      end;
    end;

    procedure DepositAllNow;
    begin
      DepositAll;
      Wait(1000+random(250));
    end;

    procedure WithdrawOresNow;
    begin
      Withdraw(0, 0, 28); // collum, row, amount
      Wait(1000+random(250));
    end;

    procedure StartSmelt;
    begin
      X := 500;
      Y := 60;
      if (FindColorSpiralTolerance(X, Y, 7172802, MSX1, MSY1, MSX2, MSY2, TOLERANCE)) then
        Mouse(X, Y, 0, 0, false);
        ChooseOption('melt-ore');
        Wait(500+random(250));
        X := (220+random(80));
        Y := (380+random(80));
        Mmouse(X,Y, 0, 0);
        while (Flag) do
          if not LoggedIn then exit;
          if FindNormalRandoms then exit;
          Wait(200+random(350));
        Wait(1000+random(250));
    end;

    procedure OpenBankBox;
    begin
      X := 16;
      Y := 280;
      if (FindColorSpiralTolerance(X, Y, 7105649, MSX1, MSY1, MSX2, MSY2, TOLERANCE)) then
        Mouse(X, Y, 0, 0, false);
        ChooseOption('se');
        Wait(500+random(250));
        X := (375+random(40));
        Y := (290+random(35));
        Mmouse(X,Y, 0, 0);
        while (Flag) do
          if not LoggedIn then exit;
          if FindNormalRandoms then exit;
          Wait(200+random(350));
        Wait(900+random(150));
    end;

    function SelectOnScreen:boolean;
    var MakeX: Integer;
    begin
      MakeX := BitmapFromString(17, 8, 'meJyTaFkmgRvJr76OiUhVj0cLddX' +
            'z+SYCEfHqFTbchWhBRvjVE6kFWT3xWuDqgQgAUyW6TQ==');
      Result := (FindBitmapToleranceIn(MakeX, X, Y, MCX1, MCY1, MCX2, MCY2, TOLERANCE));
      FreeBitmap(MakeX);
    end;

    function ContainsOre:boolean;
    var
    ChosenOre: Integer;
    begin
      GameTab(25);
      ChosenOre := BitmapFromString(18, 12, 'meJxNkv8rA3EYx6/7Bzh2t/ui7D' +
            'fJplFsSEu+JF+a72k/rNVI+MW3rPmyEAuZtY1ZtxZJJBKRJpKl/F3' +
            'e56Pn7np3PXf3vD7P+3mec/r8tW19PMc5HG7cywOLYjQnrmQQk/CJ' +
            'CXGNp7uhZ9LVMVzXPkCUEIpKa7p9+1KKnYuRLCHc34VHJHv84frOU' +
            'afPT1TFVMygdq/lg3t5/w4xz5kX4sbeQPNgyN01gXJEVc7FDWrnSj' +
            'l6VFOvkLRZ4C0U7IFqHZtFOaJsCwn09U+dvmu5Ly3/DcNWEGoZmQF' +
            'OlLh6go7k+K1y/KxlP6oKP5peUjNv8EwgMr1D07BKlLSeRwKzBwqF' +
            'GKUknnAUgaAgouxbF/LejXz4oCRfDId6iSjrLjBGiFHMNprC9JCmp' +
            'ova2SdaA8WSMSsmIJiJlWIyTYJKF/GmbHxeCEZsyyl4AAI19QdZMr' +
            'aAXRDLxshiIbyBWWFKOI0S8Ktg3UAw0mqXlzo1l7KUhHPUBfgLpLa' +
            'UPA==');
      Result := (FindBitmapToleranceIn(ChosenOre, X, Y, 560, 214, 734, 457, TOLERANCE));
      FreeBitmap(ChosenOre);
    end;

    begin
      Smart_Server := 35; // Having the same world in all your scripts allows you to change scripts without smart restarting.
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      DeclarePlayers; // Calls the procedure, you can't forget this!
      LoginPlayer; // You want your player to login, right?

      repeat
      if FindNormalRandoms then Break; // meant to be exit or break?!?
      if not LoggedIn then Break;// Try and make it log back in?

      SetCompass;// set angle up to highest also??

      if (BankScreen) then // if bank is open
      begin
        if (InvFull) then
        begin
          if (ContainsOre) then
          begin
            CloseBank;
            Wait(200+random(350)); // sleep?
          end else
            DepositAllNow;
        end else
        WithdrawOresNow;

      end else
      begin
        if (ContainsOre) then // contains ore
        begin
          if (SelectOnScreen) then
          begin
            X := (235+random(45));
            Y := (400+random(50));
            Mmouse(X,Y, 0, 0);
            Wait(200+random(150)); // shorten
            if(IsUpText('ake All'))then
            begin
              Mouse(X, Y, 0, 0, true);
             While (ContainsOre) do
              begin
              if not LoggedIn then exit;
              if FindNormalRandoms then exit; // perhaps do not need ths line
              LevelUp; // not needed here and does not work?!?
              AntiRandoms;
              Antiban;
              Wait(350+random(150));
              end;
            end else
            begin
              writeln('Unable to click'); // Consider removing
              Wait(100+random(50));
            end;
          end else
            StartSmelt
        end else
          OpenBankBox; // open bank
      end;
      until(false);
    end.

  2. #2
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Hey Man can I ask why on your Mouse are you not using random pixel like
    Simba Code:
    Mouse(X, Y, 7, 7, True);
    As where you are going
    Simba Code:
    Mouse(X, Y, 0, 0, True);
    As it would be click mainly on the same pixel?
    I'm a noob at scripting so. Just wondering (:
    Ali

  3. #3
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Because I randomly decide the X and Y values beforehand therefore I don't have to make an already random value random. Truth be told I am not sure if I am doing it in the most effective manner :P

  4. #4
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Your in the same boat as me lol
    Does it do that as it is picking up on the Colours and choosing randomly between them?

  5. #5
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Aligndude View Post
    Your in the same boat as me lol
    Does it do that as it is picking up on the Colours and choosing randomly between them?
    Lol I was hoping to get advice with my script but I am happy to help you on this thread as well.

    In this case the mouse will randomly select an X and Y on the limit i want it to then wait, then confirm it can do the action i want it to (Make All) then left click (true being a left click).

    X := (235+random(45));
    Y := (400+random(50));
    Mmouse(X,Y, 0, 0);
    Wait(200+random(150));
    if(IsUpText('ake All'))then
    begin
    Mouse(X, Y, 0, 0, true);

  6. #6
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    I see and I prefer that wait to the one I'm using
    I'm use Wait(RandomRange(200, 300));
    But does that mean your clicking a set coordinates?
    Lol Sorry about all these questions

  7. #7
    Join Date
    Oct 2011
    Location
    Chicago
    Posts
    3,352
    Mentioned
    21 Post(s)
    Quoted
    437 Post(s)

    Default

    I like the idea but future reference auto-talking normally results in ban when doing something as repetitive as smithing (Real player stay there for a while too, and will notice the few words you say :P)




    Anti-Leech Movement Prevent Leeching Spread the word
    Insanity 60 Days (Killer workout)
    XoL Blog (Workouts/RS/Misc)

  8. #8
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The above is clicking a set of coordinates without any relations to colour or object detecion, it can do this due to the script checking (using a bitmap that the object it wants to click) is present straight beforehand.

  9. #9
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    I would change your coord clicking to object finding, but it's not bad for a first script! Keep it up
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  10. #10
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by R4nd0m View Post
    I like the idea but future reference auto-talking normally results in ban when doing something as repetitive as smithing (Real player stay there for a while too, and will notice the few words you say :P)
    Hmm, yea, good point.

  11. #11
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    I agree its a good Idea but It really need to read what they say and then it reacts to what they say. good Idea tho

  12. #12
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Camo Developer View Post
    I would change your coord clicking to object finding, but it's not bad for a first script! Keep it up
    Ok, will do thanks

  13. #13
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

    Camo, I couldn't seem to find any tuts on how to use object finder, any links or help
    Ali

  14. #14
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  15. #15
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Will this work for Gold Bracelets?
    Could you modify and release a script which crafts Gold Bracelets at Neitznot?

  16. #16
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    All you'd have to make it do is click a gold bar, then the smelter, and choose the gold bracelet mold. Should be like a 5 minute change.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  17. #17
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Simba Code:
    while (Flag) do
          if not LoggedIn then exit;
          if FindNormalRandoms then exit;
          Wait(200+random(350));

    //change to
        while (Flag) do
        begin
          if not LoggedIn then exit;
          if FindNormalRandoms then exit;
          Wait(200+random(350));
        end

    otherwise it only loops the findNormalRandoms.

    Also, u might want a proggie in ur next version

    -RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  18. #18
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @ Sir R. M8gic1an
    Thanks, have made the ammendents for the next version. Will also add a proggie in due course!

    @ S1N
    As Kyle/Camo said it shouldn't be too hard to do yourself, if I get my work for today done quickly and have time I will add it.

  19. #19
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just went crazy...

    Implemented gold bar then Gold Bracelet making, will now test it and iron it all out

    On a side note i don't think "LevelUp" function works anymore...
    Last edited by DarkCoder; 12-18-2011 at 01:47 PM.

  20. #20
    Join Date
    Nov 2011
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I was trying to modify this to make gold bracelets, but i'm not very good at programming. so can someone modify it and post the code here?

  21. #21
    Join Date
    Nov 2011
    Posts
    83
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    u cud always use narcles... which already has a string created for gold bracelets

  22. #22
    Join Date
    Nov 2011
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    narcles?

  23. #23
    Join Date
    Nov 2011
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Mink View Post
    u cud always use narcles... which already has a string created for gold bracelets
    i tried that but i always get this message.

    Player 0 has no name, making inactive for now.
    Error: Type Mismatch at line 1806
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

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
  •