SRL Archive - RS3 Outdated / Broken Scripts

RSDebugger


g0tp0t

2010-11-16 13:38:10

i am making a script that will draw info like NPC animation ids, object ids, and other stuff like RSBot does. i cant figure out how to get the smart canvas in Simba though. is it possible?

Sabzi

2010-11-16 13:55:38

I got something like that floating around in my old PC which is 320 km far away.
If I don't forget I will look it up at the weekend and post it.

EDIT: Btw, that was not me who done drawing on smart in simba first.
I can't remember who it was, I just modified that for myself, but Narcle sure got something.
I am searching for it now.
This one?: http://villavu.com/forum/showthread.php?t=57447
I am pretty outdated myself about what's going on here at SRL, though.

g0tp0t

2010-11-16 14:21:32

i already searched and they use getsmart canvas and gettargetdc which arent in simba.

mormonman

2010-11-16 14:25:31

From: g0tp0t
i already searched and they use getsmart canvas and gettargetdc which arent in simba.


Look at the drawing used in MSI

Shuttleu

2010-11-16 14:36:12

how about {$i srl/srl/misc/paintsmart.scar}

~shut

Sir R. M8gic1an

2010-11-16 15:03:24

http://villavu.com/repositories/srl-opendev/SRL/misc/paintsmart.scar

~RM

Wizzup?

2010-11-16 15:14:29

srl-…aintsmart.scar That made me laugh out loud. :p

Shuttleu

2010-11-16 15:37:54

From: Wizzup?
srl-…aintsmart.scar That made me laugh out loud. :p


now in my sig ;)

~shut

Cstrike

2010-11-16 15:57:48

Does SMART PAINT work?

program new;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i srl/srl/misc/paintsmart.scar}
{$i reflection/reflection.simba}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers); // Don't touch this line
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Active := True;
Nick := 'Aads';
Pin := '';
end;
end;

procedure lol;
begin
Smart_Server := 157;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
ActivateClient;
SetupSRL;
SetupReflectionEx(true);
DeclarePlayers;
LoginPlayer;
ClearDebug;
Wait (410+random(770));
SetAngle(true);
MakeCompass ('n');
SetRun(true);
end;

var boxy : TBox;
begin
lol;
boxy := IntToBox(50,50,80,80);
SMART_DrawBoxEx(true, boxy, clRed);
end.

That doesnt do anything to my smart screen :(

g0tp0t

2010-11-16 16:29:15

well srl aint smart. :P i wish id gotten to readd it and sig it first =[ =P

mormonman

2010-11-16 18:16:52

From: cstrike
Does SMART PAINT work?

program new;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}
{$i srl/srl/misc/paintsmart.scar}
{$i reflection/reflection.simba}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers); // Don't touch this line
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Active := True;
Nick := 'Aads';
Pin := '';
end;
end;

procedure lol;
begin
Smart_Server := 157;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
ActivateClient;
SetupSRL;
SetupReflectionEx(true);
DeclarePlayers;
LoginPlayer;
ClearDebug;
Wait (410+random(770));
SetAngle(true);
MakeCompass ('n');
SetRun(true);
end;

var boxy : TBox;
begin
lol;
boxy := IntToBox(50,50,80,80);
SMART_DrawBoxEx(true, boxy, clRed);
end.

That doesnt do anything to my smart screen :(


You have to "Enable Debug" on SMART.

g0tp0t

2010-11-16 20:04:58

lol, perfect, ty =D

Cstrike

2010-11-16 20:26:10

From: mormonman
You have to "Enable Debug" on SMART.


<3
Works :)!! TY

g0tp0t

2010-11-16 20:38:27

ok, i got it labeling ids of every ground item, but i dont know how to clear the smart canvas. will painting with drawdots work if i set clear to true?

Cstrike

2010-11-16 20:42:26

From: g0tp0t
ok, i got it labeling ids of every ground item, but i dont know how to clear the smart canvas. will painting with drawdots work if i set clear to true?


http://villavu.com/forum/showthread.php?t=60019

g0tp0t

2010-11-16 20:44:56

ty =]

Cstrike

2010-11-16 20:47:05

From: g0tp0t
ty =]


Welcome :)
BTW I found some good ways of using the TBox drawing on the canvas if you get stuck. I can make a loading bar now.

g0tp0t

2010-11-17 07:25:12

lol. ty =D

ill post if i need help =]

loading bar sounds cool :P what would it show was loading?

Sir R. M8gic1an

2010-11-17 09:36:59

function ClearSmartCanvas could be added. It'd be useful, but I was lazy at the time.

Also, there's a way to active 'Debug Smart' through code, but I couldn't remember it at the time. :S

~RM

Cstrike

2010-11-17 10:54:29

From: Sir R. Magician
function ClearSmartCanvas could be added. It'd be useful, but I was lazy at the time.

Also, there's a way to active 'Debug Smart' through code, but I couldn't remember it at the time. :S

~RM


OMG this would be indeed useful, is it somewhere in SRL code or in the Simba/SRL/SMART function list where I could find it, or is it one of those things you have to make up through code? That would be great if it could be found because I have some new awesome ideas with the debugging!

Sir R. M8gic1an

2010-11-17 14:56:02

Check how drawdots grabs smart's canvas and passes it as an argument to ClearRSCanvas ;)

~RM

TRiLeZ

2010-11-17 19:42:00

Here's how I draw progress reports on the canvas:

procedure DebugProggy(TP: TStringArray; DC, Colour, Shadow: integer);
var
MX, MY, Pic, OldDC, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic:= BitmapFromString(mx,my,'');
OldDC := GetTargetDC;
SetTargetDC(DC);
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], FriendChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 10 + 1, TTP[b].y + 10 + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x + 10, TTP[b].y + 10 + Numb, Colour);
end;
end;
CopyCanvas(GetBitmapCanvas(Pic), GetClientCanvas, 0, 0, mx, my, 0, 0, mx, my);
FreeBitmap(Pic);
SetTargetDC(OldDC);
end;

It will enable SMART's debugging and it also handles canvas clearing. :)
Just modify it to suite your needs.