Language:
Lua     Change language:
Pastebin: 102296
Author: Taroven
Subject: Ara Broker XP
Created: 2008-11-20 13:32:16
Download and save
Toggle line numbers
1local function FormatXP( value ) 
2    local p = floor( value/maxXP*1000 +.5 ) * .1 
3    local sep = ' '        -- Turn this to empty parentheses or nil to remove spaces, or change to period/comma/whatever for a custom decimal separator 
4    if( value >= 1000000 )then return format( "%i%s%.3i%s%.3i [%.2i.%.0f%%]", floor(value*0.000001), sep, floor((value%1000000)*0.001), sep, value%1000, p, p*10%10
5    elseif( value >= 1000 )then return format( "%i%s%.3i [%.2i.%.0f%%]", floor(value*0.001), sep, value%1000, p, p*10%10
6    else return format( "%i [%.2i.%.0f%%]", value, p, p*10%10 ) end 
7end 
Thread:
[102296] Ara Broker XP by Taroven at 2008-11-20 13:32:16
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject:


    Tabstop:     bigger biggest
Note: You can prefix a line with "@@@" to highlight it.