Log in

View Full Version : Help with simple rsps fight script



poparms
08-02-2012, 05:08 PM
Hello guys this is my first post on the forums, and i have a question.

I have taken this script from the forum and edited it to wait longer to fight the specific monster because my character is little weaker, and i also changed it to fight chaos druids.

My question is what is a simple way to make my character eat food eventually?

program chaosdruidkiller;
{$i SRL/SRL.simba}
var
x,y:Integer;

const
Monster = 3889026;
Flaunt = 49499;
BlueCharm = 6387344; // I edited this to shark color.

Procedure AttackYak;
begin
if srl_infight = false then
if(FindColorSpiralTolerance(x, y, Monster, MSX1, MSY1, MSX2, MSY2, 3)) then
begin Mouse(x, y, 0, 0, True);
wait(3000)
end;
end;

Procedure Pickupdrop;
begin
if srl_infight = false then
if(FindColorSpiralTolerance(x, y, BlueCharm, MSX1, MSY1, MSX2, MSY2, 5))then // I tried using the edited pickup script to pick eat sharks but it doesnt
begin Mouse(x, y, 0, 0, true);
wait(100)
end;
end;

procedure main;
begin
repeat
wait(1000)
AttackYak;
wait(1000)
Pickupdrop;
until(false)
end;
begin
ClearDebug;
SetUpSrl;
ActivateClient;
main;
end.

Footy
08-02-2012, 06:30 PM
I doubt this will work unless this script was written for an rsps. A lot of the SRL include functions will only work with official runescape.

poparms
08-02-2012, 07:26 PM
This script Is for an rsps ,it's in the title.

Footy
08-02-2012, 07:42 PM
alright, just wasnt sure if you nipped it from the runescape section or something, some people dont understand. Since I dont know what the rsps looks like, I cant make you an accurate eating procedure, but it would go something like this

Procedure Eat;
begin
if Healthpercent < 50 then
begin
gametab(25);
if findDTM(yourfoodDTM, MSX1, MXY1,MSX2, MSY2) then
Mouse(x, y, 3, 3, 1) else
Writeln('We couldnt find the food. Make sure your DTM is accurate, and you have food in your inventory');
end else
begin
writeln('We arent low health yet, exiting procedure');
Exit;
end;
end;
I made that in notepad, so the parameters might not be correct, and you will have to find a way to tell when health is low, since SRLs function wont work on most RSPS's. I added Healthpercent into that script, so just make a function named that to figure out the percent of health, or something like that.
Footy

KeepBotting
08-03-2012, 12:58 AM
MouseBox, if the position of your food stays constant.

P1ng
08-03-2012, 01:17 AM
Use the MIx/MIy co-ordinates for checking your inventory for food, you are currently using MSx for the picking up because you want to look at the main-screen not the inventory.

MMx - Minimap
MIx - Inventory
MSx - MainScreen
MBx - BankScreen
MCx - Chat screen

Procedure Eat;
begin
if Healthpercent < 50 then
begin
gametab(25);
if findDTM(yourfoodDTM, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 3, 3, 1) else
Writeln('We couldnt find the food. Make sure your DTM is accurate, and you have food in your inventory');
end else
begin
writeln('We arent low health yet, exiting procedure');
Exit;
end;
end;

Footy
08-03-2012, 01:20 AM
Whoops, didn't realize that. Use p1ngs procedure instead.