Dynamite
2009-10-24 13:22:01
Yeh, well do we have paint like RSBot?
It is such a cool little feature.
If not.. Why not?
T~M
It is such a cool little feature.
If not.. Why not?
T~M
2009-10-24 13:22:01
2009-10-24 13:23:06
2009-10-24 13:25:26
2009-10-24 13:41:59
From: ZaSzTrue - but if you want to use it on Jagex' client then it would have to paint every 20ms or so (depends on how much you want it to debug) and that would cause huge lag spikes
Does not have to be on smart.
2009-10-24 13:51:43
From: Zyt3x
True - but if you want to use it on Jagex' client then it would have to paint every 20ms or so (depends on how much you want it to debug) and that would cause huge lag spikes
2009-10-24 15:23:36
From: caused
If you just want to draw the status report, you could draw that outside the runescape window on the black background of the browser-window.
~caused
2009-10-24 15:29:11
From: Zyt3x
True - but if you want to use it on Jagex' client then it would have to paint every 20ms or so (depends on how much you want it to debug) and that would cause huge lag spikes
2009-10-24 15:50:09
From: TRiLeZI already said that :P
You can draw on the SMART debug canvas so you wouldn't have to paint every couple of ms.
I don't know about drawing above the real RuneScape client.
2009-10-24 16:00:22
From: Zyt3x
I already said that :P
And painting on the black area is clever.. :D Only stupid thing is that you would have to make it black again if you would like to paint something new :s
2009-10-25 03:32:29
From: mormonmanYes, that's what I said; You would have to make it black again (aka turn the non-black into black) ;)
Not the whole thing, just the part you are updating.
2009-10-25 08:07:01
Program canvas;
Var
bmp, x, i, buffer: Integer;
r: TRect;
Test: TCanvas;
Begin
Buffer := BitmapFromString(333, 300, '');
FastDrawClear(buffer, 0);
DisplayDebugImgWindow(333, 300);
SafeDrawBitmap(Buffer, getdebugcanvas, 0, 0);
Test := GetDebugCanvas;
Test.Font.Name := 'Arial';
Test.Font.Size := 14;
Test.Font.Color := clWhite;
Test.Font.Style := [];
Test.Brush.Style := bsClear;
Test.TextOut(40, 10, 'Rogeruk''s Al-Kharid Smelter');
x := 1;
Repeat
Test.TextOut(40, 50, IntToStr(GetTimeRunning));
Inc(X);
wait(500);
Test.Pen.Color := clWhite;
Test.Rectangle(40, 50, 100, 200);
R.Left := 40;
R.Top := 50;
R.Right := 100;
R.Bottom := 200;
Test.Brush.Color := clBlack;
Test.Brush.Style := bsSolid;
Test.FillRect(R);
Until (x > 20);
End.2009-10-25 10:56:38
2009-10-25 13:26:15
Function GetPaintBitmap(Color, sX, sY: Integer; Text: TStringArray; Dist: Integer): Integer;
Var
TPA: TPointArray;
H, Q, B, Bmp, blk: Integer;
Begin
Bmp := BitmapFromString(200, 100, ''); // Don't bitch about additional var.
blk := BitmapFromString(200, 100, '');
FastDrawClear(bmp, 65536);
For B := 0 To High(Text) Do
Begin
TPA := LoadTextTPA(Text[b], SmallChars, H);
For Q := 0 To High(TPA) Do
FastSetPixel(Bmp, TPA[q].x, TPA[q].y + B * Dist, Color);
End;
Result := Bmp;
End;
Procedure ClearSMARTCanvas;
Var
BMP: Integer;
SMARTCanvas, Canvas: TCanvas;
Begin
BMP := BitmapFromString(765, 503, '')
SMARTCanvas := GetBitmapCanvas(BMP);
Canvas := GetBitmapCanvas(BMP);
SMARTCanvas.handle := SmartGetDebugDC;
CopyCanvas(Canvas, SMARTCanvas, 0, 0, 765, 503, -1000, -1000, 1000, 1000);
FreeBitmap(BMP);
End;
Procedure ProgressReportCanvas(X, Y: Integer);
Var
SCanvas, Canvas: TCanvas;
BMP, Sec: Integer;
Text: TStringArray;
S, M, H: Integer;
Begin
Sec := GetTimeRunning Div 1000 + 1;
ClearSMARTCanvas;
BMP := BitmapFromString(765, 503, '');
SCanvas := GetBitmapCanvas(BMP);
SCanvas.handle := SmartGetDebugDC;
ConvertTime(GetTimeRunning, H, M, S);
Text := [
'EXP Gained : ' + IntToStr(GetMySkill(TSnum, False) - sXP),
'EXP To Lvl : ' + IntToStr(R_XpTillNextLevel(TSnum)),
'Time Ran : ' + IntToStr(H) + 'h '+ IntToStr(M) + 'm '+ IntToStr(S)];
Canvas := GetBitmapCanvas(GetPaintBitmap(65280, 764, 502, Text, 25));
CopyCanvas(Canvas, SCanvas, 0, 0, 764, 502, X, Y, X + 764, Y + 502);
FreeBitmap(BMP);
End;