Cstrike
2010-12-04 18:52:04
RefPaint.simba
Located in the core but is NOT included when you run reflection
You must define it yourself
You must define it yourself
You need to define PaintSmart first and then the include. Try this:
{$DEFINE SMART}
{$i srl\srl.scar}
{$i srl\srl\misc\paintsmart.scar}
{$i reflection\reflection.simba}
{$i reflection\core\RefPaint.simba}
So what can you do with it?
Well we want to eventually be stand alone instead of going always over to RSBot to keep getting interface data and stuff like that. Unfortunately we are stuck with getting absolutes from them for the time being, but we will be working on a way around that.
So what is new here that you can try?
I ran this:
program new;
{$DEFINE SMART}
{$i srl\srl.scar}
{$i srl\srl\misc\paintsmart.scar}
{$i reflection\reflection.simba}
{$i reflection\core\RefPaint.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Active := True;
Nick := '';
Pin := '';
end;
end;
procedure SetupScript;
begin
Smart_Server := 121;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
ActivateClient;
SetupSRL;
SetupReflection;
DeclarePlayers;
LoginPlayer;
Wait (410+random(770));
end;
begin
SetupScript;
EnableSmartCanvas;
R_DrawTile(GetMyPos, True, clRed);
R_DebugNPCs(False);
R_DebugObjects(0, false, clBlue);
R_DebugObjects(1, false, 57645);
R_DebugObjects(2, false, clWhite);
R_DebugObjects(3, false, clYellow);
end.
And got this:

Note that for the colors, you can set them to a pre-defined constant, or your own color that you pick. If you're unsure, just use clRed.
Not too bad. Please note that you can't get the yellow interface debugging around your items yet, that will come soon. This was not included in the core because it is not essential for any scripts to run. The stuff in here is mainly for your debugging. Note there are some new functions in RefPaint.simba that I have not included here, like drawing a trapezoid.
Enjoy.
Special thanks to Bad Boy JH for the code and idea.
NOTE: Takes a while to process the data so some NPC's who move may not be on the same tile, but you should be able to work around this since it is after all debugging points that you want.
In the future I may play with the code to increase the speed.