Results 1 to 6 of 6

Thread: Jad keyboard prayer selector

  1. #1
    Join Date
    May 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Jad keyboard prayer selector

    I've been looking for something to help me switch prayers when fighting Jad cos he keeps owning me and i stumbled upon this:

    Code:
    program Pker;
    {$I SRL/SRL.SIMBA}
    {
    F6-F8 (Pray)
    Inventory (642,168)(671,204)
    Pray (705,173)(726,202)
    PMagic (636,262)(647,270)
    PRange (673,256)(689,271)
    PMelee (709,258)(723,269)
    }
    var
    Ti: Integer;
    Mi: Tpoint;
    
    Procedure PrayPro(PType: Integer);
    Begin
    Ti := GetCurrentTab;
    GetMousePos(Mi.x , Mi.y);
    Mouse(RandomRange(705, 726), RandomRange(173, 202), 0, 0, true);
    Wait(100);
    If PType = 1 Then Mouse(RandomRange(636, 647), RandomRange(260, 270), 0, 0, true);
    If PType = 2 Then Mouse(RandomRange(673, 689), RandomRange(260, 270), 0, 0, true);
    If PType = 3 Then Mouse(RandomRange(709, 723), RandomRange(260, 270), 0, 0, true);
    If Gametab( Ti) then
    Mmouse(Mi.x, Mi.y, 0, 0);
    End;
    
    Begin
    Setupsrl;
    //Cleardebug;
    Mousespeed:=9999;
    repeat
    If Isfkeydown(1)Then
    PrayPro(1);
    If Isfkeydown(2) Then
    PrayPro(2);
    If Isfkeydown(3) Then
    Praypro(3);
    until false;
    End.
    Made by Main


    I'd like to change the keys though as i'm on a mac and F6-F8 does all kinds of other crazy crap as well, maybe it could be ASD.

    Also i found when i target the runescape window with simba and run the script it rapes my CPU, its using like 99% CPU... i don't have this trouble when running scripts that use SMART, maybe its a problem in the code?

    If anyone could help i would be super grateful!!

  2. #2
    Join Date
    Nov 2007
    Posts
    77
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    If Isfkeydown(1)Then
    PrayPro(1);
    If Isfkeydown(2) Then
    PrayPro(2);
    If Isfkeydown(3) Then
    Praypro(3);
    while KeyDown('thekey') do
    praypro(1)


    i think

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

    Default

    Something like this should suffice:

    Simba Code:
    Program SwitchPrayers;
    {$i SRL/SRL.SIMBA}

    Function Changeprayer(Which:Integer);
    begin
      case which of
        1: begin
              gametab(TAB_PRAYER);
              Mouse(coords for Melee Prayer);
              Gametab(25);
            end;

        2: begin
              gametab(TAB_PRAYR);
              Mouse(Coords for Magic prayer);
              Gametab(25);
           end;

       3: begin
             gametab(TAB_PRAYER);
             Mouse(Coords for range prayer);
             Gametab(25);
          end;
      end;
    end;

    Procedure SwitchPrayer;
    begin
      if keydown(Pick a key) then
        Changeprayer(1);
      if keydown(Pick A Key) then
        changeprayer(2);
      if keydown(Pick a key) then
        changeprayer(3);
    end;

    begin
      repeat
        SwitchPrayer;
      until(false);
    end.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

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

    Default

    Perhaps slushpuppy's sound lib may be useful to look into

  5. #5
    Join Date
    May 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    Something like this should suffice:

    Simba Code:
    Program SwitchPrayers;
    {$i SRL/SRL.SIMBA}

    Function Changeprayer(Which:Integer);
    begin
      case which of
        1: begin
              gametab(TAB_PRAYER);
              Mouse(coords for Melee Prayer);
              Gametab(25);
            end;

        2: begin
              gametab(TAB_PRAYR);
              Mouse(Coords for Magic prayer);
              Gametab(25);
           end;

       3: begin
             gametab(TAB_PRAYER);
             Mouse(Coords for range prayer);
             Gametab(25);
          end;
      end;
    end;

    Procedure SwitchPrayer;
    begin
      if keydown(Pick a key) then
        Changeprayer(1);
      if keydown(Pick A Key) then
        changeprayer(2);
      if keydown(Pick a key) then
        changeprayer(3);
    end;

    begin
      repeat
        SwitchPrayer;
      until(false);
    end.
    [Error] (5:37): colon (':') expected at line 4
    Compiling failed.

    I added a colon and got this

    [Error] (6:1): Identifier expected at line 5
    Compiling failed.

    sorry i don't know much about scripting!

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

    Default

    I'm on my phone, I probably screwed something up. Maybe someone else can show you how to fix it, or if noone has done it when I get to my computer, ill do it then. Sorry.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

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
  •