PDA

View Full Version : SRL Stats - SigMaker!



BazzBarrett
09-21-2008, 09:37 PM
hey! me again ;)

i realy like this script from 4 lines it creates a sig for ur stats (script stats atm) =)
feal free to messabout with the bitmaps and sizes if u whant it 2 look difrent or whant more stats included (it's all in arrays so easly modifided) enjoy =)
doesent auto-update havin been its only scar!

exsample:
http://img259.imageshack.us/img259/2190/bazzbarrettsclaysoftnerwf0.png

// Bazzbarrett's SigMaker!
//
// Fill in lines 13-16 press run and be ammased!
// Please exsperiment with ur own backgrounds and Side bitmaps ;)
//
program SRLStatSigMaker;
var
BgBmp, CashBmp, text, ScriptId :integer;
Timeworked, Title :string;
Value, TheValue :array [0..1] of string;

procedure setup;
begin
Title := 'BazzBarrett''s ClaySoftner!';
Value[0] := 'Clay Sofened';
Value[1] := 'Buckets Filled';
ScriptId := 995;
end;


procedure LoadBmps;
begin
BgBmp := BitmapFromString(250, 150, 'beNrt0rEJADAMA0GPptEyeiBD' +
'pJAPrlMnPnMCQKmBampnc+0n0EbtqP2tE2igdtSudtQOage1g 9pB7' +
'aB2UDuoHdSO2tWO2tWO2kHtoHZQO6gd1A5qB7WD2lG72lG7l1 A7qB' +
'3UDmoHtYPaQe2gdlA7alc7age1g9pB7aB2UDuoHdQOage1o3a 1o3Z' +
'QO6gd1A5qB7WD2kHtoHbUrnbUrnbUDmoHtYPaQe2gdlA7qB3U jtrV' +
'jtq9hNpB7aB2UDuoHdQOage1g9pRu9pRO6gd1A5qB7WD2kHto HZQO' +
'6gdtasdtYPaQe2gdlA7qB3UDmoHtaN2taN2taN2UDuoHdQOag e1g9' +
'pB7aB21K521O4l1A5qB7WD2kHtoHZQO6gd1I7a1Y7aQe2gdlA 7qB3' +
'UDmoHtYPaQe2oXe2oHdQOage1g9pB7fCndqiidtQOrdTOztoB qHEB' +
'vItCog==');
CashBmp := BitmapFromString(71, 75, 'beNrtm81LVFEYxnVuSaaOt' +
'VFsbLTIbChnm0igVEb2RZvWtgiE/oU+NhJRizZBtKqIEAMh6i+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gE0uinEuP' +
'ZsFOr4bFDV9dB9ws19yzgbsyXImCZYDba8jYXuZfqA47aei/vbJak' +
'pRKo0mNFNpSJouIMoSgmYtS1yO/dROxWIPsHdhidGq3EXp0S2IWmm' +
'5BKBLl0j3zrUDxowAKJw461ZgOUdF0VRIEcARpQnKqlJRa5tX NLEo' +
'fstmiXQeoAmXHk7pTIDS1H7mTN5mm4FgvNgDdHKyGlH1rKqaU pQzE' +
'OvGKUOydMGTvFNdSvuZXh3HWcOZk73Anv3ViuKr4SAqmdiZKJ ztuC' +
'qbRXQXy1Z2XGUCrzfrjN2Zq1cRlXh7srlFsey3rzNAJy0mjcd pdeB' +
'UrhXYXJcJPz34OqskbVGnZ844HkQ5cr5/mQfO/rYOu7p95Oyc61sP' +
'SzLO1jrQCU8hHzvw5ctp4Oz+0ahBlDc5vH04A5gi+D6X8VjM5 isda' +
'nnD2UIGqJ3QMwuzU4YuW8byWaKDr3ams1SpZ5HYZKLUhA662U KfvH' +
'+TJxROX00d6gfOtp7nraKvCbVfFVH17P41maiasHXzJwdNtqs pmq+' +
'J7aMmCvuZRJw3SvJtoLexw35QoabdoFdvTSlKf0PrNVK+Kw9s A9Z+' +
'EmaoNNsr02Wp3cm+oihad+NekjalqDVknoXHlwCtS8cSG4W5u vdmE' +
'u3ABvljwjqKarT/XCTCkx/V4OPh4UFAX40N9IOR7m6AQZb3M403gu' +
'sCgUAgEAhU+AMYfe3F');
end;

procedure scriptterminate;
begin
freeBitmap(CashBmp);
freebitmap(BgBmp);
end;

procedure display;
begin

end;

procedure getinfo;
var
info :string;
I : integer;
begin
Info := getpage('http://www.stats.srl-forums.com/index.php?action=view_script&id='+inttostr(ScriptId));

//TimeWorked
TimeWorked := copy(Info, pos('Worked', info)+19 , 30);
TimeWorked := left(TimeWorked, Pos('.', Timeworked)-1);

//The Values
For I := 0 to High(value) do
begin
TheValue[I] := copy(info, pos(Value[I], info)+length(Value[I])+12, 30);
TheValue[I] := left(TheValue[I], pos('</', TheValue[I])-1);
end;
end;

procedure dothetext;
var
I :integer;
begin
//Title
Text := CreateBitmapFromText(Title, NPCChars, ClWhite);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(45, 20, text, BgBmp);

//TimeWorked
text := createBitmapFromText('Time Worked:', UpChars, Clblue);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(103, 39, text, BgBmp);
Text := CreateBitmapFromText(TimeWorked, UpChars, ClWhite);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(103, 55, text, BgBmp); //+16
For I := 0 to high(value) do
begin
Text := CreateBitmapFromText(Value[I]+':', UpChars, ClBlue);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(103, 71+(32*I), text, BgBmp); //+16

text := createBitmapFromText(TheValue[I], UpChars, ClWhite);
settransparentcolor(Text, ClBlack);
fastdrawtransparent(103, 88+(32*I), text, BgBmp);
end;
end;

begin
setup;
loadBmps;
fastdrawtransparent(20, 50, CashBmp, BgBmp);
Getinfo;
Dothetext;
DisplayDebugImgWindow(250, 150);
SafeDrawBitmap(BgBmp, getdebugcanvas, 0, 0);
SaveBitmap(BgBmp, ScriptPath + Title +'.bmp');
end.

Death12652
09-21-2008, 10:44 PM
nice script I needed one like this badly thank you so much.

TViYH
09-22-2008, 02:37 AM
VERY, VERY, VERY nice!

You'll be gladly accepted here at SRL.

You're a savior.
Rep++

sirlaughsalot
09-22-2008, 03:18 AM
Damn dude, if you could make something that would auto-update, that is dynamic like that, i would kiss your penor...

MasterKill
09-22-2008, 05:24 AM
lol nice, looks fun.

Though I'll stick to my php ones couse those do auto update :p

but good job :D

PvH
09-22-2008, 12:50 PM
Same here, I really like it..
But I like the ones who update in php:p

PvH

Naum
09-22-2008, 04:29 PM
You really deserve SRL Member... Great Job!!!

BazzBarrett
09-22-2008, 10:04 PM
oh thx guys forgotabout this XD i could probubly make it update everytime u run the sciprt ill look into it =\

TViYH
09-22-2008, 11:48 PM
You'd prolly have to make it make a php script, then have it upload the php script to the interwebz, then use the php to create the image.