can you draw with scar?

Discussion in 'Scar/Simba Help' started by BillSnow, Apr 2, 2009.

can you draw with scar?
  1. Unread #1 - Apr 2, 2009 at 12:35 PM
  2. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    is it possible to have scar draw a fake layer over a game window....

    can you make it draw a line from a designated point to (or even through) another point.... overlaid on top of the window?...

    an example for the use of this would be for a pool game that doesn't draw the path built in... you could make it draw a line extending out from the queue ball through the cursor.... or visa versa depending on the game.... you get the point

    is it possible?...

    clearly it would have to display it on some kinda fake window above the game screen... and be able to be clicked through... so that could complicate things...
     
  3. Unread #2 - Apr 2, 2009 at 10:31 PM
  4. Hey321
    Joined:
    Jul 30, 2007
    Posts:
    503
    Referrals:
    0
    Sythe Gold:
    0

    Hey321 Forum Addict

    can you draw with scar?

    Yes, SCAR can draw on most things (even on the game client!), the only downside is, as soon as the screen changes, it disappears..

    ~Sandstorm
     
  5. Unread #3 - Apr 3, 2009 at 12:07 AM
  6. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    what functions do the drawing?...

    i searched a number of things in the F1 list of functions and nothing really seemed to match....

    i can figure out how to use them and bend them to my will... i just need to know what they are first :p....

    edit: anyone have like an example script i can look at and see how the stuff is related... being fairly new to this i'm guessing it's going to involve a lot of stuff i haven't seen yet... looking forward to the fun of the challenge :p

    strangely addictive... just finished my first script... a 3000 line bot LOL.... and it works flawlessly...
     
  7. Unread #4 - Apr 5, 2009 at 3:40 AM
  8. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    so i found this thread http://freddy1990.com/forums/index.php?topic=2659.0 on how to make your own game with scar....

    that goes into a bit about drawing and the like... but it seems purely focused around the debug image window...

    how would you make it display on top of the targeted game window...

    do you resize the debug and move it on top and somehow make it a transparent background and let you click through it?... or is there some kind of command to use the targeted client instead of the debug image window?...
     
  9. Unread #5 - Apr 5, 2009 at 12:03 PM
  10. Hey321
    Joined:
    Jul 30, 2007
    Posts:
    503
    Referrals:
    0
    Sythe Gold:
    0

    Hey321 Forum Addict

    can you draw with scar?

    Code:
        FindColorsTolerance(T, 16777215, 544, 485, w - 1, h - 1, 150);
        ClientBMP := BitmapFromString(w - 544, h - 485, '');
        CopyClientToBitmap(ClientBMP, 544, 485, w, h);
        For I := 0 To High(T) Do
          FastSetPixel(ClientBMP, T[I].x - 544, T[I].y - 485, 0);
        Repeat
          SafeDrawBitmap(ClientBMP, GetClientCanvas, 544, 485);
        Until(IsFkeyDown(9))
        FreeBitmap(ClientBMP);
    That's basically how you would do it, but of course you would need to do some changing based on what you want it to do.

    ~Sandstorm
     
  11. Unread #6 - Apr 19, 2009 at 8:44 PM
  12. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    wow thanks a ton... this will help a lot... sorry for the late response... moved... lol...
     
  13. Unread #7 - Apr 26, 2009 at 2:44 PM
  14. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    ok... i've got MOST of it working... but when it comes to drawing the line from point a to cursor, i'm hitting a bit of a wall...

    i am able to make it put up a picture and resize it so that it KIND of works... but it doesn't really make a solid line after the pic has been deformed enough...

    so i need to figure out a way to make a tpoint array that i could set pixel along...

    but i have no clue how to make a toint array in a line other than vertical horizontal or diagonal......

    anyone have any tips?
     
  15. Unread #8 - Apr 28, 2009 at 2:29 AM
  16. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    nvm... just going with slope :p
     
  17. Unread #9 - Apr 29, 2009 at 12:29 AM
  18. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    ok... so i have the script working... it shows the lines properly

    HOWEVER... it blinks... a LOT...

    i know the underlying cause... it's the fact that i'm needing to overlay a BITMAP over the game screen

    bitmaps don't have transparencies....

    the settransparentcolor won't make the overall bitmap transparent... and when you overlay it on the screen it's a black box (or whatever color you tell it it is)... but never transparent...

    so far the way around it that hey321 pointed out is to change the bitmap's base file to copy the portion of the client screen... it WORKS.... just not well

    with a game window that changes a lot it's almost fighitng with the game on what is displayed and ends up spamming a picture from a second back or so...

    is there any way to just draw dirrectly on the client canvas?... or have a transparent canvas even?...

    the changepixel stuff (at least the documented ones) change the pixels on bitmaps only... so when i try to copy a canvas over onto the client i have to first rip a bitmap off onto the canvas which then just adds in the background....

    if anyone is following my nonsense?... please help...

    i know that scar is used almost exclusively for runescape but it has lots of potential elsewhere that i'm trying to make use of...
     
  19. Unread #10 - Apr 29, 2009 at 3:48 AM
  20. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    i've found another slight workaround...

    where i had been drawing with setpixel then pasting the bitmap ontop...
    i've now just made a pixel sized bitmap and pasted it all over the game screen... lol...

    it works... better than the other options...

    but it's still not what i'm looking for... blinks alot...

    i really would like a way to draw on an otherwise transparent picture... so i can let it sit with full lines up and not have to recalculate every run and thus maintain a solid line...
     
  21. Unread #11 - Apr 29, 2009 at 4:42 AM
  22. BillSnow
    Joined:
    Mar 27, 2009
    Posts:
    12
    Referrals:
    0
    Sythe Gold:
    0

    BillSnow Newcomer

    can you draw with scar?

    wow...

    ok i'm re-writing my script entirely...

    three lines that completely do what i want and make me want to /wrist for the wasted time making my own line drawing functions...

    getclientcanvas.Pen.Color := clRed;
    getclientcanvas.MoveTo(331, 275);
    getclientcanvas.LineTo(703, 823)

    that example will draw a red line on the screen from 331,275 to 703,823
     
< can you reference a table database? | Scar Error Help Please >

Users viewing this thread
1 guest


 
 
Adblock breaks this site