View Full Version : How you insert report in the client screen?
tom99
07-02-2010, 04:41 PM
Is there a way to use drawbitmap to show reports of the macro session directly into the client screen ? and display certain pictures directly into the client screen (without using a form) ? if so how do i do this?
Zyt3x
07-02-2010, 05:20 PM
If you're using SMART then yes, easily done :)
If not, I would say OpenGL Interception would be the best choice (Not developed for scar yet), as you can tell OpenGL to paint directly on the screen without much CPU Power drain, but with SCAR it would flicker a lot and drain all your CPU
tom99
07-02-2010, 09:03 PM
I was thinking how its done without smart, and i think for script compability it woud be bether if it could display images in the client window, and not needing to stop scar to see report logg, if it just display with text in the client how many loads/rounds xp gained etc, and im also wondering of if you could display pictures, like displaying a picture of what picture the script is searching for at that point, or if it takes a picture of the bank screen each time the bot is inserting to bank then display it zoomed out, is it a way to do this without implementing another language ?
MylesMadness
07-02-2010, 09:43 PM
You need smart or a plugin that can use opengl or directx, no other ways
Frement
07-02-2010, 09:56 PM
Basicly what I think you need is the window of the clients surface, hwnd, and then use it to draw on it, I'm not sure if it requires anything else to enable drawing, but yeah, thats my flow of thinking. Maybe the guy who designed that OpenGL "Reflection" if you will, can help out? I mean, the whole thread was moved to SRL Members only, I was very interested in that stuff, but now I'll just have to wait. Whats going with that project anyway?
TRiLeZ
07-02-2010, 10:00 PM
Whats going with that project anyway?
Nothing. The silent wolf guy hasn't really been active.
Frement
07-02-2010, 10:02 PM
Nothing. The silent wolf guy hasn't really been active.
Did he post any sources to that project?
TRiLeZ
07-02-2010, 10:21 PM
Did he post any sources to that project?
He did post the source, but the source he posted didn't even compiled so he removed it quickly. I don't know if anyone downloaded it though.
Frement
07-02-2010, 10:22 PM
God damnit, I want that source :P
Zyt3x
07-02-2010, 10:40 PM
Finding tutorials on OpenGL and D3D Hooking isn't hard though :P
Google "OpenGL Interception" or "D3D Hooking" and you'll find a couple 100 tuts
Frement
07-02-2010, 10:41 PM
Still, I would love to see that source, as it is done for RuneScape.
tom99
07-02-2010, 10:46 PM
A freind of me had a scar script witch did this long ago it was chopping willows in draynor village and displayed loads/xp directly on the client screen.
You sure openGL can do this? it read/display images on screen ?
Zyt3x
07-02-2010, 10:48 PM
tom99; Yeah, it isn't hard to do, but the runescape client updates 30 times per second, and you have to paint on top of that client, and be synced with runescape's updating
Also; It looks like silentwolf logs on now and then...
Last Activity: 06-22-2010 10:32 AM
Wizzup?
07-02-2010, 10:49 PM
You can paint directly to the canvas but it is very CPU intensive as you have to repaint every time RS repaints their client. Which is about... 60 times per sec. (I guess)
tom99
07-02-2010, 10:51 PM
Do you know of a way to display the canvas directly on the screen wizzup ? even tough its cpu draining i would like to know how, but also opengl if this is to recommand.
Zyt3x
07-02-2010, 10:52 PM
60 fps? naaa... I'm not sure... if it's OpenGL then maybe, but if it is in software mode then I guess it's lower
tom99
07-02-2010, 11:06 PM
If its 60fps via scar that woud work just perfectly if its only showing text i woud asume, but how large is opengl then? if its over 1gb i woud rather do it trough scar (if possible).
Wizzup?
07-02-2010, 11:08 PM
Do you know of a way to display the canvas directly on the screen wizzup ? even tough its cpu draining i would like to know how, but also opengl if this is to recommand.
Get the client canvas, paint on it. Perhaps you'll have to play with DC's but I don't think you have to.
Narcle
07-02-2010, 11:11 PM
Its less cpu intensive to just paint on SMARTs debug canvas as I don't think it needs to refresh as often?
tom99
07-02-2010, 11:14 PM
Get the client canvas, paint on it. Perhaps you'll have to play with DC's but I don't think you have to.
I gotta make clear i never tryed openGL befor so that tells me nothing.
But i will look into it if it does screen drawing efficiently, but for now i woud like to know how i could do it trough scar please.
LoadDebugBitmap('Fonts\BigChars\37.bmp'); <- I tought this command was supose to display a picture in the debug window but i see nothing.
Nvm it works, however its a bit clumsy to use debug window, can you also draw directly to the client screen ?
Zyt3x
07-03-2010, 12:33 AM
If its 60fps via scar that woud work just perfectly if its only showing text i woud asume, but how large is opengl then? if its over 1gb i woud rather do it trough scar (if possible).I think you already have OpenGL ;)
Search for opengl.dll in /System32/
tom99
07-03-2010, 12:43 AM
I think you already have OpenGL ;)
Search for opengl.dll in /System32/
Have you used it in scripts befor ? if so could i see an example
MylesMadness
07-03-2010, 01:09 AM
Basically what everyone is trying to tell you is that unless you use smart or already knew how to use opengl your not going to effectively write on the client
Wizzup?
07-03-2010, 08:34 AM
I also think that anyone who told you to use OpenGL has no idea how to do it with opengl.
tom99
07-03-2010, 12:02 PM
Have you used it in scripts befor ? if so could i see an example
There is a file named opengl32.dll, that means i got it ? opengl looks complicated.
but is it possible to write a source to do the following
Clientscreen [ Drawinupperrightcorner: 1,2,3,4,5,6 ] with transparent window so you can see everything whats going on in the client screen but its just display report with letters into it? possible ?
woud it also be possible to do it without blocking scar from color searching on the client at the position the openGl texture is ?(If not thats not a problem, woud not need to use such large area of client screen anyway).
The word is script =p
1. Fonts\BigChars\83.bmp
2. Fonts\BigChars\67.bmp
3. Fonts\BigChars\82.bmp
4. Fonts\BigChars\73.bmp
5. Fonts\BigChars\80.bmp
6. Fonts\BigChars\116.bmp
Its easy to take a screenshot with scar so if somone could tell me just to insert it with opengl please :)
you need to use Outline Fonts ?
Can scar interact with OpenGl and send variables and text or can OpenGl read files ?
Like i sad earlier, ive not used opengl befor.
Wizzup?
07-03-2010, 12:32 PM
Don't even bother with the OpenGL drawing. It's not worth the time and effort. What I said about Canvas+DC is not OpenGL. SCAR can do it.
tom99
07-03-2010, 12:47 PM
Don't even bother with the OpenGL drawing. It's not worth the time and effort. What I said about Canvas+DC is not OpenGL. SCAR can do it.
Awsome could you show me an example of a script to, display "This is a text" in client window ? or is loading the text straight from a file just as good ?
What i mean is you only need LoadDebugBitmap or is there a bether way to display report ?
MylesMadness
07-03-2010, 02:21 PM
program new;
{.include srl/srl.scar}
Procedure WriteToClient(What:String);
var
height:Integer;
TPA: TPointArray;
begin
TPA := LoadTextTPA(what, 0, height);
DrawTPACanvas(TPA, clWhite, GetClientCanvas);
end;
begin
while True do WriteToClient('text');
end. Only works in scar, which is silly point 1. And you can't run the script at the same time as writing text, which is sillier point 2.
tom99
07-03-2010, 09:31 PM
That script didnt work for me at all, got this error message:
Scar 3.25:
Unable to register function ???????????????›?????????›?????????›???????›????; in script
Scar 3.23:
It open sandwich lady script
Scar 3.21:
[Runtime Error] : Exception: Access violation at address 0077960C in module 'scar.exe'. Read of address 000001D0
Sabzi
07-03-2010, 09:40 PM
Works for me. I don't know which scar(using simba lately).
Make sure you select runescape with the cross-hair and then use ActivateClient too.
MylesMadness
07-04-2010, 12:25 AM
3.25 isn't useable yet, 3.23 is what I made it with, so I'm sure it works...
Cazax
07-04-2010, 02:48 AM
program New;
{.include SRL/SRL.scar}
Var
Bmp : Integer;
Procedure DebugTime;
var
Canvas : TCanvas;
W, H : Integer;
Begin
bmp := BitmapFromString(0, 0, '');
Canvas := GetClientCanvas;
Bmp := CreateBitmapMaskFromText('Time running: ' + TimeRunning, UpChars);
FastReplaceColor(Bmp, ClBlack, 10799322);
GetBitmapSize(Bmp, W, H);
SafeCopyCanvas(GetBitmapCanvas(Bmp), Canvas, 0, 0, W, H, 205, 387, 205 + W, 387 + H);
FreeBitmap(Bmp);
SetTimeout(1, 'DebugTime');
End;
begin
ActivateClient;
SetupSRL;
Wait(500);
DebugTime;
Repeat
MMouse(Random(500), Random(500), Random(100), Random(100));
Wait(500 + Random(500));
Until False;
end.
http://i248.photobucket.com/albums/gg164/cazax/picc.jpg
That's some old code by me, I think it still works with SCAR.
MylesMadness
07-04-2010, 02:55 AM
Besides the whole setTimeout that crashes scar thing...
tom99
07-04-2010, 12:00 PM
It still dont work, it only open sandwich lady script, even if i delete it tell me sandwich lady script dont exist failed to compile.
It is however what im after tough, you use srl v4 #42 scar 3.23 ?
Zyt3x
07-04-2010, 12:20 PM
It still dont work, it only open sandwich lady script, even if i delete it tell me sandwich lady script dont exist failed to compile.
It is however what im after tough, you use srl v4 #42 scar 3.23 ?User srl-opendev
tom99
07-04-2010, 12:34 PM
User srl-opendev
Where can i find that ?
Is it Revision 562 srl ?
Now it worked with 3.21 after i runned compile srl again with opendev but 3.23 still give same error.
Zyt3x
07-04-2010, 12:44 PM
Where can i find that ?
Is it Revision 562 srl ?http://villavu.com/repositories/srl-opendev/
Yes :)
tom99
07-04-2010, 01:35 PM
Still dont work with 3.23 i deleted & downloaded srl again and now it start showing errors of prison pete on compile srl.
Reinstalled 3.23 and now compile srl shows error in math.scar :S
Zytex you made it work with 3.23 or older ?
Zyt3x
07-04-2010, 03:15 PM
Still dont work with 3.23 i deleted & downloaded srl again and now it start showing errors of prison pete on compile srl.
Reinstalled 3.23 and now compile srl shows error in math.scar :S
Zytex you made it work with 3.23 or older ?Yes, It worked just fine for me, but because of the use of SetTimeout, scar crashed after 14 secounds
i luffs yeww
07-04-2010, 06:54 PM
tom99, you have to move your plugins with SCAR 3.23 and srl-opendev. Also, you should try Simba. ;)
tom99
07-04-2010, 10:18 PM
I did move the folder called " Move this folder to plugins" into the plugin folder, and i have tryed simba but i reckon its compatible with bitmapmask and disguise and some other commands so ive not started using it yet, im looking forward for it to be done tough.
Narcle
07-05-2010, 12:18 AM
I did move the folder called " Move this folder to plugins" into the plugin folder, and i have tryed simba but i reckon its compatible with bitmapmask and disguise and some other commands so ive not started using it yet, im looking forward for it to be done tough.
You don't move the folder you move all the files inside that folder into Plugins folder.
tom99
07-05-2010, 03:37 PM
You don't move the folder you move all the files inside that folder into Plugins folder.
Did, that script still dont work with scar 3.23 i keep getting this error message
Line 270: [Error] (15408:1): Invalid number of parameters in script C:\Programfiles\Scar 3.23\includes\SRL\SRL\Core\AntiRandoms\Sandwich.sc ar
:(
Shuttleu
07-05-2010, 03:44 PM
with the sandwich.scar problem
just add ",2" then save
~shut
tom99
07-06-2010, 07:05 AM
with the sandwich.scar problem
just add ",2" then save
~shut
It didnt work :(
Is there a srl free way to do the same thing ?
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.