SRL Archive - SRL Archives

Middle Obj


pwnaz0r

2007-10-11 14:12:57

Does not use uptext. Made it really quick cause i was bored. Will find the middle of any object, spiraling out from x and y.


function MiddleObj(var x, y: integer; Colors: TIntegerArray; MaxHeight,
MaxWidth, Tolerance: integer): boolean;
var
a: integer;
Origin: TPoint;
sColors: TIntegerArray;
tTPA, rTPA: TPointArray;
begin
sColors:= Colors;
BubbleSortB(sColors);
for a:= 0 to Length(sColors) - 1 do
if not FindColorSpiralTolerance(Origin.x, Origin.y, sColors[a], 10, 10,
MSX2 - 10, MSY2 - 10, Tolerance)then
begin
if (a = (Length(sColors) - 1)) then
begin
result:= false;
exit;
end;
end;
for a:= 0 to Length(sColors) - 1 do
begin
FindColorsTolerance(tTPA, sColors[a], Origin.x - MaxWidth, Origin.Y -
MaxHeight, Origin.x + MaxWidth, Origin.Y + MaxHeight, Tolerance);
rTPA:= CombineTPA(tTPA, rTPA);
end;
MiddleTPAEx(rTPA, x, y);
result:= true;
end;

ShowerThoughts

2007-10-11 14:13:50

why is evryone so bored?

pwnaz0r

2007-10-11 14:15:44

From: hermpie
why is evryone so bored?


Not sure. Any script ideas?

Hugolord

2007-10-11 14:16:06

From: hermpie
why is evryone so bored?


what else would you have us do?

ill test your function later m8 looks nice tho

ShowerThoughts

2007-10-11 14:22:46

make alobby fisher or try to make all the unsolveable randoms make them all solveable :p

n3ss3s

2007-10-11 14:25:57

Not sure. Any script ideas?


Killerdou is on a swamp miner, Im on Al-Kharid miner, so dont pick those.

Hmm lemme see *looks at rs map* - Hey, now I know!

There is no SRL Clay Miner/Softener is there?

If there isnt, that would be great script to make I think!

EDIT: Z000MG SOMEONE TEH FAG BROKE THE 20,000 KILLS WITH MY SCRIPT! —–> GENERAL NEWS! W000000000

Hugolord

2007-10-11 14:28:38

From: hermpie
make alobby fisher or try to make all the unsolveable randoms make them all solveable :p


im still waiting for a person with a bot on the scaperune random but meh..

and the maze random isn't solveable

well it is but will take months to solve

pwnaz0r

2007-10-11 15:40:47

From: hugolord
im still waiting for a person with a bot on the scaperune random but meh..

and the maze random isn't solveable

well it is but will take months to solve


If you want to solve it, use FloodFill with Canvas(if you don't know what this is, don't try to solve it :D) to find paths on minimap. then just find concetration of colors for doors. If it looks different enough for a human to determine its a door, find out why. That is why no random is unsolvable

bullzeye95

2007-10-11 16:00:11

From: pwnaz0r
If you want to solve it, use FloodFill with Canvas(if you don't know what this is, don't try to solve it :D) to find paths on minimap. then just find concetration of colors for doors. If it looks different enough for a human to determine its a door, find out why. That is why no random is unsolvable


Will you explain FloodFill please?

Wizzup?

2007-10-11 16:06:07

Isn't this Like FindObjTPA?

pwnaz0r

2007-10-11 16:20:31

Yeah I guess, my bad :D. I'm not done adding though

http://en.wikipedia.org/wiki/Flood_fill

SKy Scripter

2007-10-11 16:28:15

Hey, Flood Fill is my thing :P..
Except it was too slow :) so do a plugin..

Special Ed

2007-10-11 16:33:26

Hey… I'm working on a Anywhere / Anything Powerfisher which is almost complete so I'll post that within a week or so, but for middle finding, as what I did with my FishingSpotFinder if you used FindColorsTolerance and then converted each of those points into a list of x's and y's then used BubbleSort to get the lowest x's and y's as the [0] and the highest as [GetArrayLength(Array) - 1]. So now you'd have a list of X's and Y's with [0] being the ones closest to (0,0) or the top left corner of the box, and the the ones at the end of the array would be the bottom right corners of the box, then you just get the distance and divide by two add those numbers to the Top left corner and your good!

FishingSpotFinder Here!

pwnaz0r

2007-10-11 19:10:32

From: SKy Scripter
Hey, Flood Fill is my thing :P..
Except it was too slow :) so do a plugin..


I meant only the path you are on :D.

Bobarkinator

2007-10-11 20:56:03

From: Special Ed
Hey… I'm working on a Anywhere / Anything Powerfisher which is almost complete so I'll post that within a week or so, but for middle finding, as what I did with my FishingSpotFinder if you used FindColorsTolerance and then converted each of those points into a list of x's and y's then used BubbleSort to get the lowest x's and y's as the [0] and the highest as [GetArrayLength(Array) - 1]. So now you'd have a list of X's and Y's with [0] being the ones closest to (0,0) or the top left corner of the box, and the the ones at the end of the array would be the bottom right corners of the box, then you just get the distance and divide by two add those numbers to the Top left corner and your good!

FishingSpotFinder Here!


That's what MiddleTPAEx does lol. At least I'm pretty sure, last time I checked it did that.

Special Ed

2007-10-11 22:47:01

ORLY? Well I wish that would have came out before I made that… Oh well Maybe I'll have to check MiddleTPAEx out, it may be faster than mine 0.o

HellBoyz

2007-10-11 22:53:51

From: n3ss3s

There is no SRL Clay Miner/Softener is there?


If you don't mind i've made it up in freebies area, well but not quite updated. dats all

Bobarkinator

2007-10-11 22:54:10

From: Special Ed
ORLY? Well I wish that would have came out before I made that… Oh well Maybe I'll have to check MiddleTPAEx out, it may be faster than mine 0.o


It's in a plugin ;)

Special Ed

2007-10-14 11:51:25

From: Bobarkinator
It's in a plugin ;)


Harsh… Thats all I can say. Way to kill my hopes and dreams man! :p

n3ss3s

2007-10-14 12:18:45

That is why no random is unsolvable


Except for there is no difference in tiles of doors on MM in the maze, you just have to click by experience and find the door on ms…

nielsie95

2007-10-14 14:21:13

@ Special Ed: WizzyPlugin is opensource so you can still check it out :)