SRL Archive - OSR Help

in fight help!


stuartroad

2012-07-03 05:51:36

Hi, this is a script for soulsplit, auto fighter, I have problems, sometimes in fight does not work, I was thinking pixel shift but i have struggled with it a lot in past scripts and I don't really want to wrack my brain trying again, can anyone suggest other ways in which I can find if it is in combat?

Also I would like help with looting, particullary charms, I believe the uptext for looting is the same for this and normal rs so it may work? Problem is I don't know when is a good time to search for that colour, what is a good colour to choose, and how possibly exclude already looted bits.

The colour i was thinking of choosing for this is the colour of noted items, or possibly herbs because these seem to drop fairly often.

Thanks for your help! Remember this is for a private server! :)




program SoulsplitAutoFighter;
{$i srl\srl.simba}

////////////////////Soul Split Fighter////////////////////////
// 1. Go to the area with the monster you want to kill. //
// 2. Try get a less populated area! //
// 3. Use the colour picker tool, select the colour. //
// 4. Press start //
// 5. Hit f3 a few times for script to stop //
// Works best with SoulSplit Client //
// DOES NOT EAT, DOES NOT LOOT YET, WILL SOMETIMES ATTACK //
// WHEN YOU ARE ALREADY ATTACKING, ENSURE AUTO RETAL IS ON! //
//////////////////////////////////////////////////////////////

// Things to come:
// Looting charms, Eating, Pots, Improved in fight etc.
// All in time.

procedure FindandAttack;
var x, y: integer;
begin
if FindColor(x, y, 6268823, 15, 15, 730, 482) then //Last two numbers are dimensions
WriteLn('Found Color');
begin
if srl_infight = false then
Mouse(x, y, 0, 0, True);
WriteLn('Fighting');
Wait(RandomRange(1300, 1600));
end;
end;
begin ClearDebug;

SetUpSRL;

repeat
FindandAttack;
until (IsKeyDown (114)); //Press f3 to stop
end.

riwu

2012-07-03 06:21:15

Fixed standards and some logic.
Flight has a great tutorial for pixelshift (http://villavu.com/forum/showthread.php?t=74090&highlight=averagepixelshift)
Just go to the scripting tutorial section/use the search function and u will find a lot of useful tutorials.
program SoulsplitAutoFighter;
{$i srl\srl.simba}

////////////////////Soul Split Fighter////////////////////////
// 1. Go to the area with the monster you want to kill. //
// 2. Try get a less populated area! //
// 3. Use the colour picker tool, select the colour. //
// 4. Press start //
// 5. Hit f3 a few times for script to stop //
// Works best with SoulSplit Client //
// DOES NOT EAT, DOES NOT LOOT YET, WILL SOMETIMES ATTACK //
// WHEN YOU ARE ALREADY ATTACKING, ENSURE AUTO RETAL IS ON! //
//////////////////////////////////////////////////////////////

// Things to come:
// Looting charms, Eating, Pots, Improved in fight etc.
// All in time.

procedure FindandAttack;
var
x, y: integer;
begin
if FindColor(x, y, 6268823, 15, 15, 730, 482) then //Last two numbers are dimensions
begin
WriteLn('Found Color'); //put everything within the begin and end!
Mouse(x, y, 0, 0, True); //u may want to change to right click and choose option in case mob moves
WriteLn('Fighting');
while IsMoving do
wait(10);
Wait(RandomRange(600, 1200));
while srl_infight do
Wait(RandomRange(50, 150));
end;
end;

begin
ClearDebug;
SetUpSRL;
repeat
FindandAttack;
until (IsKeyDown (114)); //Press f3 to stop
end.

stuartroad

2012-07-03 08:08:24

up text doesnt work,
pixel shift is bad for some of these monsters because they flap about all crazy like.

riwu

2012-07-03 08:13:57

Is SoulSplit's hp bar the same as RS? If it is it should work. Do u have camera set to high angle?
U can limit pixelshift search radius to only around ur character, so its detecting movements of ur character rather than mobs.

stuartroad

2012-07-04 08:54:50

From: riwu
Is SoulSplit's hp bar the same as RS? If it is it should work. Do u have camera set to high angle?
U can limit pixelshift search radius to only around ur character, so its detecting movements of ur character rather than mobs.


Yes i realize that, i only check pixels around the character box obviously, but sometimes they walk into where you are and because its a private server you both blend together rather than only you showing up.

Runaway

2012-07-04 13:00:12

Is there an XP bar on this private server?

stuartroad

2012-07-05 01:40:48

yeh there is an xp bar, but it is different to current runescape one. and no floating xp either

Sir Ducksworthy

2012-07-05 02:25:17

You can make uptext reading work by creating your own Fontset btw theirs a guide about in the scripting tutorial section.