SRL Archive - RS3 Script Requests

Jad keyboard prayer selector


bobjim

2012-11-11 13:39:53

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

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!!

alucard123

2012-11-11 14:28:56

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

Footy

2012-11-11 14:38:46

Something like this should suffice:



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.


Le Jingle

2012-11-11 14:42:05

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

bobjim

2012-11-11 14:47:56

From: Footy
Something like this should suffice:



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! :(

Footy

2012-11-11 14:49:51

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. :)