Results 1 to 5 of 5

Thread: Deathwalk etc.

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

    Default Deathwalk etc.

    Hello everyone!
    I am not one to really post and ask for help but I can't seem to get a hold of someone long enough for me to actually understand how this works :P

    So my script (r4-manthief) it steals from men/women etc.) I wanted to add a death walk with SPS and perhaps a backup with dmt. I managed to write the SPS it just doesn't work at all (I am guessing I just placed it wrong didn't write it correctly) And I have no idea how to gather the DMT numbers >.< which seems like the best choice

    I am using bits and pieces of putonajonny's Goblin Killer's walking (its the only SPS Death walk I could find in any script >.<)
    I learn from dissecting already finished work

    here is my script, any help is greatly appreciated!

    Simba Code:
    program R4_ManThief;
    {$i srl/srl/misc/smart.scar}
    {$i srl/srl.scar}
    {$i sps/sps.simba}
    {$i SRL/SRL/Misc/stats.simba}
    {$i SRL/SRL/misc/paintsmart.scar}


    {Welcome to R4nd0m's Man Thief, this script steals from men/women giving
     you coins and XP!.
     Features:
     Death Walk
     Anti-Ban/Anti-Random
     Eating (50%-) Any food (Just keep in inventory)
     SRL Stats
     An Interesting Paint/Painted Mouse
     Human like Mouse moments (Thanks Flight)
     Progress Reports}


    Var
    man, Location, TimeLast, x, y :Integer;
    Lumbridge, Stairs: TPoint;
    WalkHome: TPointArray;
    CStatus: String;

    Const
    Version = 1.1;

    //SRL info HERE!
      SRLStats_Username = '';
      SRLStats_Password = '';

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0; // This is the player to start with
      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username;
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
    end;

    Procedure CheckStats;
      begin
        if ((SRLStats_Username = '') And (SRLStats_Password = '')) then
        begin
                SetupSRLStats(201,'Anonymous','anon1337');
                Exit;
              end;
          end;

           procedure ClearSmartCanvas;
      {$IFDEF SMART}
      var
        drawing : TBitmap;
      begin
        drawing := TBitmap.Create;
        drawing.canvas.handle := SmartGetDebugDC;
        ClearRSCanvas(drawing.canvas);
        try
          FreeBitmap(drawing);
        except end;
      {$ELSE}
      begin
      {$ENDIF}
      end;

    Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
      var
        mx, my, Pic, I, B, H, TPH, Numb: Integer;
        TTP: TPointArray;
        Canvas: TCanvas;
      begin
        SmartSetDebug(True);
        GetClientDimensions(mx, my);
        Pic := BitmapFromString(mx, my, '');
        TPH := High(TP);
        for I := 0 to TPH do
        begin
          TTP := LoadTextTPA(TP[i], SmallChars, H);
          for B := 0 to High(TTP) do
          begin
            Numb := ((I + 1) * 13);
            FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
            FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
          end;
        end;
        Canvas := TCANVAS.Create;
        Canvas.Handle := SmartGetDebugDC;
        DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
        FreeBitmap(Pic);
      end;

      Procedure Painting;
      begin
        PrintOnSmart(['R4_ManThief','-----------', 'Status:', CStatus], Point(40, 50), 60928);
        //PrintOnSmart(['Status:', CStatus ], Point(40, 80), 60928);
        //PrintOnSmart(['By: R4nd0m'], Point(40, 100), 60928);
      end;

    procedure ProgressReport;
    begin
      ClearDebug;
      WriteLn('[R4nd0m] ManThief');
      WriteLn('===================================================');
      WriteLn('===================================================');
      WriteLn('Running for: ' + TimeRunning);
      WriteLn('Times PickPocketed: ' + IntToStr(man));
      Writeln('XP gained:'+ IntToStr(man*8));
      WriteLn('===================================================');
      WriteLn('===================================================');
    end;

    //By Benland100, modified to paint mouse movements
      procedure WindMouse2(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
      var
        veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
        lastX, lastY: integer;
        sqrt2, sqrt3, sqrt5: extended;
      begin
        sqrt2:= sqrt(2);
        sqrt3:= sqrt(3);
        sqrt5:= sqrt(5);
        while hypot(xs - xe, ys - ye) > 1 do
        begin
          dist:= hypot(xs - xe, ys - ye);
          wind:= minE(wind, dist);
          if dist >= targetArea then
          begin
            windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
            windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
          end else
          begin
            windX:= windX / sqrt2;
            windY:= windY / sqrt2;
            if (maxStep < 3) then
            begin
              maxStep:= random(3) + 3.0;
            end else
            begin
              maxStep:= maxStep / sqrt5;
            end;
          end;
          veloX:= veloX + windX;
          veloY:= veloY + windY;
          veloX:= veloX + gravity * (xe - xs) / dist;
          veloY:= veloY + gravity * (ye - ys) / dist;
          if hypot(veloX, veloY) > maxStep then
          begin
            randomDist:= maxStep / 2.0 + random(round(maxStep) div 2);
            veloMag:= sqrt(veloX * veloX + veloY * veloY);
            veloX:= (veloX / veloMag) * randomDist;
            veloY:= (veloY / veloMag) * randomDist;
          end;
          lastX:= Round(xs);
          lastY:= Round(ys);
          xs:= xs + veloX;
          ys:= ys + veloY;
          if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
            MoveMouse(Round(xs), Round(ys));
          step:= hypot(xs - lastX, ys - lastY);
          wait(round((maxWait - minWait) * (step / maxStep) + minWait));
          lastdist:= dist;
          SMART_DrawDotsEx(False, [Point(lastX, lastY)], 65280);
        end;
        if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
          MoveMouse(Round(xe), Round(ye));

      end;

    {*******************************************************************************
    Procedure HumanMMouse(eX, eY: Integer);
    By: Flight
    Description: Human-like miss-and-correct mouse movement
    *******************************************************************************}

      Procedure HumanMMouse(eX, eY, ranX, ranY: Integer);
      var
        randSpeed: extended;
        X,Y,X2,Y2,A,Dist,MP: integer;
      begin
        A := MouseSpeed;
        GetMousePos(X, Y);
        Dist := Distance(X, Y, eX, eY);
        MP := Round(Dist/150);
        if MP < 0 then
          MP := 1;

        randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
        X2 := RandomRange(eX-(A*MP), eX+(A*MP));
        Y2 := RandomRange(eY-(A*MP), eY+(A*MP));
        WindMouse2(X, Y, X2, Y2, 11, 8, 10.0 / randSpeed, 12.0 / randSpeed, 10.0 * randSpeed, 10.0 * randSpeed);
        GetMousePos(X, Y);
        MMouse(eX, eY, ranX, ranY);
        MouseSpeed := A;
        ClearSmartCanvas;
      end;

      procedure Antiban;
    begin
    CStatus := 'AntiBan Active'
    Painting;
      case Random(60) of
        20: HoverSkill('Thieving', False);
        30: PickUpMouse;
        40: RandomMovement;
        50: BoredHuman;
        59: ExamineInv;
      end;
      Writeln('Antiban in action!');
    end;

    procedure AntiRandom;
    begin
    CStatus := 'Checking for randoms'
    Painting;
      FindNormalRandoms;
      LampSkill := 'thieving';
      LevelUp;
      Writeln('Checking for randoms');
      //FindDead
    end;

    procedure HpCheck; //Thanks Narcle, used your script to learn how to do this
    var
      a, t, b, x, y:Integer;
    begin
      CStatus := 'Checking Health/Eating'
      Painting;
      if (HPPercent < 50) and LoggedIn then
      begin
        if not InvEmpty then
          for a := 0 to 2 do
            for b := 1 to 28 do
            if ExistsItem(b) then
            begin
              MMouseItem(b);
              GetMousePos(x, y);
              if WaitUptext('Eat', 400) then
              begin
                Mouse(x,y,0,0,false);
                if WaitOption('Eat', 400) then
                begin
                  t := GetSystemTime;
                  while ExistsItem(b) and ((GetSystemTime-t) < 2000) do
                    wait(20);
                  if (HPPercent > 70) then
                    Exit;
                end;
              end;
            end;
            if (not LoggedIn) or (HPPercent > 50) then
              Exit;
          end;
        end;


    Procedure CheckLocation;
    begin
        CStatus := 'Checking Location'
        Painting;
        Wait(4000+Random(2000))
        Location := 2;
        if (SPS_PosOnMM(Lumbridge)) then
        Location := 0; //lumbridge
        if (SPS_PosOnMM(Stairs)) then
        Location := 1; //Stairs
        TimeLast := GetTimeRunning
    end;

    Procedure Climb;
      begin
        Wait(RandomRange(200, 700));
            FindObjCustom(x, y, ['tairs'], [4083549, 4215135, 4017499], 10);
          Mouse(x, y, 5, 5, false);
        ChooseOption('limb');
      end;
      Procedure Door;
      begin
        WriteLn('Upstairs!');
          Wait(RandomRange(200, 700));
            FindObjCustom(x, y, ['oor'], [3555142, 3291713, 3686729], 10);
          Mouse(x, y, 5, 5, false);
        ChooseOption('pen');
      end;

    Procedure WalkToHouse;
    begin
      CStatus := 'Walking...'
      Painting;

      HumanMMouse(X, Y, 5, 5);
      WalkHome := [Point(4708, 3766), Point(4762, 3765),
    Point(4763, 3739), Point(4719, 3697), Point(4708, 3656),
    Point(4622, 3652), Point(4621, 3661)]

      If(SPS_WalkPath(WalkHome)) then
      WriteLn('At Stairs');
      Climb;
      Door;
      end;

    Procedure RectifyLocation;
    begin
      CStatus := 'Rectifying Location'
      Painting;
      Mouse(254, 309, 10, 5, true);
      Wait(250+Random(250));
      Mouse(544, 24,5,5,true);

      case location of                  //final attempt
        2: begin
             Mouse(626,152,2,2,True)
             Wait(2000+Random(1000));
           end;
      end;

      CheckLocation;

      case location of
          2:
            begin
               Writeln('Location Not Recognised - Lets Teleport Home')
               GameTab(tab_Magic)
               Wait(1000+Random(500))
               Mouse(575, 230, 5, 5, true)
               Wait(5000+Random(2000))
               Mouse(575, 230, 5, 5, true)
             Repeat
               Wait(2000+Random(500));
             Until(SPS_PosOnMM(Lumbridge));
             Wait(2000+Random(1000))
            end;
      end;

    end;















    function Steal(): Boolean;
    begin
    repeat
      Antiban;
      Antirandom;
      CStatus := 'Stealing'
      Painting;
      Wait(RandomRange(200, 700));
      FindObjCustom(x, y, ['man'], [532535, 400175, 399144, 466225], 10);
      Mouse(x, y, 5, 5, false);
      ChooseOption('ttack');
      until false;
      end;

       //reminder: Switch to TPA
    function FindMan(): Boolean;
    begin
    repeat
      Steal;
        HpCheck;
          AntiRandom;
            ProgressReport;
        HumanMMouse(X, Y, 5, 5);
      if(StrInArr('our gravestone', ChatBoxTextArray(clMessage)))
    then
    begin
      HumanMMouse(X, Y, 5, 5);
        WalkToHouse;
    end;

    {(Use for Master Farmers/Ham members)
    if InvFull then
    begin
      HumanMMouse(X, Y, 5, 5);
      Wait(RandomRange(100, 200));
      DropAll;
      Writeln('Dropping inventory')
    end;}


    until false;
    end;

    procedure Sequence;
    begin
    SetAngle(true)
    SetRun(true)
    FindMan;
    end;

    begin
      CStatus := 'Logging in...'
      Lumbridge := Point(4706, 3767);
      SPS_Areas := ['11_9'];
      SPS_Setup(RUNESCAPE_SURFACE, SPS_Areas);

      Smart_Server := 77;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;

      ClearDebug;
      ClearSmartCanvas;
      Painting;
      DeclarePlayers;
      CheckStats;
      LoginPlayer;
      Sequence;
      ProgressReport;
    end.

    I want it to be able to death walk from lumbridge to the room upstairs (room right next to general store, up stairs)
    Also a "if not recognized location" teleing back to Lumbridge then walking back to room would be awesome

    I am also hoping someone could explain how to do this >.<, when ever I die I just seem to take 15 steps then stop. or I just log out because of the antirandom.. which is odd as well.
    Last edited by [XoL]; 12-23-2011 at 01:58 AM.




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

  2. #2
    Join Date
    Oct 2007
    Location
    The deep web
    Posts
    2,496
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    im sorry for being a dick and not helping directly, but what would be interesting is to use DTM and something like radial walk as the main walk; the sps as a back up.

    If not found, walk to... kind of thing, might actually be a improvement as it would be more accurate.
    Im a bit drunk but, if no one has helped ill look over it in the morning for you.
    Did someone say GDK?

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

    Default

    Radial Walk is the Pizza thing? Makes sense in logic but I have no idea how to gather those points :P or how to make it activate after death only, at first I tried words in my chatbox but the script seems to read it over and over again... not just once. Or it just logs out, and tells me it logged out and took a screenshot.




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

  4. #4
    Join Date
    Oct 2007
    Location
    The deep web
    Posts
    2,496
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    right yes, its the pizza thing. perfectly put!

    http://villavu.com/forum/showthread.php?t=372

    read that, and hit me up with a pm of the script. i wont change anything yet/in the morning but ill add some suggestions then send you in the right way!
    Did someone say GDK?

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

    Default

    Do you happen to have a script of this working?
    The example in the thread doesn't work in paint (it won't compile).

    Sorry :P, seeing it work and working backwards will help me dramatically.

    (any help would be greatly appreciated)




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

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
  •