Results 1 to 13 of 13

Thread: Daedolon's FireCrafter [SIMBA]

  1. #1
    Join Date
    Oct 2010
    Location
    Mordor
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Daedolon's FireCrafter [SIMBA]

    I would like to point out for the record that I've never done one bit if coding in my entire life, so this was quite a struggle to get this working; I don't think I've ever been so frustrated in my life doing such a project. Roughly 2 weeks of work went into creating this script, most of which derived from the help of the tutorial section (my God I would have been doomed from the start without those tutorials). So without any further delay, I present my firecrafter:


    Instructions:
    1) You must be in the al Kharid bank
    2) Put all your rune essence in the first bank slot
    3) Put the fire talisman in first inventory slot
    4) Have rune essence in your inventory
    5) Rune the script




    Simba Code:
    program FireCrafter;
    {$DEFINE SMART}
    {$i srl\srl.scar}
    {$i reflection\reflection.simba}

    procedure DeclarePlayers;
    begin
      NumberOfPlayers(1); // How many players? 1 account = "1', 5 accounts = "5"...
      CurrentPlayer := 0; // Start at player "zero" (aka player 1)

      Players[0].Name := '';//Your RuneScape UserName
      Players[0].Pass := '';//Your RuneScape PassWord
      Players[0].Nick := ''; //3-4 letters from name
      Players[0].Active:= True;
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
      Players[0].Pin := '';
    end;

    Const
      FireAltar = 2456;
      PortalID = 2469;
      PlayerPositionX = 2584;
      PlayerPositionY = 4840;
      Craftingalter = 2482;
      FireTalisman = 1442;
      RuneEssence = 1436;
      FireRuneINV = 554;

    Var
      LoadsBanked, scriptRunning, TotalExperience, FireRunesCrafted : Integer;


    Function WalkFromBankToAltar : boolean;
    Var WalkingPath : TTileArray;
    Begin
      If Not LoggedIn then exit;
      R_findRandoms;
      //If(R_CountItemId(1436) <1) then Exit;
      WalkingPath := [Tile(3270, 3164), Tile(3276, 3173), Tile(3283, 3183),
                 Tile(3284, 3195), Tile(3288, 3199), Tile(3288, 3206),
                 Tile(3295, 3208), Tile(3301, 3217), Tile(3303, 3228),
                 Tile(3306, 3236), Tile(3306, 3248), Tile(3312, 3253)];
      Result := WalkPath (WalkingPath);
    end;

    Function FindAndEnterAltar : boolean;
    Var AltarObject: TRSObject;
        FirealtarTP: TPoint;
        t: Integer;
        Mytile: Ttile;
    Begin
      If Not LoggedIn then exit;
      R_findRandoms;
      Result := false;
        R_ClickItemID(FireTalisman, true, 'use');
        AltarObject := GetObjectByID(FireAltar, OBJECT_TYPE_INTERACTABLE, 15);
        Wait(250+random(250));
        FirealtarTp := TileToMs(Altarobject.Tile, 0);
        Mouse(FirealtarTP.x, FireAltarTp.y, 3, 3, true);
        MarkTime(t);
        Repeat
          R_findRandoms;
          Wait(50);
          Mytile := GetMypos;
          if(mytile.Y > 4000) then break;
        until (timefrommark(t)>8000)
        If (timefrommark(t)>8000) then writeln('Crap, we'+#39+'re lost') Else writeln('We have safely made it to the alter =)');
        Result := true;

    end;

    Function FindAltarCraftRunes : boolean;
    Var AltarObject: TRSObject;
        FirealtarTP: TPoint;
        t: Integer;
    Begin
      If Not LoggedIn then exit;
      R_findRandoms;
      result := false;
      WalkPath([Tile(PlayerPositionX, PlayerPositionY)]);
      AltarObject := GetObjectByID(CraftingAlter, OBJECT_TYPE_INTERACTABLE, 15);
      Wait(250+random(250));
      FirealtarTp := TileToMs(altarObject.tile, 0);
      Mouse(FirealtarTP.x, FirealtarTp.y, 3, 3, true);
      MarkTime(t);
      Repeat
        R_findRandoms;
        Wait(1000+random(1000));
        if(R_CountItemID(FireRuneINV)>0) then break;
      until (timefrommark(t)>8000)
      If(timefrommark(t)>8000) then writeln('Crap, we''re lost');
      If(R_CountItemID(FireRuneINV) >0) then result := true;
      wait(1000+random(1000));
    End;

    Function Leavealtar : boolean;
    Var PortalObject: TRSObject;
        PortalTp: TPoint;
        t: Integer;
        MyTile: TTile;
    Begin
      If Not LoggedIn then exit;
      result := false;
      R_findRandoms;
      Walkpath([Tile(2577, 4845)]);
      portalObject := GetObjectById(PortalID, OBJECT_TYPE_INTERACTABLE, 15);
      Wait(500+random(500));
      PortalTP := TileToMS(PortalObject.Tile, 0);
      Mouse(PortalTP.X, PortalTP.y, 3, 3, True);
      MarkTime(t);
      Wait(500+random(500));
      Repeat
        R_findRandoms;
        Wait(50);
        Mytile := GetMypos;
        if(Mytile.Y < 4000) then break;
      Until (timefrommark(t)>8000)
      Wait(50);
      If(timefrommark(t)>8000) then writeln('Crap, we'+#39+'re lost')
      Else
      begin
        writeln('We have made it out of the altar without any problems =)');
        result := true;
      end;
      Wait(4000+random(2000));
    end;

    Function WalkBackToBank : boolean;
    Var Walkbackpath: TTileArray;
    Begin
      If Not LoggedIn then exit;
      R_findRandoms;
      wait (2000+random(2000));
      result := false;
      Writeln('Now Walking back to bank');
      Walkbackpath := [Point(3312, 3252), Tile(3305, 3244), Tile(3296, 3233),
                 Tile(3297, 3225), Tile(3296, 3217), Tile(3290, 3209),
                 Tile(3286, 3200), Tile(3282, 3194), Tile(3283, 3187),
                 Tile(3281, 3181), Tile(3277, 3173), Tile(3274, 3164),
                 Tile(3270, 3164)];

      Result := WalkPath (walkbackpath);
      Wait(1500+random(1500));
    end;

    Function BankRunes : boolean;
    Begin
      If Not LoggedIn then exit;
      R_findRandoms;
      result := false;
      R_OpenBankBooth('akb');
      Wait(300+random(300));
      R_DepositAllButID(Firetalisman);
      Wait(1000+random(1000));
      Mouse(53, 108,3,3, false);
      Wait(500+random(500));
      Result := R_ChooseOptionMulti (['All', 'but']);
      Wait(250+random(250));
      Inc(LoadsBanked);
    end;

    Procedure ProgressReport;
    Var
      scriptRunningTime : String;
    Begin
      ClearDebug;
      scriptRunningTime := MsToTime ((TimeFromMark(scriptRunning)), 4);
    Writeln('=================================================================');
    Writeln('|| Number of loads done: ' +IntToStr(LoadsBanked) +'  ||  Time running: ' +scriptRunningTime + '||');
    Writeln('=================================================================');
    End;

    Procedure MainLoop;
    Begin
      MarkTime (scriptRunning);
      Repeat
        If WalkFromBankToaltar then
        Begin
          Writeln ('Walked from bank to altar');
          If FindAndEnteraltar then
          Begin
            Writeln ('Entered altar');
            If FindaltarCraftRunes then
            Begin
              Writeln ('Crafted runes');
              If(Random(2) = 2) then setrun(true);
              If leavealtar then
              Begin
                Writeln ('Left altar');
                If WalkBackToBank then
                Begin
                  Writeln ('Walked back to bank');
                  If BankRunes then
                  Begin
                    Writeln ('Banked load');
                    ProgressReport;
                  End else Writeln ('Had trouble banking runes');
                End else Writeln ('Had trouble walking back to bank');
              End else Writeln ('Had trouble leaving altar');
            End else Writeln ('Had trouble crafting runes');
          End else Writeln ('Had trouble finding/entering altar');
        End else
        begin
          NextPlayer (false);
        end;
      Until(AllPlayersInactive)
    end;

    procedure DefineVariables;
    begin
      Smart_Members := TRUE;
      Smart_Server := 121;
      Smart_Signed := TRUE;
      Smart_SuperDetail := False;
      LoadsBanked := 0;
      TotalExperience := 0;
      scriptRunning := 0;
      FireRunesCrafted := 0;
    end;

    begin
      DefineVariables;
      SetupSRL;
      SetupReflectionEx(true);
      DeclarePlayers;
      LogInPlayer;
      MakeCompass ('n');
      SetAngle (true);
      SetRun (true);
      MainLoop;
    end.


    Progress report:
    Simba Code:
    =================================================================
    || Number of loads done: 51  ||  Time running: 02.13.18||
    =================================================================


    Current bugs I am aware of:
    - Sometimes it does not find the bank booth.

    I do plan to add in a more descriptive progress report, and most importantly a function that will incorporate the fire tiara, making it more user friendly.

    I'm also well aware there are no "fail safes" in the script, and this is one thing I could never get right no matter how hard I tried. It seemed everytime I added in a fail safe, my script would mess up somewhere in the procedure and log out, or just not work altogether. So please, some help/ explination would be welcomed with GREAT appreciation. Thank you.
    Last edited by Daedolon; 12-05-2010 at 03:27 AM. Reason: Progress report

  2. #2
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    You could add support for tiaras, instead of just a talisman, since tiaras are the best.
    Here is the code for checking if tiara is equipped:
    Simba Code:
    IsEquippedID(5537);

    Returns true if equipped.
    Last edited by KingKong; 12-02-2010 at 03:15 AM.

  3. #3
    Join Date
    Oct 2010
    Location
    Mordor
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you, I will be sure to add that in right away.

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Maybe throw in some sample reports you've gotten while testing.

  5. #5
    Join Date
    Oct 2010
    Location
    Mordor
    Posts
    72
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes sir.

  6. #6
    Join Date
    Feb 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow, still working. It rox.
    ================================================== ===============
    || Number of loads done: 6 || Time running: 00.14.11||
    ================================================== ===============
    Thank you dude

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

    Default

    Great! Will look through code later - u can hold me to that - and here I was thinking SRL Army would need some runes.

    e: code seems clear and simple Well structured too.

    ~RM

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

  8. #8
    Join Date
    Dec 2011
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Exception in Script: Plugin(LibReflection32) has not been found
    doesn't work for me

  9. #9
    Join Date
    Oct 2006
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by ji894121 View Post
    Exception in Script: Plugin(LibReflection32) has not been found
    doesn't work for me
    Reflection no longer works, thus this script does not work bc it's reflection based. That's why you're getting the error.

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

    Default

    Support fire runes have risen too high and great exp.

  11. #11
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    12-02-2010 Why would you gravedig such an old thread :/

  12. #12
    Join Date
    Nov 2011
    Location
    Southern Finland
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Does this script work in Al-kharid, altho MSI is having problems with color recognizion is AK?

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

    Default

    Quote Originally Posted by Elmeri233 View Post
    Does this script work in Al-kharid, altho MSI is having problems with color recognizion is AK?
    If you read the post only a few posts above yours you would have found your answer

    The thread was "Last edited by Daedolon; 12-05-2010", it is not a colour script either so is at the moment not going to work and most likely won't for quite a while...

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
  •