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?
2010-11-16 13:38:10
2010-11-16 13:55:38
2010-11-16 14:21:32
2010-11-16 14:25:31
From: g0tp0t
i already searched and they use getsmart canvas and gettargetdc which arent in simba.
2010-11-16 14:36:12
2010-11-16 15:03:24
2010-11-16 15:14:29
2010-11-16 15:37:54
From: Wizzup?
srl-…aintsmart.scar That made me laugh out loud. :p
2010-11-16 15:57:48
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.2010-11-16 16:29:15
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 :(
2010-11-16 20:04:58
2010-11-16 20:26:10
From: mormonman
You have to "Enable Debug" on SMART.
2010-11-16 20:38:27
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?
2010-11-16 20:44:56
2010-11-16 20:47:05
From: g0tp0t
ty =]
2010-11-17 07:25:12
2010-11-17 09:36:59
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
2010-11-17 14:56:02
2010-11-17 19:42:00
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;