SRL Archive - SRL Bugs

GetXPBarTotal


Shuttleu

2012-01-18 05:48:08

GetXPBarTotal returns the wrong value

on my bar i have 3034633 but GetXPBarTotal is printing out 33633
then
on my bar i have 3035298 but GetXPBarTotal is printing out 33633
then
on my bar i have 3035631 but GetXPBarTotal is printing out 335631


~shut

Brandon

2012-01-18 06:37:41

u gotta use narcle's fonts

http://villavu.com/forum/showthread.php?t=72528&highlight=narcle+font

And well I use this.. it works.

Function GetXPBarTotal: Integer;
var
TPA: TPointArray;
B: TBox;
begin
FindColorsTolerance(TPA, 14474460, 418, 6, 489, 25, 1);
B := GetTPABounds(TPA);
B := IntToBox(B.X1, B.Y1, B.X2, B.Y2);
Result := StrToIntDef(ExtractFromStr(GetTextAtExWrap(B.X1, B.Y1, B.X2, B.Y2, 0, 5, 4, 14474460, 0, 'XPChars'), Numbers), 0);
end;

Other functions: http://villavu.com/forum/showthread.php?t=72563

Shuttleu

2012-01-18 07:25:09

neither of those helped

and printing out 's' from the srl function it seems to be incorrectly detecting the numbers

+333 XP 20,947
Simba detects it as
[]33[]P3P,33

~shut

Flight

2012-01-18 07:40:40

Hm… working fine for me.

Narcle

2012-01-18 16:10:00

I added x and p to XPChars font on my thread and the fix is in SRL already, as long as you have updated fonts.

Shuttleu

2012-01-18 16:18:09

i downloaded the fonts from ggzz's post

~shut

Harry

2012-01-18 16:21:12

And you rebooted your Simba after adding those fonts?

It works fine for me..

Narcle

2012-01-18 16:27:16

http://villavu.com/forum/showthread.php?t=72528

^ that one… he had a redirect… had Wizzy remove it

Shuttleu

2012-01-18 18:56:48

ah, i didnt restart Simba. but it mostly seems to detect them all correctly now with the exception of the 'X' which in cmd seems to be a "music note" and the first 3 "+333" seems to be a 1

also because of the 'X' problem i had to change it to P := Pos('P', S);

but apart from the 'X' problem, it seems to work

here is a CMD log
formWriteln: 90
formWriteln: P88♫P67,497 // Started the script, should return 67497
formWriteln: 8867497 // But returns this
formWriteln: Could not find Inferno Adze in hand
formWriteln: Found Dragon Hatchet in hand
formWriteln: P88♫P67,497 // As you can see the X is a music note
formWriteln: 8867497
formWriteln: P88♫P67,497
formWriteln: 8867497
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: chopping vines
formWriteln: finding vines
formWriteln: 3761999
formWriteln: 17
formWriteln: FoundVines
formWriteln: finished finding vines
formWriteln: finished chopping vines
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
The automatically split characters are too wide. Try decreasing minspacing
formWriteln: 67,497
formWriteln: 67497
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 67,497 // This is correct
formWriteln: 67497
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 67,497
formWriteln: 67497
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 67,497
formWriteln: 67497
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 67,497
formWriteln: 67497
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 67,497
formWriteln: 67497
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 132♫P67,830 // Got more exp, should be 332 but shows up as 132
formWriteln: 67830
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 132♫P67,830
formWriteln: 67830
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 132♫P67,830
formWriteln: 67830
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 67,830
formWriteln: 67830
formWriteln: Looking for a birds nest
formWriteln:
formWriteln: Finished looking for a birds nest
formWriteln: Starting random check
formWriteln: Finished random check
formWriteln: 67,830
formWriteln: 67830
formWriteln: Exception in Script: Unknown procedure
formWriteln: The following DTMs were not freed: [2, 3, 4, 5, 6, 7, 8, 9, 10]
formWriteln: The following bitmaps were not freed: [49]

anyway, because it messes up at the start, it throws the exp counter way off

~shut

just realized the link narcle posted is different, trying those now