SRL Archive - SRL Archives

Woodcutting and Mining.scar


Dynamite

2009-05-30 23:00:00

I added the option to use Inferno Adze.
The Woodcutting works (I think)
And the Mining should work ;)

Can you guys test these for me and give me feedback?

{*******************************************************************************
procedure LoadMiningBitMaps;
By: Stupid3ooo Edited a bit by The Man
Description: Declares Mining Bitmap.
*******************************************************************************}

procedure LoadMiningBitMaps;
begin
BrokenPick := BitmapFromString(11, 6, 'z78DA73730301038A811' +
'B55CDA18569B800E5F662EA722311407401000F035515');
PickAxeHandle := BitmapFromString(14, 26, 'z78DA3330A014B82' +
'101032A99865F8412D3069B99F8750D0633E9E9C2C11F86A32E1C' +
'6C2E1CFC7979D48523A116A0BC061C2A66D2A2DE07009D42B460');
PickAxeHead := BitmapFromString(10, 7, 'z78DA33300001371CC0' +
'000720460D2E5D986CE27591AA973CF5D435C18D02003101000D7' +
'F5A19');
PickAxe :=BitmapFromString(30, 14, 'z78DA3330A03E70C3010C' +
'0625C0EF36FAB8DC8D2C407F37D32E36A96B267D521DB56C19A8D' +
'C41B9FBDDA80406732C0F8F544A7C0C0E6CBA25AF641BD8B211BF' +
'AB28C94DB47039ADC307D3FDB42B2107674D34185A1400863DFCA' +
'8');
adze := BitmapFromString(9, 9, 'beNqzM3azNYIgBgZGCJLlZFdVV' +
'gIy4OKtmopAZC/Mb29rBeQKCgpCxBs1FMpV5YqVZf0khIG6kKXq1O' +
'WB4hkKUvGyEhBxIAAyfp9VB2rJV5IBajHm54FIeTqYABlvDshCjGr' +
'PFciJ4IVIedgZAxl3t0hvnCA2u04Y4kKIaRCpQ/MkgFJwQYg4EEHM' +
'RFYMRQASJSec');

Ore := BitmapFromString(8, 11,
'564D42564D42564D42564D42564D42564D42000001000001564D42' +
'564D42564D42544A3B544A3B0000013D312254442F564D42564D42' +
'564D42564D420000012D2518443827584731564D42544A3B544A3B' +
'564D42000001201B124034257A6346564D42544A3B4D4438564D42' +
'000001483B297D6547806748564D42564D42544A3B564D42000001' +
'7D6547806748000001564D42564D42544A3B544A3B544A3B000001' +
'000001302020000001000001000001000001000001544A3B302020' +
'3020202D2518382D1E403425483B2951412D000001544A3B544A3B' +
'5847315C4A345E4D366552395E4D360000013020200000015C4A34' +
'5E4D3665523968543B655239000001302020000001');

end;

Woodcutting
{*******************************************************************************
function FindAxe: Boolean;
By: Sumilion, edited by Rasta Magician and EvilChicken! and The Man
Description: Finds if there is an axe present. Axe can be wielded or unwielded.
Results name of found axe as uncapitalized string.
*******************************************************************************}

function FindAxe: string;
var
Ix, Iy: Integer;
I, InvAxe, WieldAxe, FoundAxe: Byte;

begin
Result := '';
if not LoggedIn then exit;
srl_LoadBitmaps([47, 48, 49, 50, 51, 52, 53, 54, 110]);
I := 0;

repeat
case GetCurrentTab of
5: begin
for WieldAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54-WieldAxe),Ix, Iy, clBlack, 566, 285, 606, 327, 10) then
Break;
if I = 0 then
if not GameTab(4) then exit;
Inc(I);
end;

4: begin
for InvAxe := 0 to 8 do
if FindTransparentBitmapTolerance(srl_GetBitmap(54 - InvAxe), Ix, Iy, clBlack, MIX1, MIY1, MIX2, MIY2, 10) then
Break;
if I = 0 then
if not GameTab(5) then exit;
Inc(I);
end;
else
if not GameTab(5) then exit;
end;
until I = 2;

if (InvAxe = 9) and (WieldAxe = 9) then
begin
Writeln('No axe was found.');
srl_FreeBitmaps;
Exit;
end;

FoundAxe := Min(WieldAxe, InvAxe);

case FoundAxe of
0: Result := 'dragon';
1: Result := 'rune';
2: Result := 'addy';
3: Result := 'mith';
4: Result := 'black';
5: Result := 'steel';
6: Result := 'iron';
7: Result := 'bronze';
8: Result := 'adze';
end;

WriteLn('Using ' + Capitalize(Result) + ' axe.');
srl_FreeBitmaps;
end;

EDIT: also you will need this in your Bitmaps.scar
bmp_Adze                  = {last number};

Cheers guys

T~M

jakeyboy29

2009-05-30 23:06:01

no need for broken pick, pick axe head, or handle.

ZephyrsFury

2009-05-30 23:10:07

You're Adze bitmap is huge (35x33). Something around 10 x 5 should be sufficient. Anyway this will have to wait till Rev 34 anyway.

Dynamite

2009-05-30 23:12:02

From: jakeyboy29
no need for broken pick, pick axe head, or handle.


Why isn't there gas anymore?
And ok, Zephy, how can I make it smaller though, should i just crop the edges?

T~M

ZephyrsFury

2009-05-30 23:25:32

From: The Man
Why isn't there gas anymore?
And ok, Zephy, how can I make it smaller though, should i just crop the edges?

T~M


Just don't make the bitmap of the whole axe. You only need parts in the middle that are unique.

Dynamite

2009-05-30 23:29:13

OH ok will get on it now :)

T~M

Dynamite

2009-05-31 00:51:12

Bitmaps.scar
110: Result := BitmapFromString(9, 9, 'beNqzM3azNYIgBgZGCJLlZFdVV' +
'gIy4OKtmopAZC/Mb29rBeQKCgpCxBs1FMpV5YqVZf0khIG6kKXq1O' +
'WB4hkKUvGyEhBxIAAyfp9VB2rJV5IBajHm54FIeTqYABlvDshCjGr' +
'PFciJ4IVIedgZAxl3t0hvnCA2u04Y4kKIaRCpQ/MkgFJwQYg4EEHM' +
'RFYMRQASJSec');
bmp_Adze                  = 110;
also change
srl_BitmapCount = 110;
to how many BMPs you have.

I think that is all ;)
I decided not to take gas out, because the people who made them spent a lot of time on it, so to delete it would be a bit disrespectful. Also if runescape brought back gas then we would have to remake, if you disagree I will delete it ;)

T~M

T~M

NCDS

2009-05-31 00:55:28

That axe is P2P, correct?

AFAIK SRL only support's F2P.

Dynamite

2009-05-31 00:56:07

Nope, Dragon Axe ;)

T~M

ian.

2009-05-31 01:09:24

D: Sorry, but I never really understood why bmps were in SRL, except essentials. Axes aren't essential in my opinion, and it'd be better if people made there own bmps/DTMs so they learn them.

Dynamite

2009-05-31 01:11:22

Yeh and I think most people do, but for the people who are to lazy they use these. And I saw the other axes so I thought I should just add this :)

T~M

jakeyboy29

2009-05-31 01:28:06

theres no gas afaik

ZephyrsFury

2009-05-31 07:44:00

From: NCDS
That axe is P2P, correct?

AFAIK SRL only support's F2P.


We try to support F2P since more people would auto on F2P but theres no harm in having some members-only stuff there too.

Anyway thanks The Man, I'll add these to the dev repos.

Dynamite

2009-05-31 14:29:37

Yay, I will get on to fixing and adding more stuff, this the first bit that ever been added that mine :)

T~M