SRL Archive - RS3 Script Requests

Stronghold Security Slayer


TheSubZero

2012-03-03 19:54:29

Because I'm new, I'll probably get frowned upon, but I look forward into developing and helping the community here.

We need, essentially, a stronghold security script. Not many monsters would be needed, but some included should be:

Minotaurs, Flesh Crawlers, Ankou, and most importantly, Giant Spiders.


If someone would like to just program one at a time, and call it "Giant Spider Killer" or "Flesh Crawler Killer", it would be amazing. The stronghold provides amazing XP rates that a lot of people would love crazily.

If you'd be looking forward or into this, please PM me! I'd like to help in any way I possibly could.

Thank you for reading this, and maybe taking the time to consider it!
And thanks for the awesome community, I look forward to meeting you all ;)

TheSubZero

2012-03-03 19:55:29

Also, I'm not yet experienced with script writing, so if you'd be considering this, please don't expect tremendous amounts of work from me.

Brandon

2012-03-03 20:09:26

What does it have to do? And I heard to colours down there are like the living cavern/waterfiend area colours.. so??

Why not just use narcle's fast fighter there?

Sin

2012-03-03 20:11:10

My GSK is in dev, just banking is really hard.
Im considering just using Guthans and no banking.

John

2012-03-03 20:27:00

From: Sin
My GSK is in dev, just banking is really hard.
Im considering just using Guthans and no banking.


same with my flesh crawler banking is extremely hard because of the doors.

Brandon

2012-03-03 20:28:51

I'm going there right now and script those doors I'll post back if it works

Flight

2012-03-03 21:11:27

Well… I've been working on this for some time, here's what I have so far
  • Combat (Minotaurs / Zombies)
  • Food-eating
  • Walking (Stonghold-to-bank, bank-to-stronghold)
  • Banking
  • Entering/exiting the stronghold
  • Navigating to the minotaur room
  • Navigating from the minotaur room to the Stronghold exit

Navigation through the stronghold is the hardest part, hands down…

Brandon

2012-03-03 21:34:56

How it works.. I made an SPS map with a map maker I wrote.. Next I made a function that looks for a TPA inception of size 3.. Aka a TPA in a TPA in a TPA OR a T3DPointArray inorder to find the floor with a gate inside it with a colour on the gate..

I walk to the door with SPS.. use the door function to open it.. use sps to walk to the second door and use the same door function to open it..

OR just flat out use SPS to search for colours within an SPS box..


Map made with the mapmaker below (Name it 0_0FFS):



{$I SRL/SRL.Simba}
{$I SPS/SPS.Simba}

Function OpenDoor: Boolean; //Absolutely Do not touch if you don't know what your doing.
var
B, B2: TBox;
TPA: TPointArray;
ATPA, ATPA2, ATPA3: T2DPointArray;
CTS, L, K, X, Y, I, T, J: Integer;
begin
Result := IsUptextMultiCustom(['ate', 'war']);
if (Result or (Not LoggedIn)) then
Exit;

CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(2.01, 2.40);
FindColorsTolerance(TPA, 2905406, MSX1, MSY1, MSX2, MSY2, 13); //Greyish Floor Colour..
SetColorSpeed2Modifiers(0.2, 0.2);
if Length(TPA) < 1 then
Exit;
ATPA := TPAtoATPAEx(TPA, 250, 250);
L := High(ATPA);
SetArrayLength(ATPA2, L+1);
for i := 0 to L do
begin
B := GetTPABounds(ATPA[I]);
with B do
begin
ColorToleranceSpeed(2);
begin
SetColorSpeed2Modifiers(2.01, 2.40);
FindColorsTolerance(ATPA2[I], 2905406, B.X1, B.Y1, B.X2, B.Y2, 13); //Greyish Door but of a specific Size..
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.02, 0.02);

if Length(ATPA2[I]) < 1 then
Exit;
if Length(ATPA2) < 1 then
Exit;
ATPA3 := TPAtoATPAEx(TPA, 98, 68);
K := High(ATPA2[I]);
SetArrayLength(ATPA3, K+1);
for J := 0 to K do
begin
B2 := GetTPABounds(ATPA2[J]);
with B2 do
begin
ColorToleranceSpeed(2);
begin
SetColorSpeed2Modifiers(0.06, 3.17);
FindColorsTolerance(ATPA3[J], 2896253, B2.X1, B2.Y1, B2.X2, B2.Y2, 9); //Redish Colour on the grey door..
ColorToleranceSpeed(CTS);
end;
ColorToleranceSpeed(CTS);

Result := (Length(ATPA3[J]) > 0);
if Result then
begin
MiddleTPAEx(ATPA3[J], X, Y);
MMouse(X, Y, 0, 0);
wait(500);
if isUptextMultiCustom(['ate', 'war']) then
begin
ClickMouse2(MOUSE_RIGHT);
ChooseOptionMulti(['pen', 'Open']);
t := (GetSystemTime + 5000);
end;
Exit;
end;
end;
end;
end;
ColorToleranceSpeed(CTS);
end;
end;
end;

var
Gate1: TPoint;
begin
SetupSRL;
SPS_SETUP(RUNESCAPE_SURFACE, ['0_0FFS']);
writeln(SPS_GetMyPos);
Gate1:= MMToMS(SPS_PosToMM(Point(92, -302)));
MMouse(Gate1.X, Gate1.Y, 0, 0);
end.


Minimap maker:

program SPS_MapMaker;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}

Procedure GetMinimap(Name: String);
var
TPA, Draw: TPointArray;
TIA: TIntegerArray;
I, BMP: Integer;
begin
BMP:= CreateBitmap(MMX2 - MMX1 + 1, MMY2 - MMY1 + 1);
TPA:= TPAFromBox(MMBox);
FilterPointsPie(TPA, 0.0, 360.0, 0.0, 75.0, MMCX, MMCY);
TIA:= GetColors(TPA);

TPA:= TPAFromBox(IntToBox(0, 0, MMX2 - MMX1, MMY2 - MMY1));
DrawTPABitmap(BMP, TPA, 16777215);
FilterPointsPie(TPA, 0.0, 360.0, 0.0, 75.0, (MMX2 - MMX1)/2, (MMY2 - MMY1)/2);

For I:= 0 To High(TPA) do
begin
SetLength(DRAW, 1);
Draw[0]:= TPA[I];
DrawTPABitmap(BMP, Draw, TIA[I]);
end;

DebugBitmap(BMP);
SaveBitmap(BMP, 'C:/Users/Brandon/Desktop/' + Name + '.bmp');
FreeBitmap(BMP);
end;

var
I: Integer;

begin
Smart_Server := 72;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;
while true do
begin
wait(1000);
while (Not SMARTENABLED) do
wait(1);
GetMinimap('MM' + ToStr(I));
Inc(I);
end;
end.
Overall.. Flawless Door opening and walking for the first floor.. I might do the other floors IF needed and IF you can't use the mapmaker yourself.

TheSubZero

2012-03-04 17:29:30

From: ggzz
What does it have to do? And I heard to colours down there are like the living cavern/waterfiend area colours.. so??

Why not just use narcle's fast fighter there?


With Giant Spiders, you have to bank about every 30-60 minutes. Even if you're maxed with Bandos (That would probably bank every 90+ though).
Flesh crawlers may even need banking.
Banking is especially required if you're F2P.


Sin: "My GSK is in dev, just banking is really hard.
Im considering just using Guthans and no banking."

@Sin:
I am very excited, and I'd love to test it if you were needing a tester. Overall, I'm very happy and appreciative of your efforts towards such a beautiful script. The only problem with this is if someone isn't Members, then they probably won't be able to use it. Perhaps you could make 2 scripts, one labeled "GSK -Guthans" and another with "GSK - Banking".

Thank you all, again.