shadowrecon Posted June 17, 2012 Share Posted June 17, 2012 Im trying to make a function to read the HP of my character. Ive ran a bunch of test with different fonts and i cant manage to get the complete text. With LoginChars and XPChars I can get the center number but it wont return the first or last. This is the function i was using to test the fonts [scar] program New; {$DEFINE RS2} {$DEFINE SMART} {$I GMRL/GMRL.scar} Procedure FontTester(X,Y, TextColor, TextLength, Tol, MinS, MaxS: Integer); Begin Writeln('OptionChars: '+Trim(GetTextAtEx(X, Y, Tol, OptionChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); Writeln('ScreenChars: '+Trim(GetTextAtEx(X, Y, Tol, ScreenChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); Writeln(' NPCChars: '+Trim(GetTextAtEx(X, Y, Tol, NPCChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); Writeln(' UpChars: '+Trim(GetTextAtEx(X, Y, Tol, UpChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); Writeln(' SmallChars: '+Trim(GetTextAtEx(X, Y, Tol, SmallChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); Writeln(' StatChars: '+Trim(GetTextAtEx(X, Y, Tol, StatChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); Writeln('FriendChars: '+Trim(GetTextAtEx(X, Y, Tol, FriendChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); Writeln(' LoginChars: '+Trim(GetTextAtEx(X, Y, Tol, LoginChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); Writeln(' XPChars: '+Trim(GetTextAtEx(X, Y, Tol, XPChars, false, false, MinS, MaxS, TextColor, TextLength, True, tr_AllChars))); end; begin SetupGMRL; FontTester(700, 28, 65280, 70, 0, 0, 2); end. [/scar] Output: // HP = 680 OptionChars: ScreenChars: NPCChars: UpChars: SmallChars: StatChars: FriendChars: LoginChars: 8 XPChars: 8 Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted June 17, 2012 Share Posted June 17, 2012 Have you looked at OSI's GetMMLevel(Skill_HP)? Seems to read it fine. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 17, 2012 Author Share Posted June 17, 2012 Have you looked at OSI's GetMMLevel(Skill_HP)? Seems to read it fine. No didnt know that function existed. <_< What file is it in? I checked gametabs. Plus i was trying to figure out the ocr system with scar. Havent really ever tried to locate text. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted June 17, 2012 Share Posted June 17, 2012 GetMMLevel is in GameTabs.scar. Even if you still wanted to do your own it might give you a starting point. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted June 17, 2012 Author Share Posted June 17, 2012 GetMMLevel is in GameTabs.scar. Even if you still wanted to do your own it might give you a starting point. Guess i overlooked it. Thanks Bixby. Quote Link to comment Share on other sites More sharing options...