Results 1 to 23 of 23

Thread: Hit Predictor!

  1. #1
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default Hit Predictor!



    SCAR Code:
    program HitPredictor;

    Const
      CombatLevel = 99;//Your combat level(Only matters in pvp)
      PvpMode = True;//Pvp? True=Yes, False=No
      TextX = 400;//X coordinate for hit text
      TextY = 360;//Y coordinate for hit text
      PaintTime = 2000;//How long to display hit [milliseconds]


    var
      XpChars: Integer;
      XP1, XP2, Hit, TimeMark: Integer;
      a: Extended;
      CA: TCanvas;
      PA, PB: TPointArray;
     
    procedure PaintText(S: String);
    var
      Imag, W, H: Integer;
      C1: TCanvas;
    begin
      Imag := CreateBitmapFromText(S, BigChars, 255);
      GetBitmapSize(Imag, W, H);
      C1 := GetBitmapCanvas(Imag);
      CopyCanvas(C1, CA, 0, 0, W, H, TextX, TextY, TextX+W, TextY+H);
      FreeBitmap(Imag);
    end;


    function XpAmouth: Integer;
    var
      X: Integer;
      P: TPointArray;
    begin
      FindColors(P, 16777215, 460, 58, 505, 66);
      X := GetTPABounds(P).X1;
      Result := StrToInt(GetNumbers(GetTextAtEx(X, 57, 0, XpChars, False, False, 0, 0, 16777215, 10, True, tr_Digits)));
    end;
     
     
    begin
      ClearDebug;
      CA := GetClientCanvas;
      XpChars := LoadChars2(AppPath + 'Fonts\XpChars\');
      WriteLn('Chars Loaded');
      if not PvpMode then a := 0.133*4
      else
      case CombatLevel of
        3..19: a := 0.133*4;
        20..39: a := 0.136*4;
        40..59:  a := 0.140*4;
        60..79:  a := 0.143*4;
        80..99:  a := 0.146*4;
        100..119: a := 0.150*4;
        120..138: a := 0.153*4;
      end;
      WriteLn('We hit '+FloatToStr(1/a)+' * Gained xp');
      repeat
        repeat
          FindColors(PA, 16777215, 470, 60, 509, 65);
        until(Length(PA) > 5);
        XP1 := XPAmouth;
        repeat
          FindColors(PB, 16777215, 470, 60, 509, 65);
          if GetSystemTime - TimeMark < PaintTime then PaintText(IntToStr(Hit));
          Wait(20);
          if (Length(PA) > 0) and (Length(PB) > 0) then
            if (not TPAInTPA(PA, PB)) then Break;
        until(False);
        TimeMark := GetSystemTime;
        XP2 := XPAmouth;
        Hit := Round((XP2-XP1)/a);
        if (XP1 > 0) and (XP2 > 0) then WriteLn('We hit: '+IntToStr(Hit));
          PaintText(IntToStr(Hit));
      until(false);
    end.

    You also have to download the attachment and extract it to your Fonts folder in scar
    Last edited by weequ; 05-10-2010 at 09:28 PM.

  2. #2
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    you didnt block out your name in the second picture
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  3. #3
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    you didnt block out your name in the second picture
    Didn't I? If you mean that urho then I'm not him :P

  4. #4
    Join Date
    Nov 2006
    Location
    Location, Location
    Posts
    1,126
    Mentioned
    6 Post(s)
    Quoted
    41 Post(s)

    Default

    Nice

  5. #5
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Does it works or is it just random?
    edit:
    nvm, does it gives any advantage?
    ~Hermen

  6. #6
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by Hermen View Post
    Does it works or is it just random?
    edit:
    nvm, does it gives any advantage?
    Yes it could be usefull for pking.

  7. #7
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    it would be better if you could know how much damage would be hit on you
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  8. #8
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    How could knowing what your going to hit after its to late to stop the hit help?
    Last edited by MylesMadness; 05-10-2010 at 10:22 PM.

  9. #9
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    because it would give an aproximate of what the next hit is, so you can eat before he actually hits
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  10. #10
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    He was saying what YOUR going to hit. Not what your going to get hit.
    I do visit every 2-6 months

  11. #11
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by ZaSz View Post
    He was saying what YOUR going to hit. Not what your going to get hit.
    oh. just for fun then i guess

    its still pretty neat
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  12. #12
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Actually, you might have been right. His phrasing is really weird.
    I do visit every 2-6 months

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

    Default

    You guys, it's a script that predicts what YOU are going to hit based on the XP counter on runescape. Use it for whatever you want! In fact, it may be useless, but who cares, it's cool, and it works!

  14. #14
    Join Date
    Mar 2010
    Location
    New Hampshire, U.S.A
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i remembeer either kbot or rsbot has this. lol. nice. not only for pking but boss killing too ^.^
    Sell botted goods at mid to high prices!!! Else we lose our profit AND ruin the game!!!!

  15. #15
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    You guys, it's a script that predicts what YOU are going to hit based on the XP counter on runescape. Use it for whatever you want! In fact, it may be useless, but who cares, it's cool, and it works!
    we all know that, i was just stating that it would be epic if you can predict the oponents hit
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  16. #16
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Predicting what you hit is helpful to pkers because then if they get a good hit with their normal weapon, they can switch really fast to their spec weapon for the k0. In theory at least.

  17. #17
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    Predicting what you hit is helpful to pkers because then if they get a good hit with their normal weapon, they can switch really fast to their spec weapon for the k0. In theory at least.
    Yes

  18. #18
    Join Date
    Aug 2007
    Location
    Where do you live?
    Posts
    934
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Love it! I remember back in the day if you looked at your str exp in the skill tab (or w/e skill you were training) it would show the exp before the hit and I always wanted to make this script for pking lol.. guess I forgot about it lol.. Great job though, got me a few kills already

  19. #19
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Thanks for feedback (:

  20. #20
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Where does it paint the hits? (I am at school so I can't really try it out).
    Oh Hai Dar

  21. #21
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    ^ It shows on the picture.

  22. #22
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    When someone hits you, you also get hitpoints right? couldn't you calculate what the opponent hits by this exp difference?
    ~Hermen

  23. #23
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    No, you don't get experience for being hurt.

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
  •