Results 1 to 9 of 9

Thread: GetXPBarTotal

  1. #1
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default GetXPBarTotal

    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

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    u gotta use narcle's fonts

    http://villavu.com/forum/showthread....ht=narcle+font

    And well I use this.. it works.
    Simba Code:
    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
    Last edited by Wizzup?; 01-18-2012 at 09:25 PM.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Hm... working fine for me.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  5. #5
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    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.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  6. #6
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  7. #7
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    And you rebooted your Simba after adding those fonts?

    It works fine for me..


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  8. #8
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

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

    ^ that one... he had a redirect... had Wizzy remove it
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  9. #9
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    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
    Code:
    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
    Last edited by Shuttleu; 01-19-2012 at 12:01 AM.

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
  •