Results 1 to 7 of 7

Thread: i want to make a rsps bot for killing ghosts

  1. #1
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Exclamation i want to make a rsps bot for killing ghosts

    i got this code:
    Simba Code:
    program GhostKilling;
    {$i srl/srl.simba}
    procedure AttackMonster;
    var
     HealthBar, X, Y: Integer;
    begin
      HealthBar := DTMFromString('mrAAAAHic42BABaZQLAPFZkDMDMRsSGrYkPhguQkMDEJCQjjxfwb8gJEAhgEAlDEEEA==');
      repeat
        If FindDtm(HealthBar, X, Y, MSX1, MSY1, MSX2, MSY2) then
          Begin
            Wait(300)
          end
        Else
        begin
        if findcolortolerance(x, y, 11119020, MSX1, MSY1, MSX2, MSY2, 10) then
          Begin
            MMouse(x, y, 5, 5);
            wait(randomrange(200, 500));
            ClickMouse2(mouse_Left)
          end;
        End;
      until False;
      FreeDTM(HealthBar);
    end;

    begin
    setupsrl;
    AttackMonster;
    end.
    i get this error:
    Code:
    [Hint] C:\Program Files (x86)\Simba\Includes\SRL/SRL/core/globals.simba(55:3): Variable 'WORLDSWITCHERENABLED' never used at line 54
    Compiled successfully in 515 ms.
    and i want that the clicker waits a littlebit longer because if it keeps clicking
    it get the good place then i clicks on another place and then your man
    starts to walk away from the monster and that doesn't work

  2. #2
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by remember me View Post
    i got this code:
    Simba Code:
    program GhostKilling;
    {$i srl/srl.simba}
    procedure AttackMonster;
    var
     HealthBar, X, Y: Integer;
    begin
      HealthBar := DTMFromString('mrAAAAHic42BABaZQLAPFZkDMDMRsSGrYkPhguQkMDEJCQjjxfwb8gJEAhgEAlDEEEA==');
      repeat
        If FindDtm(HealthBar, X, Y, MSX1, MSY1, MSX2, MSY2) then
          Begin
            Wait(300)
          end
        Else
        begin
        if findcolortolerance(x, y, 11119020, MSX1, MSY1, MSX2, MSY2, 10) then
          Begin
            MMouse(x, y, 5, 5);
            wait(randomrange(200, 500));
            ClickMouse2(mouse_Left)
          end;
        End;
      until False;
      FreeDTM(HealthBar);
    end;

    begin
    setupsrl;
    AttackMonster;
    end.
    i get this error:
    Code:
    [Hint] C:\Program Files (x86)\Simba\Includes\SRL/SRL/core/globals.simba(55:3): Variable 'WORLDSWITCHERENABLED' never used at line 54
    Compiled successfully in 515 ms.
    and i want that the clicker waits a littlebit longer because if it keeps clicking
    it get the good place then i clicks on another place and then your man
    starts to walk away from the monster and that doesn't work
    ignore that, it's nothing special, you still can run your script with that. pretty sure they will fix that at next revision

  3. #3
    Join Date
    Dec 2011
    Posts
    195
    Mentioned
    2 Post(s)
    Quoted
    17 Post(s)

    Default

    Nothing to worry about the unused variable
    --- NexzAuto ---
    --- Simplicity is the ultimate sophistication. - Leonardo Da Vinci ---

  4. #4
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by remember me View Post
    i got this code:
    Simba Code:
    program GhostKilling;
    {$i srl/srl.simba}
    procedure AttackMonster;
    var
     HealthBar, X, Y: Integer;
    begin
      HealthBar := DTMFromString('mrAAAAHic42BABaZQLAPFZkDMDMRsSGrYkPhguQkMDEJCQjjxfwb8gJEAhgEAlDEEEA==');
      repeat
        If FindDtm(HealthBar, X, Y, MSX1, MSY1, MSX2, MSY2) then
          Begin
            Wait(300)
          end
        Else
        begin
        if findcolortolerance(x, y, 11119020, MSX1, MSY1, MSX2, MSY2, 10) then
          Begin
            MMouse(x, y, 5, 5);
            wait(randomrange(200, 500));
            ClickMouse2(mouse_Left)
          end;
        End;
      until False;
      FreeDTM(HealthBar);
    end;

    begin
    setupsrl;
    AttackMonster;
    end.
    i get this error:
    Code:
    [Hint] C:\Program Files (x86)\Simba\Includes\SRL/SRL/core/globals.simba(55:3): Variable 'WORLDSWITCHERENABLED' never used at line 54
    Compiled successfully in 515 ms.
    and i want that the clicker waits a littlebit longer because if it keeps clicking
    it get the good place then i clicks on another place and then your man
    starts to walk away from the monster and that doesn't work
    can you maybe help me with that last part?

  5. #5
    Join Date
    Dec 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by remember me View Post
    can you maybe help me with that last part?
    use Wait() function and use findcolorspiraltolerance so it can search for the nearest ghost.

  6. #6
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    do i have to set the middle of the screen or something?

  7. #7
    Join Date
    Dec 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by remember me View Post
    do i have to set the middle of the screen or something?
    yes. find the coordinates for where your character stands, ie. the middle of the screen, then do
    Simba Code:
    var
        MiddleScreenX := x coordinate
        MiddleScreenY := y coordinate
    then you can use
    Simba Code:
    FindColorSpiralTolerance(MiddleScreenX, MiddleScreenY, blahblahblah);

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
  •