Results 1 to 8 of 8

Thread: Killswitch

  1. #1
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Killswitch

    How do I add a killswitch to my script? By that, i mean a button or something that will kill it when I want. Thanks

    Heres my script
    Simba Code:
    program Alcher;
    {$i srl/srl.simba}

    Procedure Start;
    begin
    GameTab(tab_Magic);
    end;

    Procedure alch;
    var
      x, y:integer;
    begin
    if findcolorspiraltolerance(x, y, 226957, 568, 370, 580, 382, 5) then
    mouse(x, y, 3, 3, 1);
    wait(randomrange(100, 213));
    if ExistsItem(CoordsToItem(x,y)) then
    begin
      ClickMouse2(mouse_Left);
      WriteLn('Successfully clicked the item');
    end else
    begin
      WriteLn('No item available');
      LogOut;
      TerminateScript;
    end;
    end;

    procedure AntiBan;
    begin
      if(not(LoggedIn))then
        exit;
      Findnoninventoryrandoms;
      Case Random (2500) of
        0..18: Begin SleepAndMoveMouse(5000 + Random(750)); End;
        19..24: Begin GameTab(tab_Inv) ExamineInv; GameTab(tab_Magic); SleepAndMoveMouse(2500 + Random(553)); End;
        25..42: Begin RandomAngle(1); End;
        43..48: Begin GameTab(Tab_Stats); Wait(3000 + Random(400)); GameTab(tab_Magic); SleepAndMoveMouse(2550 + Random(658)); End;
        49..54: Begin GameTab(tab_Stats) HoverSkill('random', False); GameTab(tab_Magic); SleepAndMoveMouse(2200 + Random(545)); End;
        55..60: Begin PickUpMouse; End;
        61..66: Begin RandomMovement; End;
        67..72: Begin BoredHuman; GameTab(tab_Magic); End;
        73..78: if(gametab(tab_inv))then Begin ExamineInv; GameTab(tab_Magic); End;
        End;
    end;

    begin
    setupSRL
    Start
    repeat
    Alch
    Antiban
    until(false);
    end.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

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

    Default

    Kill it? You mean stop the script? Or close Simba?

  3. #3
    Join Date
    May 2012
    Location
    Texas
    Posts
    365
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Foooty View Post
    LogOut;
    TerminateScript;
    You could have it do If *condition* = true or something along those lines TerminateScript;

    You basically have one in your script already
    Mostly Inactive, School

  4. #4
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol, i had one, but it tried to log out every loop, so that kinda failed. And i mean to close the script im running, not simba. Can someone show me how to do that? ive been scripting for less then a week, so i dont really know how to do it...
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

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

    Default

    You copied those codes out of somewhere? If you just want to stop the script, TerminateScript is enough. LogOut is not needed.

  6. #6
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no, i watched yohojo's youtube stuff, but i copied the antiban from a different script. But while the script is running, and I decide I want to stop it, how do I trigger terminatescript? I think I saw it in a script, where he had arrowdown as a trigger to terminatescript.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  7. #7
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    You just call it normally.

    When Simba reads it, it will stop your script.

  8. #8
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Press F2 with the simba window active. Boom killswitch

    You can't really do this otherwise if you are running through SMART because it only registers SMART's keystrokes. Just use the F2 method or the red stop button in simba.

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
  •