Results 1 to 25 of 25

Thread: Need Help with script

  1. #1
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need Help with script

    Hello, I am trying to run this script that I made but when I rune the withdraw essence procedure it just skips it, but when I rune it seprately it works fine.


    Simba Code:
    Program JoesAstralCrafterV2;

    //{$DEFINE SMART}
    {$i SRL/srl.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}

    Const
      Pouches = True; // Change to False if not using pouches.
      GiantPouchSpot = 1; // Giant pouch spot in your inventory, 0 if not using it
      LargePouchSpot = 2; // Large pouch spot in your inventory, 0 if not using it
      MediumPouchSpot = 3; // Medium pouch spot in your inventory, 0 if not using it
      SmallPouchSpot = 0; // Small pouch slot in your inventory, 0 if not using it
      EssenceSpot = 1; // Spot of essence in your bank
      AstralRuneSpot = 4; // Spot of astral in inventory
      CosmicRuneSpot = 3;
      LawRuneSpot = 4;
      HP = 84; // Your Health Level
      Rest = 25; //% run to rest at
      Food = 2;  // Bank Spot of Sharks
      Version = 1.0;




    //SRL Stats
      SRLStats_Username = '';
      SRLStats_Password = '';



    //Break settings
      BreakIn      = 180;          //How long before we take a break? (minutes)
      BreakFor     = 13;           //How long will we break for? (minutes)
      Bir          = 7;           //Random minutes to add/subtract from how long until we break
      Bfr          = 3;            //Random minutes to add/subtract from break duration

    Var
    X, Y, Shark:Integer;

    Procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        with Players[0] do
        begin
          Name        := '';
          Pass        := '';
          Pin         := '';
          BoxRewards  := ['XP','xp','lamp'];
          LampSkill   := Skill_Runecrafting;
          Active      := True;
        end;
      end;


    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////DO NOT TOUCH BEYOND THIS POINT//////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    procedure WelcomeMessage;
    begin
      WriteLn('Welcome to Joes Astral Crafter');
    end;
    Procedure AntiBan;
    Begin
       Case Random(500) Of

        0: HoverSkill('Runecrafting', True);

        1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;

        2: RandomAngle(1);

        3: RandomRClick;

        4: FindDead();
      end;
     end;
    Procedure FailSafe(Reason:String);
    begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      FindSpinTicket();
      TerminateScript;
    end;
    Procedure DTMs;
    Begin
    Shark := DTMFromString('m6wAAAHiclcyxCYAwGAXhFy2ziyu4hAsJIQRE02hhIKBO6hV/YRkPvva8pLWXgkk4Uc2OBTMyNifdyAhIOPDgQjER0zhw7xq153749ALTMg2S');
    end;
    procedure AntiRandoms;
    begin
      FindNormalRandoms;
      LevelUp;
    end;
    function DecayedPouch: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.30, 0.26);

      FindColorsSpiralTolerance(MICX, MICY, arP, 2764080, MIX1, MIY1, MIX2, MIY2, 7);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 1.24) and (X <= 4.58) and (Y >= 1.29) and (Y <= 4.77) and (Z >= 1.20) and (Z <= 4.44) then
        begin
          Result := arC[i];
          Writeln('AutoColor = ' + IntToStr(arC[i]));
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;
    Procedure RepairRunePouch;
    Begin
    If BankScreen then
    If FindObjTPA(X, Y, DecayedPouch, 5, 2, 10, 10, 50, ['Empty']) then
      Begin
      MouseBankSlot(CosmicRuneSpot, mouse_Left);
      MouseBankSlot(LawRuneSpot, mouse_Left);
      CloseBank;
        Begin
        GameTab(Tab_Magic);
        MouseBox(698, 476, 712, 489, 1);
          Begin
          If FindObjTPA(X, Y, DecayedPouch, 5, 2, 10, 10, 50, ['Empty']) then
          MMouse(x, y, 5, 5);
          ClickMouse2(True);
          end;
        end;
      end;
    end;
    procedure Eat;
    begin
    AntiRandoms
    AntiBan;
    Begin
      MouseBankSlot(Food, 0);
      ChooseOption('3');
      Wait(RandomRange(600, 1000));
      repeat
        If FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2) then
           Mouse(x, y, 5, 5, mouse_Right);
           ChooseOption('Eat');
           Wait(RandomRange(700,1000));
      until (HPPercent = 100);
      if FindDTM(Shark, x, y, MIX1, MIY1, MIX2, MIY2) then
      begin
        repeat
          FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2);
          Mouse(x, y, 5, 5, mouse_Left);
          Wait(1000);
        until not FindDTM(Shark, x, y, MIX1, MIY1, MIX2, MIY2);
      end;
    end;
    end;
    Function LocateBank:Boolean;
    Var
       TPAA: T2DPointArray;
       TPA: TPointArray;
       CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6057336, MSX1, MSY1, MSX2, MSY2, 1); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 77, 24); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], X, Y);
          MMouse(X, Y, 3, 3);
           if IsUpText('ank ooth') then
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,5,5,True);
            Break;
          End;
          until (Retry = 2);
          Break;
          end;
          end;
    Procedure WithdrawEssence;
    Begin
    AntiRandoms;
    AntiBan;
      Begin
      If BankScreen then
      MouseBankSlot(EssenceSpot, mouse_Right);
      if WaitOption('Withdraw-All',2000) then
      begin
      ChooseOption('All');
      Wait(RandomRange(1000, 1200));
      InvMouse(GiantPouchSpot, mouse_Right);
      ChooseOption('Fill');
      Wait(RandomRange(1000, 1200));
      InvMouse(LargePouchSpot,mouse_Right);
      ChooseOption('Fill');
      MouseBankSlot(EssenceSpot, mouse_Right);
      if WaitOption('Withdraw-All', 500) then
      ChooseOption('All');
      Wait(RandomRange(1000,1200));
      InvMouse(MediumPouchSpot, mouse_Right);
      ChooseOption('Fill');
      MouseBankSlot(EssenceSpot, mouse_Right);
      if WaitOption('Withdraw-All', 500) then
      ChooseOption('All');
      end;
    end;
    end;
    procedure WalkToAltar;
    begin
      ObjDTM_Walk('131:120:2:0:7:75:127:0:7:98:131:4:124:115:137:115:135:129:128:127', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('75:142:3:0:7:36:123:0:7:48:91:0:7:102:138:4:68:134:80:136:78:146:67:147', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('98:136:2:0:7:44:60:0:7:110:75:4:92:130:105:128:104:142:93:141', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('131:108:2:2:7:101:72:2:7:113:72:4:124:101:136:103:137:114:127:112', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('113:113:3:2:7:105:123:2:7:94:80:2:7:117:131:4:108:112:118:107:121:119:108:120', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('146:90:3:2:7:74:92:2:7:86:100:2:7:109:88:4:139:87:147:85:150:96:135:100', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('122:74:2:2:7:62:76:2:7:38:88:4:117:71:131:68:126:83:115:81', 0, 100, 80, True);
    end;
    Function FindAltar:Boolean;
    Var
       TPAA: T2DPointArray;
       TPA: TPointArray;
       CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 8025208, MSX1, MSY1, MSX2, MSY2, 1); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 19, 3); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], X, Y);
          MMouse(X, Y, 3, 3);
           if IsUpText('ltar') then // Enter The name of Your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,True);
            Break;
          End;
          until (Retry = 2);
          Break;
          end;
          end;
    Procedure CraftRunesInPouch;
    Begin
    If FindAltar then
    If Pouches = True then
      Begin
      Wait(RandomRange(800, 1000));
      InvMouse(GiantPouchSpot, mouse_Right);
      ChooseOption('Empty');
      MMouse(x, y, 5, 5);
      ClickMouse2(True);
      Wait(RandomRange(1200, 1500));
      InvMouse(LargePouchSpot,mouse_Right);
      ChooseOption('Empty');
      MMouse(x, y, 5, 5);
      ClickMouse2(True);
      Wait(RandomRange(1200,1500));
      InvMouse(MediumPouchSpot,mouse_Right);
      ChooseOption('Empty');
      MMouse(x, y, 5, 5);
      ClickMouse2(True);
      Wait(RandomRange(1200,1500));
      InvMouse(SmallPouchSpot,mouse_Right);
      ChooseOption('Empty');
      MMouse(x, y, 5, 5);
      ClickMouse2(True);
      Wait(RandomRange(1200,1500));
      end;
    end;
    Procedure TeleToIsle;
    Begin
    AntiRandoms;
    AntiBan;
    Begin
      GameTab(Tab_Magic);
      MouseBox(562, 217, 585, 240, mouse_Left);
        Begin
        Wait(1000);
        LodestoneTeleport('Lunar Isle')
        ClickMouse2(True);
        Wait(18000);
        end;
    end;
    end;
    procedure WalkToBank;
    begin
      ObjDTM_Walk('120:86:2:0:7:99:122:0:7:96:59:4:113:79:126:81:123:93:116:93', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('95:53:2:0:7:58:50:0:7:96:101:4:88:49:99:50:96:60:91:59', 0, 100, 80, True);
      Wait(500);
    end;
    begin
    SetupSRL;
    ObjDTM_Setup;
    repeat
    repeat
    If LocateBank then
    WithdrawEssence;
    until(CloseBank)
    //WalkToAltar;
    //CraftRunesInPouch;
    //TeleToIsle;
    //WalkToBank;
    until(false);
    end.
    Last edited by Joepetey; 05-15-2012 at 08:43 PM.

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    You're in the wrong section.. You should be asking on his thread where the script originated, http://villavu.com/forum/showthread.php?t=81964

    Also, using simba tag's [simba ] makes it muuuuch easier to read

  3. #3
    Join Date
    Nov 2011
    Location
    MA
    Posts
    545
    Mentioned
    3 Post(s)
    Quoted
    10 Post(s)

    Default

    I'll think you'll be able to spot a few problems with these standards:

    Simba Code:
    Program JoesAstralCrafterV2;

    //{$DEFINE SMART}
    {$i SRL/srl.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}

    Const
      Pouches = True; // Change to False if not using pouches.
      GiantPouchSpot = 1; // Giant pouch spot in your inventory, 0 if not using it
      LargePouchSpot = 2; // Large pouch spot in your inventory, 0 if not using it
      MediumPouchSpot = 3; // Medium pouch spot in your inventory, 0 if not using it
      SmallPouchSpot = 0; // Small pouch slot in your inventory, 0 if not using it
      EssenceSpot = 1; // Spot of essence in your bank
      AstralRuneSpot = 4; // Spot of astral in inventory
      CosmicRuneSpot = 3;
      LawRuneSpot = 4;
      HP = 84; // Your Health Level
      Rest = 25; //% run to rest at
      Food = 2;  // Bank Spot of Sharks
      Version = 1.0;




    //SRL Stats
      SRLStats_Username = '';
      SRLStats_Password = '';



    //Break settings
      BreakIn      = 180;          //How long before we take a break? (minutes)
      BreakFor     = 13;           //How long will we break for? (minutes)
      Bir          = 7;           //Random minutes to add/subtract from how long until we break
      Bfr          = 3;            //Random minutes to add/subtract from break duration

    Var
      X, Y, Shark:Integer;

    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Name        := '';
        Pass        := '';
        Pin         := '';
        BoxRewards  := ['XP','xp','lamp'];
        LampSkill   := Skill_Runecrafting;
        Active      := True;
      end;
    end;


    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////DO NOT TOUCH BEYOND THIS POINT//////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    procedure WelcomeMessage;
    begin
      WriteLn('Welcome to Joes Astral Crafter');
    end;

    Procedure AntiBan;
    Begin
      Case Random(500) Of

        0: HoverSkill('Runecrafting', True);

        1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;

        2: RandomAngle(1);

        3: RandomRClick;

        4: FindDead();
      end;
    end;

    Procedure FailSafe(Reason:String);
    begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      FindSpinTicket();
      TerminateScript;
    end;

    Procedure DTMs;
    Begin
      Shark := DTMFromString('m6wAAAHiclcyxCYAwGAXhFy2ziyu4hAsJIQRE02hhIKBO6hV/YRkPvva8pLWXgkk4Uc2OBTMyNifdyAhIOPDgQjER0zhw7xq153749ALTMg2S');
    end;

    procedure AntiRandoms;
    begin
      FindNormalRandoms;
      LevelUp;
    end;

    function DecayedPouch: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.30, 0.26);

      FindColorsSpiralTolerance(MICX, MICY, arP, 2764080, MIX1, MIY1, MIX2, MIY2, 7);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 1.24) and (X <= 4.58) and (Y >= 1.29) and (Y <= 4.77) and (Z >= 1.20) and (Z <= 4.44) then
        begin
          Result := arC[i];
          Writeln('AutoColor = ' + IntToStr(arC[i]));
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;

    Procedure RepairRunePouch;
    Begin
      If BankScreen then
        If FindObjTPA(X, Y, DecayedPouch, 5, 2, 10, 10, 50, ['Empty']) then
        Begin
          MouseBankSlot(CosmicRuneSpot, mouse_Left);
          MouseBankSlot(LawRuneSpot, mouse_Left);
          CloseBank;
          Begin
            GameTab(Tab_Magic);
            MouseBox(698, 476, 712, 489, 1);
            Begin
              If FindObjTPA(X, Y, DecayedPouch, 5, 2, 10, 10, 50, ['Empty']) then
                MMouse(x, y, 5, 5);
              ClickMouse2(True);
            end;
          end;
        end;
    end;

    procedure Eat;
    begin
      AntiRandoms;
      AntiBan;
      Begin
        MouseBankSlot(Food, 0);
        ChooseOption('3');
        Wait(RandomRange(600, 1000));
        repeat
          If FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2) then
            Mouse(x, y, 5, 5, mouse_Right);
          ChooseOption('Eat');
          Wait(RandomRange(700,1000));
        until (HPPercent = 100);
        if FindDTM(Shark, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          repeat
            FindDTM(Shark, X, Y, MIX1, MIY1, MIX2, MIY2);
            Mouse(x, y, 5, 5, mouse_Left);
            Wait(1000);
          until not FindDTM(Shark, x, y, MIX1, MIY1, MIX2, MIY2);
        end;
      end;
    end;

    Function LocateBank:Boolean;
    Var
      TPAA: T2DPointArray;
      TPA: TPointArray;
      CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6057336, MSX1, MSY1, MSX2, MSY2, 1); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 77, 24); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
      If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
      Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], X, Y);
          MMouse(X, Y, 3, 3);
          if IsUpText('ank ooth') then
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,5,5,True);
            Break;
          End;
        until (Retry = 2);
        Break;
      end;
    end;

    Procedure WithdrawEssence;
    Begin
      AntiRandoms;
      AntiBan;
      Begin
        If LocateBank then
          ClickMouse2(true);
        If BankScreen then
          MouseBankSlot(EssenceSpot, mouse_Right);
        if WaitOption('Withdraw-All',500) then
        begin
          ChooseOption('All');
          Wait(RandomRange(1000, 1200));
          InvMouse(GiantPouchSpot, mouse_Right);
          ChooseOption('Fill');
          Wait(RandomRange(1000, 1200));
          InvMouse(LargePouchSpot,mouse_Right);
          ChooseOption('Fill');
          MouseBankSlot(EssenceSpot, mouse_Right);
          if WaitOption('Withdraw-All', 500) then
            ChooseOption('All');
          Wait(RandomRange(1000,1200));
          InvMouse(MediumPouchSpot, mouse_Right);
          ChooseOption('Fill');
          MouseBankSlot(EssenceSpot, mouse_Right);
          if WaitOption('Withdraw-All', 500) then
            ChooseOption('All');
        end;
      end;
    end;

    procedure WalkToAltar;
    begin
      ObjDTM_Walk('131:120:2:0:7:75:127:0:7:98:131:4:124:115:137:115:135:129:128:127', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('75:142:3:0:7:36:123:0:7:48:91:0:7:102:138:4:68:134:80:136:78:146:67:147', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('98:136:2:0:7:44:60:0:7:110:75:4:92:130:105:128:104:142:93:141', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('131:108:2:2:7:101:72:2:7:113:72:4:124:101:136:103:137:114:127:112', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('113:113:3:2:7:105:123:2:7:94:80:2:7:117:131:4:108:112:118:107:121:119:108:120', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('146:90:3:2:7:74:92:2:7:86:100:2:7:109:88:4:139:87:147:85:150:96:135:100', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('122:74:2:2:7:62:76:2:7:38:88:4:117:71:131:68:126:83:115:81', 0, 100, 80, True);
    end;

    Function FindAltar:Boolean;
    Var
      TPAA: T2DPointArray;
      TPA: TPointArray;
      CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 8025208, MSX1, MSY1, MSX2, MSY2, 1); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 19, 3); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
      If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
      Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], X, Y);
          MMouse(X, Y, 3, 3);
          if IsUpText('ltar') then // Enter The name of Your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,True);
            Break;
          End;
        until (Retry = 2);
        Break;
      end;
    end;

    Procedure CraftRunesInPouch;
    Begin
      If FindAltar then
        If Pouches = True then
        Begin
          Wait(RandomRange(800, 1000));
          InvMouse(GiantPouchSpot, mouse_Right);
          ChooseOption('Empty');
          MMouse(x, y, 5, 5);
          ClickMouse2(True);
          Wait(RandomRange(1200, 1500));
          InvMouse(LargePouchSpot,mouse_Right);
          ChooseOption('Empty');
          MMouse(x, y, 5, 5);
          ClickMouse2(True);
          Wait(RandomRange(1200,1500));
          InvMouse(MediumPouchSpot,mouse_Right);
          ChooseOption('Empty');
          MMouse(x, y, 5, 5);
          ClickMouse2(True);
          Wait(RandomRange(1200,1500));
          InvMouse(SmallPouchSpot,mouse_Right);
          ChooseOption('Empty');
          MMouse(x, y, 5, 5);
          ClickMouse2(True);
          Wait(RandomRange(1200,1500));
        end;
    end;

    Procedure TeleToIsle;
    Begin
      AntiRandoms;
      AntiBan;
      Begin
        GameTab(Tab_Magic);
        MouseBox(562, 217, 585, 240, mouse_Left);
        Begin
          Wait(1000);
          LodestoneTeleport('Lunar Isle')
          ClickMouse2(True);
          Wait(18000);
        end;
      end;
    end;

    procedure WalkToBank;
    begin
      ObjDTM_Walk('120:86:2:0:7:99:122:0:7:96:59:4:113:79:126:81:123:93:116:93', 0, 100, 80, True);
      Wait(500);
      ObjDTM_Walk('95:53:2:0:7:58:50:0:7:96:101:4:88:49:99:50:96:60:91:59', 0, 100, 80, True);
      Wait(500);
    end;

    begin
      SetupSRL;
      ObjDTM_Setup;
      repeat
        repeat
          WithdrawEssence;
        until(CloseBank)
        //WalkToAltar;
        //CraftRunesInPouch;
        //TeleToIsle;
        //WalkToBank;
      until(false);
    end.

    If you can't then post back

  4. #4
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Heh, excuse me Le Jingle, but thats my script, and I'm asking an experience scripter why I am getting these errors. Next time think before you post.

  5. #5
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  6. #6
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    waitoption will choose the option, you don't need chooseoption.

    EDIT: Make withdraw ess and filling pouches in different procedures, make things easier to spot. And you're altar finding uses CTS 2, but not using hue and sat mod O.o

    EDIT2: Make your waitoption to wait 2000ms, and your eating function eat sharks until full hp, not really efficient though. Just my opinion.
    Last edited by CephaXz; 05-15-2012 at 08:22 PM.

  7. #7
    Join Date
    Nov 2011
    Location
    MA
    Posts
    545
    Mentioned
    3 Post(s)
    Quoted
    10 Post(s)

    Default

    Try adding closebank; to the end of your WithdrawEssence procedure and removing the repeat in your main loop.

  8. #8
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks Cepha, I'm testing now. Tehq thank you also, will try that.

  9. #9
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would you mind fixing it for me, because I'm still getting the same error.

  10. #10
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The error you meant, is that its not withdrawing essence?

  11. #11
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No that it is closing the bank as soon as it opens.

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

    Default

    No, Jingle is right.This is NOT the correct section, It clearly says Development tutorials.

    Isn't cool to backtalk when you're in the wrong.

  13. #13
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Should had posted it in simba tags. It's hard to spot the error with bad standards. I'll try fixing in a while.

  14. #14
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay im sorry but no one will see my need for script help if I post it there. Could you fix it, I just cant for the life of me.

  15. #15
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  16. #16
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'd say your codes are very messy, compiled all together. Should separate parts by parts.

    Simba Code:
    Procedure WithdrawEssence;
    Begin
      If LocateBank then
      begin
        repeat
          wait(500);
        until Bankscreen;
      end;

      If BankScreen then
      begin
        MouseBankSlot(EssenceSpot, mouse_Right);
        WaitOption('Withdraw-All',2000);
        Wait(RandomRange(1000, 1200));

        InvMouse(GiantPouchSpot, mouse_Right);
        WaitOption('Fill', 2000);
        Wait(RandomRange(1000, 1200));
        InvMouse(LargePouchSpot,mouse_Right);
        WaitOption('Fill', 2000);
        MouseBankSlot(EssenceSpot, mouse_Right);
        WaitOption('Withdraw-All', 2000);
        Wait(RandomRange(1000,1200));
        InvMouse(MediumPouchSpot, mouse_Right);
        WaitOption('Fill', 2000);
        MouseBankSlot(EssenceSpot, mouse_Right);
        WaitOption('Withdraw-All', 2000);
      end;
    end;


    Simba Code:
    begin
      SetupSRL;
      ObjDTM_Setup;
      repeat
         WithdrawEssence;
        //WalkToAltar;
        //CraftRunesInPouch;
        //TeleToIsle;
        //WalkToBank;
      until(false);
    end.

    No point making repeat loops there.
    Just so you know, the one I posted is not separated parts by parts yet. By that, I mean separating this one procedure into a few, like WithdrawEssence, FillGiant, FillMedium, Fillblablabla. Then a procedure that include them all like this:

    Simba Code:
    Procedure Banking;
    begin
      OpenBank;
      WithdrawEssence;
      FillGiant;
      FillSmall;
      WithdrawEssence;
      FillLarge;
      FillMedium;
    end;
    Last edited by CephaXz; 05-15-2012 at 08:55 PM.

  17. #17
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  18. #18
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do reply back and let me know.

  19. #19
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It seems to be working now, thank you. Now I just gotta find something that will find the bank booth. Everything I try seems to go stupid after first time. It works the first run then decides to retire after. Well, thanks again, you are a hero in my eyes.

  20. #20
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use ACA, search color using Sat and Hue mod to get a better color.

  21. #21
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I did use ACA, but I was told to achieve SRL Members that I needed to use custom object finding methods and that ACA was a no-no.

  22. #22
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You use ACA to get the accurate colors, else your script will just always fail because color changes quite often. But not using the function that auto-generated by ACA.

    EDIT: I could had became SRL member if creating astral runecrafter is what it needs.

  23. #23
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh k, so the function I currently have is fine then, right? Also, could I add you as a friend because you helped me so much?

  24. #24
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's fine, but it doesn't include using CTS2 efficiently. You need to use hue and sat values for accurate colors finding. I believe there's some tutorials out there. Or you can refer to some other people's script.

    Well, I don't think I helped much, but I hope I did contributed something. I'm still a beginner at scripting, with just basic knowledge. Yeah you could add me as friend.

  25. #25
    Join Date
    Feb 2012
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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
  •