Results 1 to 7 of 7

Thread: Help/Ideas on PaintonSmart?

  1. #1
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help/Ideas on PaintonSmart?

    Okay, currently it flashes like crazy. All i want is it to be near 100% always bieng updated with it not flashing white? How do i do this. Here are my methods.

    The PaintOnSmart:
    Simba Code:
    procedure SMART_DrawBitmapWithTextMulti(Clear: Boolean; Bitmap: Integer; BmpPlacement: TPoint; TP: TStringArray; Shadow: Boolean; TxtPlacement: TPoint; Font: string; Colour: TColor);
    var
      I, B, H, Pic, TPH, Numb: Integer;
      Offset: TPoint;
      TTP: TPointArray;
      Canvas: TCanvas;
    begin

      if (not SMART_DebugSetup) then
        SMART_SetupDebug();


      TPH := High(TP);

      Offset := IntToPoint(TxtPlacement.x - BmpPlacement.x, TxtPlacement.y - BmpPlacement.y);

      Pic := CopyBitmap(Bitmap);

      for I := 0 to TPH do
      begin

        TTP := LoadTextTPA(TP[i], SmallChars, H);

        for B := 0 to High(TTP) do
        begin

          Numb := ((I + 1) * 13);

          if Shadow then
            try

              FastSetPixel(Pic, TTP[b].x + 1 + Offset.x , TTP[b].y + Numb + 1 + Offset.y,131072);
            except
            end;

          try

            FastSetPixel(Pic, TTP[b].x + Offset.x, TTP[b].y + Numb + Offset.y, Colour);
          except
          end;
        end;
      end;

      Canvas := TCANVAS.Create;
      Canvas.Handle := SmartGetDebugDC;
      DrawBitmap(Pic, Canvas, BmpPlacement.x, BmpPlacement.y);
      FreeBitmap(Pic);
    end;

    Here is the Actualy Paining on the client.
    Simba Code:
    Procedure DoThePainting;
      begin
      XPhour;
      LoadBMP;
      SMART_DrawBitmap(False, BMP, Point(0, 337));
      SMART_DrawText(130, 395, UpCharsEx, '' +IntToStr(Kills)+  '', clRed);
      SMART_DrawText(130, 420, UpCharsEx, '' +IntToStr(Exp)+ '', clRed);
      SMART_DrawText(130, 445, UpCharsEx, ''+IntToStr(XPH)+'', clRed);
      SMART_DrawText(325, 395, UpCharsEx,''+TimeRunning+' ', clRed);
      SMART_DrawText(440, 420, UpCharsEx, ''+IntToStr(Charms)+'', clRed);
      FreeBitmap(BMP);
     end;
    And if its some simple little thing please dont hate i just got back from a long trip and cant think straight atm! :/


    Edit: NVM Figured it out, i was calling a different way to paint on smart in my NPC finding so that was a big issue! :P
    Last edited by laakerules; 02-05-2012 at 09:53 PM. Reason: Figured it out on my own.

  2. #2
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just curious, why would you want it to be always updated? AFAIK SMART draw is resource demanding.

  3. #3
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Always updated so that the stats are constantly correct.

  4. #4
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think it's not worth the effort as it will be a resource hog. I know paintsmart proggies look lovely, but close to realtime update seems unnecessary to me. You won't be (and probably shouldn't be) staring your bot all the time looking at the stats report.

    I used paintsmart back then but now I just tend to think that console output is just as good.

  5. #5
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    I've got live painted porgies on two of my scripts, haven't checked but I don't think it's too resource demanding and especially if you're just running one?

    I had euphemism create a blend of text/bitmap paintsmart functions for me and use them to create some pretty snazzy live painted progs:
    Example:
    http://www.youtube.com/watch?v=bSdcF_ToiyQ

    On phone now I'll paste the code later, you could also PM and ask him about it too.

  6. #6
    Join Date
    Dec 2011
    Posts
    1,162
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ya YoHo, i see what you did on that script. The only issue im at is that the text sort of flashes/scrolls to the rite everytime it updates. What you did is you had the DoThePainting;
    Or whatever you called it to be done at every possible thing done correct?

  7. #7
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I agree one that instance is fine But as you get more, things will start to slow down...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •