Results 1 to 11 of 11

Thread: Check this?

  1. #1
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default Check this?

    Simba Code:
    program WildyMiner;
    //{$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}

    Const
     SERVER  = 61;     // Enter "0" to pick a random server.
     MEMBERS = False; // Set to True if using a RS-Members account. False if F2P.
     SRLStats_Username = ''; // Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     NumbOfPlayers= 1;     //How many players are you using
     StartPlayer=   0;     //Player to start auoting with! (0 means first char)
     Version=       '1.0'; //NO TOUCHY!

     Var
       TooLong:Integer;

     procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Nick        := ''; //Player nickname - 3-4 letters of Player username.
        Active      := True;
        Integers[1] := 4;       //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
        Integers[2] := 4;      //Seconds to try mining rock before clicking another.
      end;

    end;

    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;

    Function CheckAndClick(X,Y:Integer):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      {Wait(100 + Random(50));
      If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}

      If WaitUpTextMulti(['Mine','ine'], 150) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        Mouse(x, y, 0, 0,True);
        Wait(100+Random(50));
        FFlag(0);
      End;
    End;

    Procedure Antiban;
    Begin
      Case Random(192) Of
        0: HoverSkill('Mining', False);
        1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
        2: ExamineInv;
        3: RandomAngle(1);
        4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
        5: HoverSkill('random', False);
      End;
    End;

    Procedure FailSafe(Reason:String);
    Begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      Stats_commit;
      Terminatescript;
    End;
    function OreColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.05, 0.44);

      if not (FindColorsTolerance(arP, 2305354, MSX1, MSY1, MSX2, MSY2, 12)) 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
        Result := arC[i];
        //Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

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

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

    Function MineOre: Boolean;
    Var
      X, Y, PlusOne, OreCounter: Integer;
    Begin
      MarkTime(TooLong);
      FindNormalRandoms;
      PlusOne:= InvCount +1;
      X:=MSCX;
      Y:=MSCY;
      If FindObjTPA(X, Y, OreColor, 5, 1, 25, 25, 350, ['Min']) Then
      Begin
        StatsGuise('We found ore');
        GetMousePos(X, Y);

        Case Random(2) of
          0: Mouse(X, Y, 5, 5, True);
          1: Begin
               Mouse(X, Y, 5, 5, False);
               WaitOption('Mine', 500);
              End;
          End;

          Flag;
          MarkTime(OreCounter);
          If (TimeFromMark(Toolong) > 25000) Then
          FailSafe('Could not find ore');
          Repeat;
            If (TimeFromMark(Toolong) > 25000) Then
            FailSafe('Could not find ore');
            FindNormalRandoms;
            StatsGuise('AntiBan and Waiting');
            Antiban;
            Wait(100);
            If InvCount=PlusOne Then
              Writeln('Ore mined');
          Until (InvCount=PlusOne) or (TimeFromMark(OreCounter) > 5000)
       End;
    End;

    Procedure DropOre;
    Var
      X, Y, OreDTM, I:Integer;
      Slotbox:Tbox;
      OrePattern:TIntegerArray;

    Begin
       MarkTime(TooLong);
       OreDTM := DTMFromString('m1gAAAHic42JgYHBmYmCwAGI7IHYCYg8gDgRiHyC2B2JjKNZhZGBQBWJZIFYEYnkg1gRiEyC2gtLaQGwkKwo0lYkITBxgJBIjAAA1UATS');
       OrePattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
       StatsGuise('Dropping Ore:' + IntToStr(I));
       For I:=0 To 27 Do
       Begin
       SlotBox:=InvBox(OrePattern[I]);
       If FindDTm(OreDTM, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
        Begin
          FindNormalRandoms;
          MouseItem(OrePattern [I],Mouse_Right);
          ChooseOption('Dro');
        End;
      End;
      MarkTime(TooLong);

    End;


    begin

      SetupSRL;
      DeclarePlayers;
      Repeat
        MineOre;
        DropOre;
        Until(false);


    end.



    You guys see anything wrong in there? Anything I can fix/add? I got a lot of information and used some of YoHoJo stuff from his mining script. I got my own DTM and found my own ore color with ACA. When I run the script it just moves the mouse all over the ground and never clicks anywhere and when it drops ore it drops it and then tries to drop on the same spot again. Any suggestions? Thank you in advance and thank you to YoHoJo for your videos they helped a lot so far.

  2. #2
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    Procedure DropOre;
    Var
      X, Y, OreDTM, I:Integer;
      Slotbox:Tbox;
      OrePattern:TIntegerArray;

    Begin
       MarkTime(TooLong);
       OreDTM := DTMFromString('m1gAAAHic42JgYHBmYmCwAGI7IHYCYg8gDgRiHyC2B2JjKNZhZGBQBWJZIFYEYnkg1gRiEyC2gtLaQGwkKwo0lYkITBxgJBIjAAA1UATS');
       OrePattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
       StatsGuise('Dropping Ore:' + IntToStr(I));
       For I:=0 To 27 Do
       Repeat////here
       Begin
       SlotBox:=InvBox(OrePattern[I]);
       If FindDTm(OreDTM, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
        Begin
          FindNormalRandoms;
          MouseItem(OrePattern [I],Mouse_Right);
          ChooseOption('Dro');
        End;
      End;
      until(InvEmpty);//////to here
      MarkTime(TooLong);

    End;
    that should fix it... also make sure you are in tolerence 2 in aca sounds like you have some wrong color in there
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Please post in correct section next time.
    This belongs in scripting help section, not tutorials.

  4. #4
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    I changed a few things now it goes to one rock but doesn't click it and will not drop ores at all now.

    Simba Code:
    program WildyMiner;
    //{$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}

    Const
     SERVER  = 61;     // Enter "0" to pick a random server.
     MEMBERS = False; // Set to True if using a RS-Members account. False if F2P.
     SRLStats_Username = ''; // Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     NumbOfPlayers= 1;     //How many players are you using
     StartPlayer=   0;     //Player to start auoting with! (0 means first char)
     Version=       '1.0'; //NO TOUCHY!

     Var
       TooLong:Integer;

     procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Nick        := ''; //Player nickname - 3-4 letters of Player username.
        Active      := True;
      end;

    end;

    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;

    Function CheckAndClick(X,Y:Integer):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      {Wait(100 + Random(50));
      If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}

      If WaitUpTextMulti(['Mine','ine'], 150) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        Mouse(x, y, 0, 0,True);
        Wait(100+Random(50));
        FFlag(0);
      End;
    End;

    Procedure Antiban;
    Begin
      Case Random(192) Of
        0: HoverSkill('Mining', False);
        1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
        2: ExamineInv;
        3: RandomAngle(1);
        4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
        5: HoverSkill('random', False);
      End;
    End;

    Procedure FailSafe(Reason:String);
    Begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      Stats_commit;
      Terminatescript;
    End;
    function OreColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.05, 0.44);

      if not (FindColorsTolerance(arP, 2305354, MSX1, MSY1, MSX2, MSY2, 12)) 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
        Result := arC[i];
        //Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

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

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

    Function MineOre: Boolean;
    Var
      X, Y, PlusOne, OreCounter: Integer;
    Begin
    If Not LoggedIn then
      Exit;
      MarkTime(TooLong);
      FindNormalRandoms;
      PlusOne:= InvCount +1;
      X:=MSCX;
      Y:=MSCY;
      If (Not (FindObjCustom(X, Y, ['Min', 'ine'], [OreColor, OreColor], 7))) Then
      Begin
        StatsGuise('We found ore');
        GetMousePos(X, Y);

        Case Random(2) of
          0: Mouse(X, Y, 5, 5, True);
          1: Begin
               Mouse(X, Y, 5, 5, False);
               WaitOption('ine', 500);
              End;
          End;

          Flag;
          MarkTime(OreCounter);
          If (TimeFromMark(Toolong) > 25000) Then
          FailSafe('Could not find ore');
          Repeat;
            If (TimeFromMark(Toolong) > 25000) Then
            FailSafe('Could not find ore');
            FindNormalRandoms;
            StatsGuise('AntiBan and Waiting');
            Antiban;
            Wait(100);
            If InvCount=PlusOne Then
              Writeln('Ore mined');
          Until (InvCount=PlusOne) or (TimeFromMark(OreCounter) > 5000)
       End;
    End;

    Procedure DropOre;
    Var
      X, Y, OreDTM, I:Integer;
      Slotbox:Tbox;
      OrePattern:TIntegerArray;

    Begin
       MarkTime(TooLong);
       OreDTM := DTMFromString('m1gAAAHic42JgYHBmYmCwAGI7IHYCYg8gDgRiHyC2B2JjKNZhZGBQBWJZIFYEYnkg1gRiEyC2gtLaQGwkKwo0lYkITBxgJBIjAAA1UATS');
       OrePattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
       StatsGuise('Dropping Ore:' + IntToStr(I));
       For I:=0 To 27 Do
       Repeat
       Begin
       SlotBox:=InvBox(OrePattern[I]);
       If FindDTm(OreDTM, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
        Begin
          FindNormalRandoms;
          MouseItem(OrePattern [I],Mouse_Right);
          ChooseOption('Dro');
        End;
      End;
      Until(InvEmpty);
      MarkTime(TooLong);

    End;

    begin

      SetupSRL;
      DeclarePlayers;
      Repeat
        MineOre;
        DropOre;
        Until(false);


    end.

    I don't understand why it wont click the rock, it goes straight to it.
    Also could I just use DropAll for the drop function? How much I put that in?
    Also in the debug box it says "[Hint] (113:10): Variable 'Result' never used at line 112" Which is Function MineOre: Boolean;

    Appreciate any help I get.

  5. #5
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    Function MineOre: Boolean;
    Var
      X, Y, PlusOne, OreCounter: Integer;
    Begin
    If Not LoggedIn then
      Exit;
      MarkTime(TooLong);
      FindNormalRandoms;
      PlusOne:= InvCount +1;
      X:=MSCX;
      Y:=MSCY;
      If (Not (FindObjCustom(X, Y, ['Min', 'ine'], [OreColor, OreColor], 7))) Then //not sure why you put If Not..
      Begin
        StatsGuise('We found ore');
        GetMousePos(X, Y);

        Case Random(2) of
          0: Mouse(X, Y, 5, 5, True);
          1: Begin
               Mouse(X, Y, 5, 5, False);
               WaitOption('ine', 500);
              End;
          End;

          Flag;
          MarkTime(OreCounter);
          If (TimeFromMark(Toolong) > 25000) Then
          FailSafe('Could not find ore');
          Repeat;
            If (TimeFromMark(Toolong) > 25000) Then
            FailSafe('Could not find ore');
            FindNormalRandoms;
            StatsGuise('AntiBan and Waiting');
            Antiban;
            Wait(100);
            If InvCount=PlusOne Then
              Writeln('Ore mined');
          Until (InvCount=PlusOne) or (TimeFromMark(OreCounter) > 5000)
       End;
    End;

    [/QUOTE]

    Simba Code:
    If (FindObjCustom(X, Y, ['Min', 'ine'], [OreColor, OreColor], 7))then
    try that
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

  6. #6
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    If your making a script, and you wish for a tester, I'm your man!
    Got to the link in my sig!

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  7. #7
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Poopy thank you that fixed the mining issue, but do you see anything wrong with my drop procedure? I mad the DTM and it matches all the ores and it reads in "Dropping ore 0" but never drops the ores. Could I use drop all? How would I put that in my script?

  8. #8
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    Procedure DropOre;
    Var
      X, Y, OreDTM, I:Integer;
      Slotbox:Tbox;
      OrePattern:TIntegerArray;

    Begin
      if InvFull then //try this
      begin
       MarkTime(TooLong);
       OreDTM := DTMFromString('m1gAAAHic42JgYHBmYmCwAGI7IHYCYg8gDgRiHyC2B2JjKNZhZGBQBWJZIFYEYnkg1gRiEyC2gtLaQGwkKwo0lYkITBxgJBIjAAA1UATS');
       OrePattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
       StatsGuise('Dropping Ore:' + IntToStr(I));
       For I:=0 To 27 Do
       Repeat
       Begin
       SlotBox:=InvBox(OrePattern[I]);
       If FindDTm(OreDTM, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
        Begin
          FindNormalRandoms;
          MMouseItem(OrePattern [I]); //Hmmmm try this I dont know why
          Mouse(x,y, 2,2,mouse_Right);         // Its not working thats odd
          ChooseOption('Dro');
        End;
      End;
      Until(InvEmpty);
      MarkTime(TooLong);
    end; //to here
    End;
    I don't know it seems right idk...
    Last edited by poopy2177; 02-22-2012 at 11:54 PM.
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

  9. #9
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Its still not working, I think I'm going to just write a new drop process.

  10. #10
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If you want to use DropAll; you just add in the script instead of your whole drop procedure. Simply
    Simba Code:
    If InvFull Then
      Begin
      Writeln('Dropping');
      DropAll;
      End;

  11. #11
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Thank you for that, I figured out a dropping procedure that works, but is the drop all random? humanlike?

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
  •