SRL Archive - OSR Outdated / Broken Scripts

GuardKillerv1


combat07

2013-03-07 10:10:06

GuardKiller v1


[ATTACH=CONFIG]19760[/ATTACH]

Kill lvl-21 guards at varrock castle



Does Not:
Eat
Bank





program GuardKillerv1;

{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}

var
x,y: Integer;
Text: TStringArray;

procedure KillGuardz;
begin
If P07_FindObjCustom(x, y, ['ttack', 'uard'], [945028, 7111561, 6321017, 6123379, 0, 0, 0], 5) Then
ClickMouse2(mouse_left);
Wait(RandomRange(4050,6025)) //Increase to Slow guard clicking, Decrease to Speed Up
end;

procedure GrabNatureRune;
begin
If P07_FindObjCustom(x, y, ['Take', 'Nature Rune'], [1411857], 25) Then
ClickMouse2(mouse_left);
Wait(RandomRange(1500,2500))
end;

begin
SetupP07Include;
repeat
GrabNatureRune;
KillGuardz;
GrabNatureRune;
until(false);
end.program new;
begin
end.

OMGWTFISTHIS

2013-03-07 10:15:32

Use Simba tags to post the script.

Also, I suggest making it pick up clue scrolls - they're a good source for them.

Edit: You can add the If-then after it picks up the nature, so that you can call the procedure PickUpLoot, and it'll pick up both Natures and clue scrolls in one procedure, rather than calling two procedures in the main loop.

Eduard

2013-03-07 18:58:07

Use pixelshift/hp bar detection to see if it's fighting. not a random wait.

Riylo69

2013-06-14 14:00:00

sweet

okokokok

2013-06-15 07:23:03

Good to see that you are scripting, but I would not suggest anyone using this script. This has a couple of reasons.

First: No antiban! Now on OSR this shouldn't be that much of a problem yet (Don't know if it detects bots, but it's better to implement it anyway!)
Second: Try the official OSR release and not the unofficial release. http://villavu.com/forum/showthread.php?t=99992&highlight=osr+include here you can find how to do everything.
Third: No failsafes. Add failsafes, once it messes up it will continue in an endless loop. This will increase the banrate.
EDIT: Fourth: No Anti Random system! The script will probably last 15 min without this!

My advice: Learn more about Simba, SRL, Pascal and scripting in general. Adjust the script with these things and re-release it.
Also for combat detection I use a simple pixelshift detection. Works better than the HP bar detection, since the HP isn't always visible in the beginning which could mess up your script when teleporting etc.

take a look at my script (this is the unfinished version though!, re-wrote alot of stuff).
http://villavu.com/forum/showthread.php?t=104014

The detection part:
Function CombatCheck: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 250);
end;

Call this somewhere in your fighting procedure. Like this:

Function CombatCheck: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 250);
end;

procedure KillGuardz;
begin

If P07_FindObjCustom(x, y, ['ttack', 'uard'], [945028, 7111561, 6321017, 6123379, 0, 0, 0], 5) Then

repeat
begin
ClickMouse2(mouse_left);
Wait(RandomRange(4050,6025)) //Increase to Slow guard clicking, Decrease to Speed Up
end;
until (CombatCheck = True);

end;

Goodluck with scripting!

EDIT: saw a mistake in the script part :P

Ashaman88

2013-11-27 14:17:02

P07include outdated. Please use official one - shoot me a PM when/if this is updated.