SRL Archive - Discussions & Debates

Would you use an AIO Stronghold Fighter


putonajonny

2012-05-05 13:04:42

Script available here: http://villavu.com/forum/showthread.php?t=83289


Intro
I am planning on making an AIO Stronghold of Security Script… about it really.

Planned Features
  • Banking
  • Looting
  • Please post anything else you want added below


Thank you for your help so far, The response has been great!

Monster Selection:

weequ

2012-05-05 13:36:10

Dunno if I would use it but it sounds good and I think a lot of people would use it.
Level 1: Room 7
Level 2: Room 5
Level 3: Room 2 and 5
Are the most important rooms I think.

Jake

2012-05-05 13:41:57

wouldnt use any in level 1, those are for lower levels, and they would train on minotaurs

level 2: Flesh crawlers (room 5)
level 3: giant spiders (room 4 and 5)
level 4: ankous (room 4)

Last Legend

2012-05-05 13:55:24

Would be used by a lot of people surely, only thing is flesh crawlers would become bot infested quite quickly

Kyle Undefined

2012-05-05 14:05:48

I would use it on the Giant Spiders.

putonajonny

2012-05-05 16:14:42

From: Kyle Undefined
I would use it on the Giant Spiders.


Then use my already released Giant Spider Killer ;)


@Everybody else, thank you, I will start work on this tonight I think :)

zamserv

2012-05-05 16:22:21

Floor 2, room 3, rats and zombies

Er1k

2012-05-05 20:36:33

Minotaurs, Fleshies, giant spiders, ankous, zombies pretty much are all we need.

Flight

2012-05-05 22:25:21

I apologize for the off topic question, but how are you handling the location detection and navigation through the different floors of the Stronghold, putonajonny? I can successfully navigate from the first floor of the first room to where ever I need to go, but it relies on a direct approach, there's no failsafes incase something goes wrong.

Both SPS 1 & 2 are having trouble determine accurate tiles so I've been relying on DTMs to put the player exactly where I want him. This works ok, but should something go wrong then how would the script know which room we're in to continue on with the navigation? It's been giving me a headache and I thought maybe you've made more headway than I have.

Sin

2012-05-05 22:36:28

Flight, rudimentary as it may seem, but For my GSK, I used coordinates to get me where unwanted to be :3

John

2012-05-05 22:47:03

I had a go at flesh crawlers… but the doors are insanely hard to detect.

Kyle Undefined

2012-05-05 22:50:59

From: putonajonny
Then use my already released Giant Spider Killer ;)


@Everybody else, thank you, I will start work on this tonight I think :)


Didn't know you already released one xD

jimmer fredette

2012-05-06 02:56:47

I would use them on flesh crawlers, can't wait till you finish this script. Will be nice with looting and banking

J J

2012-05-06 06:35:45

Neat idea Sin. putonajonny
EDIT: Why did I even posted Sin. I guess it's because of the yellow name + SRL Helper rank lol

My choices:
Level 1 - Goblin / Minotaurs (5, 11, 12, 13, 16, 25 and 27)
Level 2 - Flesh Crawlers (28, 35 and 41)
Level 3 - Giant Spiders (50)
Level 4 - Ankous (75, 82, and 86)

Minotaurs for training low leveled pures and low leveled accounts.
Flesh crawlers to train them once they can use rune/dragon
Giant spiders for higher leveled accounts
Ankous for even higher leveled accounts using salve amulet(e)

blother

2012-05-06 12:57:21

This would be so sick. Sounds like it will be a tough project though.

[D]ude

2012-05-07 05:08:44

Nice! I've been working on the stronghold banking that you pmed me about, but if you're coming out with this, then I'll just skip right along to Demons, Hobgoblins, and the Ice Giants

NexPB

2012-05-13 07:45:45

Small suggestion for the gui use a list for item to loot alot nicer and easyer :p

Great progress so far :D

putonajonny

2012-05-13 09:13:04

From: NexPB
Small suggestion for the gui use a list for item to loot alot nicer and easyer :p

Great progress so far :D


How would this work? Like select from a list then press add for each item?

Joe

2012-05-13 09:17:59

I would use it on minotaurs and zombies maybe even ankous. But the form looks sweet and it'll probably be rockin.
Good luck! Can't wait to see it working!

NexPB

2012-05-13 11:09:22

From: putonajonny
How would this work? Like select from a list then press add for each item?

Yes, you have 2 Lists 1 with all the loot avaible and 1 where all the items belong what people want and you create 2 buttons "->" (=add) & "<-" (=remove).

putonajonny

2012-05-13 14:57:39

From: NexPB
Yes, you have 2 Lists 1 with all the loot avaible and 1 where all the items belong what people want and you create 2 buttons "->" (=add) & "<-" (=remove).


Sound good, I'll leave it as it is for now, once it is working I'll change it

Benny

2012-05-13 15:10:04

This would be a great idea :D

ninoqino

2012-05-16 19:20:03

It looks really promising, I can't wait to give it a try

Gucci

2012-05-16 19:23:07

YES! I would definitely love this would be awesome training for my pures and my main. With banking it's even better

peeweewoen

2012-05-16 19:30:48

i would definitely use it, if it wouldn't accidentally click and get stuck in the doors :P

putonajonny

2012-05-19 06:03:10

Update:

I have now got pretty much flawless walking on floor 1, once I have implemented the fighting I will go for a release

putonajonny

2012-05-20 18:17:56

I have a beta version working very well, PM me if you want to test

Flight

2012-05-20 21:06:46

You seemed to have missed my question. How are you handling the navigation and player's location detection throughout the stronghold? I myself can navigate anywhere within it from the start, but if something goes wrong I have no accurate way to detect which floor & room my player is in to continue. I'm just curious how you're accomplishing this.

putonajonny

2012-05-21 10:49:39

From: Flight
You seemed to have missed my question. How are you handling the navigation and player's location detection throughout the stronghold? I myself can navigate anywhere within it from the start, but if something goes wrong I have no accurate way to detect which floor & room my player is in to continue. I'm just curious how you're accomplishing this.


Sorry I did notice it at the time, just meant to reply when I had actually sorted it, I have only done Floor 1 but I have created a door opening procedure that seem to be almost flawless, if you want a copy of what I have so far I'll PM you, I have developed an InArea function that uses euphemism's PointInPolygon function, which seems to accurately detect which area you are in, it's all very hard to explain but I have tried to keep every procedure/function as general as possible so that when I go to the next floor I just have to enter a few colours and it should all work, but yeah SPS seems to work ok from what I have tried

Flight

2012-05-21 12:59:24

From: putonajonny
Sorry I did notice it at the time, just meant to reply when I had actually sorted it, I have only done Floor 1 but I have created a door opening procedure that seem to be almost flawless, if you want a copy of what I have so far I'll PM you, I have developed an InArea function that uses euphemism's PointInPolygon function, which seems to accurately detect which area you are in, it's all very hard to explain but I have tried to keep every procedure/function as general as possible so that when I go to the next floor I just have to enter a few colours and it should all work, but yeah SPS seems to work ok from what I have tried


ObjectDTMs, yeah I shot that idea down in the beginning because apparently I don't know all the features of it. I thought it was limited to using MM objects alone, not so much wall objects/MM shapes. I could surely check that out…

And about the SPS, which version are you using? Also, what are your SPS tolerance/accuracy settings set to? I've had nothing but hell from both of them with a wide range guess-and-checks.

b_lone

2012-05-21 14:09:06

I prefer Giant Spiders…free xp for all! :D On the other hand…Ankous make a 200k ish an hour…in a way that could be bad…

footballjds

2012-05-21 14:11:08

would use for ankous

putonajonny

2012-05-21 17:23:24

From: Flight
ObjectDTMs, yeah I shot that idea down in the beginning because apparently I don't know all the features of it. I thought it was limited to using MM objects alone, not so much wall objects/MM shapes. I could surely check that out…

And about the SPS, which version are you using? Also, what are your SPS tolerance/accuracy settings set to? I've had nothing but hell from both of them with a wide range guess-and-checks.


I'm only using the object DTM stuff for things like ladder finding, all the rest is SPS, I'm using SPS2, it's working perfectly, I'm just using the SPS maps that cope with it, not custom ones, so I've not adjusted tolerance or anything

Flight

2012-05-21 22:04:50

I might have to manually update my SPS 2 then. Thanks for the advice, I'll take another crack at it soon. Also, here's what I used for walking to ladders.


Function WalkToLadder(Ori: String): Boolean;
var
B: TBox;
i: Integer;
TP: TPoint;
TPA: TPointArray;
TIA: TIntegerArray;
ATPA: T2DPointArray;
begin
Result := False;

ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, TPA, 666969, MMX1, MMY1, MMX2, MMY2, 15);
if (Length(TPA) < 1) then
Exit;

ATPA := TPAtoATPAEx(TPA, 5, 7);

for i := 0 to High(ATPA) do
begin

B := GetTPABounds(ATPA[i]);

with B do
begin
TIA := GetColorsBox(B.X1, B.Y1, B.X2, B.Y2, True);

if (Ori = 'Up') then
begin
if (not InIntArray(TIA, SRL_GetBlackBackground)) then
begin
TP := MiddleBox(B);
Break;
end;
end else if (Ori = 'Down') then
begin
if InIntArray(TIA, SRL_GetBlackBackground) then
begin
TP := MiddleBox(B);
Break;
end;
end;

end;
end;

if (not (TP = Point(-1, -1))) then
begin
//BrakeMMouse(TP.X, TP.Y, 3, 3);
MMouse((TP.X, TP.Y, 3, 3);
ClickMouse2(True);
if (not WaitFunc(@IsMoving_F, 10, 1000)) then
Exit;
While IsMoving_F do
Wait(1);
Result := True;
end;
end;

putonajonny

2012-05-22 05:35:34

From: Flight
I might have to manually update my SPS 2 then. Thanks for the advice, I'll take another crack at it soon. Also, here's what I used for walking to ladders.


Function WalkToLadder(Ori: String): Boolean;
var
B: TBox;
i: Integer;
TP: TPoint;
TPA: TPointArray;
TIA: TIntegerArray;
ATPA: T2DPointArray;
begin
Result := False;

ColorToleranceSpeed(1);

FindColorsSpiralTolerance(MMCX, MMCY, TPA, 666969, MMX1, MMY1, MMX2, MMY2, 15);
if (Length(TPA) < 1) then
Exit;

ATPA := TPAtoATPAEx(TPA, 5, 7);

for i := 0 to High(ATPA) do
begin

B := GetTPABounds(ATPA[i]);

with B do
begin
TIA := GetColorsBox(B.X1, B.Y1, B.X2, B.Y2, True);

if (Ori = 'Up') then
begin
if (not InIntArray(TIA, SRL_GetBlackBackground)) then
begin
TP := MiddleBox(B);
Break;
end;
end else if (Ori = 'Down') then
begin
if InIntArray(TIA, SRL_GetBlackBackground) then
begin
TP := MiddleBox(B);
Break;
end;
end;

end;
end;

if (not (TP = Point(-1, -1))) then
begin
//BrakeMMouse(TP.X, TP.Y, 3, 3);
MMouse((TP.X, TP.Y, 3, 3);
ClickMouse2(True);
if (not WaitFunc(@IsMoving_F, 10, 1000)) then
Exit;
While IsMoving_F do
Wait(1);
Result := True;
end;
end;


that's really efficient code, but why isn't 'ori' a boolean? I've been using the GatherMMObjects to find the MM location of the ladders, then using MMtoMSEx to get an approx MS location, then FindColoursSpiralToleance from that point to find the ladder, seems to work really well

putonajonny

2012-05-24 16:40:06

I have release a beta copy to the people that said they would test, if you want to test please PM me

[D]ude

2012-05-25 00:53:49

It works good. The eating though is a little buggy. I am running in room 2 on floor 3 and invempty keeps returning true when it is false. I changed that into an exists item thingy, and it runs flawlessly now.

Here is what I changed it to starting at line 1470:


if(InvEmpty)then
begin
for j := 1 to 28 do
wait(100+random(150));
if not existsitem(j) then
begin
wait(100+random(150));
if not existsitem(j) then
begin
Message('Inventory is empty - HPPercent: '+IntToStr(HPPerCent), True)
NoMoreFood := True;
end;
end;
end;

putonajonny

2012-05-25 11:31:52

From: dude1994
It works good. The eating though is a little buggy. I am running in room 2 on floor 3 and invempty keeps returning true when it is false. I changed that into an exists item thingy, and it runs flawlessly now.

Here is what I changed it to starting at line 1470:


if(InvEmpty)then
begin
for j := 1 to 28 do
wait(100+random(150));
if not existsitem(j) then
begin
wait(100+random(150));
if not existsitem(j) then
begin
Message('Inventory is empty - HPPercent: '+IntToStr(HPPerCent), True)
NoMoreFood := True;
end;
end;
end;


There seems to be a bug with invempty where it returns a false positive, thanks for the help :)

How about swapping all of the InvEmpty for InvIsEmpty?
Function InvIsEmpty : Boolean;
Var
Time : integer;
begin

Result := InvEmpty;

MarkTime(Time);
While(Result)do
begin
Result := InvEmpty;
if(TimeFromMark(Time) > 2000)then
exit;
end;

end;