Results 1 to 13 of 13

Thread: FindAxe

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

    Default FindAxe

    Ok, well I have been searching the entire site for some help with this. My skiller account has a high Wc and a low Att lvl. I can't wield the Rune axe. So I was thinking about adding procedure into my script that wouldn't make it equip the axe. Every woodcutting script tries to make me wield it. Is this how I would set it up?

    This would be the declare players.
    SCAR Code:
    Players[0].Name := ''; // your runescape account
      Players[0].Pass := ''; // your runescape password
      Players[0].Nick := ''; // 3-4 letters of your runscape username
      Players[0].Active := True; //In the script or not
      Players[0].booleans[0] := True; // Axe in first slot?

    The variables are global, I am just using a new tab to write it.
    SCAR Code:
    Var
      x,y: Integer;
      EquipAxe: Boolean;

    Procedure CheckForAxe;
    Begin
    If FindAxe then
      begin
        WriteLn('Found Axe');
      end;
      if Players[currentplayer].booleans[0] then
      begin
        EquipAxe := False;
        Result := True;
      end else
      begin
        Result := FindAxe;
      end;
    End;

    Would setting it up like that keep it from trying to equip the axe? Any help would be appreciated. I have searched but really didn't find anything useful.

    ~Camo

    P.S. Sorry but I have too.
    Whoo 400 posts! Lol...ok back to normal
    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.


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

    Default

    since it just is a powerminer, why dont you just have it NOT drop the first inv slot and not have the script equip pic at all?

    I think thats the easiest way lol

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

    Default

    Well it want's to equip the axe and I don't want it to. My att is 10 and wc is 53 on my skiller. So it ruins the whole script for me -.-

    ~Camo
    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.


  4. #4
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Hmmm?

    SCAR Code:
    Var
      x, y, Axe: Integer;
      EquipAxe: Boolean;

    Function CheckForAxeAndWeild : Boolean;
    Begin
      Axe := DTMFromString('Blah');
      If FindAxe then
      begin
        WriteLn('Found Axe');
        if Players[currentplayer].booleans[0] then
        begin
          if findDTM(Axe, x, y, MIX1, MIY1, MIX2, MIY2) then
          begin
            mmouse(x, y, 5, 5);
            wait(80+random(80));
            if isuptext('xe') then
            begin
              getmousepos(x, y);
              mouse(x, y, 0, 0, true);
              wait(100+random(100));
            end else
            begin
              writeln('[Error] Wrong uptext!');
              Result := False;
              FreeDTM(Axe);
              Logout;
              Players[CurrentPlayer].Active := False;
              Exit;
            end;
          end else
          begin
            writeln('[Error] Could not find Axe!');
            Result := False;
            FreeDTM(Axe);
            Logout;
            Players[CurrentPlayer].Active := False;
            Exit;
          end;
        end else exit;
      end else
      begin
        writeln('[Error] Could not find Axe in inventory!');
        Result := False;
        FreeDTM(Axe);
        Logout;
        Players[CurrentPlayer].Active := False;
        Exit;
      end;
      Result := True;
      FreeDTM(Axe);
    End;
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

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

    Default

    Nice, I know that the code will equip it. But I want it to stop from equipping. Thanks tho.

    ~Camo
    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.


  6. #6
    Join Date
    Jan 2008
    Location
    UK
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try this:

    SCAR Code:
    {*******************************************************************************
    function FindTheAxe(var AxePos: integer; var TypeOfAxe: string; AxeInInv: boolean): boolean;
    By: PriSoner
    Description: Attempts to find an axe in the players inventory or hand.
                 If an axe is found it checks to see if the player can use it for
                 woodcutting and checks to see if it can be wielded. If an axe has to be
                 in the inventory it always moves it to slot 1 if it isn;t already there.
    AxeInInv: Set to True and it will move axe from hand to inventory slot 1 if it can.
              Set to False and it will move axe from inventory to hand.
    AxePos: Returns 0 if no axe is found, 1 if Axe is in hand & 2 if axe is in inventory.
            It does this because even if you have Set AxeInv to False it is still
            possible that the axe may not be wieldable. Usefull to know if depositing in bank etc.
    TypeOfAxe: Return the Type of Axe Being used or 'None Found' if no axe is present.

    FindTheAxe returns True if a usable axe is found.
    *******************************************************************************}

    type AllAxes = record
        AxeDTM: integer;
        AxeName: string;
        MinLvl: integer;
        AttLvl: integer;
    end;
    function FindTheAxe(var AxePos: integer; var TypeOfAxe: string; AxeInInv: boolean): boolean;
    var ax, ay, SklWood, SklAtt, ctab, DTMAxe: integer;
        i: integer;
        AxeList: Array of AllAxes;
    begin
        SetLength(AxeList, 8);
        AxeList[0].AxeDTM  := DTMFromString('78DA6314616060E0664001A962BC0CFC409A1' +
            '188FF0301231790C1C58006189148202D03243809A81106124204' +
            'D430010919FC6A00E8B5053D');
        AxeList[0].AxeName := 'Dragon Axe';
        AxeList[0].AttLvl  := 60;
        AxeList[0].MinLvl  := 61;

        AxeList[1].AxeDTM  := DTMFromString('78DA639CCEC4C0F09401051485F1318800694' +
            '620FE0F048C4B806AEEA2AA718E4864E082AA0101C6C54035F751' +
            'D5D887C6A1AA590A547313558D4B740A8A1A00CFA10E03');
        AxeList[1].AxeName := 'Rune Axe';
        AxeList[1].AttLvl  := 40;
        AxeList[1].MinLvl  := 41;

        AxeList[2].AxeDTM  := DTMFromString('78DA6374606060686440014D497C0C22409A1' +
            '188FF0301A337905187AAC6C6D786810BAA0604187D804415AA1A' +
            '7B7F7B5435BE40A21C558D73B0338A1A00C1660AA8');
        AxeList[2].AxeName := 'Adamant Axe';
        AxeList[2].AttLvl  := 30;
        AxeList[2].MinLvl  := 31;

        AxeList[3].AxeDTM  := DTMFromString('78DA633CC4C4C010C0C8800C5A53F81852803' +
            '448F43F10309E05AAF14155636111CCC0055503028CE7816A5C51' +
            'D5D839C4A2AA3981A9C6C52D0D450D0061FC0C64');
        AxeList[3].AxeName := 'Mithril Axe';
        AxeList[3].AttLvl  := 20;
        AxeList[3].MinLvl  := 21;

        AxeList[4].AxeDTM  := DTMFromString('78DA63E4656060E06240038C0C1C609281E13' +
            'F1030F200194C986A1024901606126CA82AC4444450D5B0020919' +
            'FCE60000E9AC04AD');
        AxeList[4].AxeName := 'Black Axe';
        AxeList[4].AttLvl  := 10;
        AxeList[4].MinLvl  := 6;

        AxeList[5].AxeDTM  := DTMFromString('78DA63CC636260D8C3C8800C5A53F81852803' +
            '448F43F10305602D5EC4055939B9ACAC0055503028CD540351B51' +
            'D594E5E5A2AA29C154D3545989A20600C3BC0E32');
        AxeList[5].AxeName := 'Steel Axe';
        AxeList[5].AttLvl  := 5;
        AxeList[5].MinLvl  := 6;

        AxeList[6].AxeDTM  := DTMFromString('78DA63BCC9C4C0309191010498182020C6859' +
            '34103488344FF0301E353A04C2F230332F0707161E082AA0101C6' +
            '0740356DA86A22838351D5BC00AAE94655932ACA89AAE639A6394' +
            '1DEDE286A00B1F90F6D');
        AxeList[6].AxeName := 'Iron Axe';
        AxeList[6].AttLvl  := 1;
        AxeList[6].MinLvl  := 1;

        AxeList[7].AxeDTM  := DTMFromString('78DA63EC626060086140016DA97C0C22409A1' +
            '188FF0301E33420C307558D97A5220317540D08304E051201A86A' +
            'DCCCE451D54C07129EA86AFC6C5450D40000D77E0AA2');
        AxeList[7].AxeName := 'Bronze Axe';
        AxeList[7].AttLvl  := 1;
        AxeList[7].MinLvl  := 1;

        ctab := GetCurrentTab;
        SklWood := GetSkillInfo('woodcutting',False);
        SklAtt  := GetSkillInfo('attack', False);

        for i := 0 to High(AxeList) do
        begin
            GameTab(4);
            DTMAxe := AxeList[i].AxeDTM;
            if FindDTM(DTMAxe, ax, ay, 546, 203, 737, 466) then
            begin
                if (SklWood < AxeList[i].MinLvl) then
                begin
                    writeLn('Found ' + AxeList[i].AxeName + ' but you do not have a high enough Woodcutting level to use it.');
                    writeLn('You Need to be Woocutting Level ' + IntToStr(AxeList[i].MinLvl) + ' or higher.');
                    writeLn('Looking for another axe..........');
                end else
                begin
                    if (SklAtt >= AxeList[i].AttLvl) and not AxeInInv then
                    begin
                        writeLn('Found a ' + AxeList[i].AxeName + ' and moving it into your players hand.');
                        Mouse(ax, ay, 10, 4, true);
                        wait(600 + Random(600));
                        AxePos   := 1;
                        AxeInInv := false;
                    end else
                    begin
                        if (ax < 600) and (ay < 245) then writeLn('Found a ' + AxeList[i].AxeName + '.') else
                        begin
                            writeLn('Found a ' + AxeList[i].AxeName + 'and moving it to slot 1.');
                            MMouse(ax, ay, 0, 0);
                            HoldMouse(ax, ay, true);
                            wait(600 + Random(600));
                            MMouse(575, 230, 0, 0);
                            ReleaseMouse(575, 230, true);
                        end;
                    AxePos   := 2;
                    AxeInInv := true;
                    end;
                    wait(500 + Random(400));
                    result:= true;
                    FreeDTM(DTMAxe);
                    GameTab(ctab);
                    TypeOfAxe := AxeList[i].AxeName;
                    exit;
                end;
            end;
        end;

        for i := 0 to High(AxeList) do
        begin
            GameTab(5);
            DTMAxe := AxeList[i].AxeDTM;
            if FindDTM(DTMAxe, ax, ay, 568, 285, 603, 321) then
            begin
                AxePos   := 1;
                if AxeInInv then
                begin
                    writeLn('Found a ' + AxeList[i].AxeName + ' in your players hand. Moving to slot 1 of inventory.');
                    Mouse(ax, ay, 1, 1, true);
                    wait(700 + random(700));
                    GameTab(4);
                    wait(700 + random(700));
                    FindDTM(DTMAxe, ax, ay, 546, 203, 737, 466);
                    if not (ax < 600) and (ay < 245) then
                    begin
                        MMouse(ax, ay, 0, 0);
                        HoldMouse(ax, ay, true);
                        wait(600 + Random(600));
                        MMouse(575, 230, 0, 0);
                        ReleaseMouse(575, 230, true);
                    end;
                AxePos   := 2;
                end else writeLn('Found a ' + AxeList[i].AxeName + ' in your players hand.');
                result:= true;
                FreeDTM(DTMAxe);
                GameTab(ctab);
                TypeOfAxe := AxeList[i].AxeName;
                exit;
            end;
        end;
        AxePos   := 0;
        result:= false;
        TypeOfAxe := 'None Found';
        FreeDTM(DTMAxe);
        GameTab(ctab);
    end;

    I haven't used it in a while. It should still work perfectly however a few of the dtms may need updating.

    This checks to see if you can use the axe and also checks to see if you can equip it. If it can't be equipt then it moves the axe to slot 1. if it can be equipt it equipts it.
    For the Ultimate Monk Fisher: Ultra Monkfish n Bank Click Here


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

    Default

    That's exactly what I'm looking for =] Thank you so much! +Rep!

    Ok, I have the FindTheAxe function set up but I keep getting an error. No matter what I do I get either a TypeMismatch or Unknown identifier for the AxeInInv spot. I can't figure this out. This is a major update for my Powerchopper and I need this. Any help would be appreciated.
    SCAR Code:
    Var
      x, y, i, Color: Integer;
      LoadsDone, Drops, Loads, Gained, Level: Integer;
      UpTexts : Array Of String;
      ax, ay, SklWood, SklAtt, ctab, AxePos, TypeOfAxe, DTMAxe: integer;

    FindTheAxe(AxePos,TypeOfAxe,AxeInInv);

    ~Camo
    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.


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

    Default

    I'm sorry for double post, but I can't seem to find a fix for it. I've been looking at it for hours. -.- Any help?

    ~Camo
    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.


  9. #9
    Join Date
    Jan 2008
    Location
    UK
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you have TypeOfAxe as an integer in the little bit of the script you have posted.. it needs to be a string.
    For the Ultimate Monk Fisher: Ultra Monkfish n Bank Click Here


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

    Default

    Ok, well now I have TypeOfAxe as a string and AxePos as an Integer. But I can't fix the AxeInInv error. I get an unknown identifier. -.- Any help?

    ~Camo
    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.


  11. #11
    Join Date
    Jan 2008
    Location
    UK
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    pm me your script i'll have a look and post the answer
    For the Ultimate Monk Fisher: Ultra Monkfish n Bank Click Here


  12. #12
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    AxeInInv is meant to be a value (true or false), not a variable that you stick into the function to have something returned. You can either use a variable from the players array that you assign to be whether the axe is equipped or not, or just simply type true or false in that space.
    :-)

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

    Default

    Omg, I just realized that. I was over looking it because I was trying to make it complicated Thanks.

    ~Camo
    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.


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SRL findaxe function
    By quipeace in forum OSR Help
    Replies: 3
    Last Post: 03-08-2008, 08:41 AM
  2. FindAxe always False, doesn't even try
    By stein3 in forum OSR Help
    Replies: 10
    Last Post: 12-29-2007, 09:04 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
  •