SRL Archive - SRL Archives

wilderness stuff..


phantombmx

2006-04-29 02:06:32

god, im crankin out a bunch of odd stuff lately… devs, please discuss these with the other devs before you add it (ie. where it goes).. SDcit and Bebe, please dont rush to add these.. discuss it first :p

all things are described appropiately, and they are already formatted, so you devs dont have much trouble ;)

Edit:: all were completely tested in every condition i could think of

{*******************************************************************************
function InMultiCombatZone:Boolean;
By: phantombmx
Description: Returns true if you are in the multi-combat zone, false if not.
*******************************************************************************}

function InMultiCombatZone:Boolean;
var multicombat :integer;
begin
multicombat := BitmapFromString(16, 4, 'z78DA33300001373767' +
'57134708091630B0B4B474B4B4342002581A5A1A591A19BA19191' +
'A6131C700C37C4C596200312690670B7E5D8EA6D84D21D57C4C71' +
'88C900DFB15033');
if(FindBitmapIn(multicombat, x, y, 467, 445, 512, 483))then
Result:=True;
FreeBitmap(multicombat);
end;

{*******************************************************************************
function InWilderness:Boolean;
By: phantombmx
Description: Returns true if you are in the wilderness, false if not.
*******************************************************************************}

function InWilderness:Boolean;
var skull :integer;
begin
skull := BitmapFromString(5, 5, 'z78DA7373C3078CCD8D5C8C0C7' +
'1B1F1CB3ABB39595A5A629A09114756834C42C40128C72517');
if(FindBitmapIn(skull, x, y, 476, 256, 504, 280))then
Result:=True;
FreeBitmap(skull);
end;

{*******************************************************************************
function WildernessLevel:Integer;
By: phantombmx
Description: Returns what level wilderness you are in, 0 if not in wilderness.
*******************************************************************************}

function WildernessLevel:Integer;
var ChatChars, i :integer;
begin
Result:=0;
if(InWilderness)then
begin
ChatChars:= LoadChars2(AppPath + 'CharsChat2\');
for i:=1 to 60 do
if(FindText(x, y, inttostr(i), ChatChars, 489, 279, 516, 300))then
Result:=i;
FreeChars2(ChatChars);
end;
end;

{*******************************************************************************
function OtherPlayerFound:Boolean;
By: phantombmx
Description: Returns true if a player-controlled character that isn't you
is on the minimap, false if not.
*******************************************************************************}

function OtherPlayerFound:Boolean;
var playerdot :integer;
begin
playerdot := BitmapFromString(4, 4, 'z78DA33300001373737572' +
'0049306182210D2D5190431455C8C4010A2CBD508049D4D411022' +
'02008185174E');
if(FindBitmapIn(playerdot, x, y, MMX1, MMY1, MMX2, 77))or
(FindBitmapIn(playerdot, x, y, 653, MMY1, MMX2, MMY2))or
(FindBitmapIn(playerdot, x, y, MMX1, 88, MMX2, MMY2))or
(FindBitmapIn(playerdot, x, y, MMX1, MMY1, 643, MMY2))then
Result:=True
FreeBitmap(playerdot);
end;

WhiteShadow

2006-04-29 02:41:44

I like the 3rd one the most. I like these, they're leet. :p

~WhiteShadow

The Prince of Randomness?

2006-04-29 04:56:17

+|-|3$3 \x/1|[)3|2|\|3$$ |*|20(3[)|_||23$ @|23 \/3|2`/ |33+ 3$|*3(1@||`/ +|-|3 +|-||21[) 0|\|3 \x/|-|1(|-| |20><0|2$ `/0|_||2 |}0><0|2$ |0|0|!!!11

phantombmx

2006-04-29 05:03:23

translation to non-noob? :p

The Prince of Randomness?

2006-04-29 06:18:50

these wilderness procedures are very leet especially the thrid one which rock your computers lol they are good

Bebe

2006-04-29 09:26:15

Very nice work Phantom. :)

Keep it up!

Sdcit

2006-04-29 10:45:33

GREAT WORK phantom. Oneday you might become the new function man :D

I thought the wildy only goes up to 55?

Bebe

2006-04-29 10:47:57

It doesn't matter sdcit, it will still work.

Dankness

2006-04-29 11:52:32

we already have a ChatChar font used in SRL, you should update it to use the one thats already used. Otherwise if you keep loading and unloading the font it will eventually give you a Access Violation Error or a StackOverFlow error because of it. Otherwise nice procedures, to find what we used as ChatChar font just look in Global.Scar or SRL.Scar and it's declared in one of those. Also Don't Use Global Vars in procedure included in SRL. Local Vars are much better.

Here i fixed it for you i was bored.

[php]
{*******************************************************************************
function WildernessLevel : Integer;
By: Phantombmx
Description: Returns what level wilderness you are in, 0 if not in wilderness.
*******************************************************************************}

function WildernessLevel : Integer;
var CX, CY, I : Integer;
begin
Result:=0;
if(InWilderness)then
for I := 1 to 60 do
if ( FindText ( CX, CY, IntToStr ( I ), UpChars, 489, 279, 516, 300 )) then
Result := I;
end;
[/php]

phantombmx

2006-04-29 17:33:56

upchars didnt work for me… thats why i didnt use it.. and if you look closely at the Level: thing.. the e is that same as in the chat.. so i made it chat chars.. i didnt even notice the ones in srl if they were there.. also yeah i wasnt payin attention to usin locals instead.. ill keep that in mind next time..