Thread Rating:
  • 30 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Module] Info - 1.2 - (Gil/Hr) & (XP/Hr)
#6
Tried my hand at making a gil/hr add on just to get better at lua coding but I'll leave it here til yours gets fixed. :)

Might want to have a look at my string format function, I think its pretty handy to spit out formatted numbers (1234->1,234) for whenever you get this project going.

PHP Code:
function formatStr(myStr)
    
local a1,a2,a3
    local b1
,b2,b3
    local c1
    local neg
=0

    
if (tonumber(myStr)<0then
        neg
=1
        myStr
=string.sub(myStr,2)
    
end

    
if (string.len(myStr)==4then
        a1
=string.sub (myStr1,1)
        
b1=string.sub (myStr2)
        
myStra1..","..b1
    
elseif (string.len(myStr)==5then
        a1
=string.sub (myStr1,2)
        
b1=string.sub (myStr3)
        
myStr=a1..","..b1
    
elseif (string.len(myStr)==6then
        a1
=string.sub (myStr1,3)
        
b1=string.sub (myStr4)
        
myStr=a1..","..b1
    
elseif (string.len(myStr)==7then
        a1
=string.sub (myStr1,1)
        
b1=string.sub (myStr2,4)
        
c1=string.sub (myStr5)
        
myStr=a1..","..b1..","..c1    
    
elseif (string.len(myStr)==8then
        a1
=string.sub (myStr1,2)
        
b1=string.sub (myStr3,5)
        
c1=string.sub (myStr6)
        
myStr=a1..","..b1..","..c1    
    end
    
    
if (neg==1then
        myStr
="-"..myStr
    end
    
    
return myStr

end 

edit: I dont intend on ever updating this or maintaining it, was just for shits and gigs

<removed>
Reply
 


Messages In This Thread
[Module] Info - 1.2 - (Gil/Hr) & (XP/Hr) - by Ace - 04-01-2014, 09:08 PM
RE: [Module] Info - (Gil/XP per Hour) - by Ace - 04-02-2014, 02:19 AM
RE: [Module] Info - (Gil/XP per Hour) - by arktikk - 04-03-2014, 10:27 PM
RE: [Module] Info - (Gil/XP per Hour) - by dirin - 04-03-2014, 10:56 PM
RE: [Module] Info - (Gil/XP per Hour) - by Ace - 04-04-2014, 01:41 PM
RE: [Module] Info - 1.1 - (Gil/Hr) - by Cichard - 09-03-2014, 03:18 PM
RE: [Module] Info - 1.1 - (Gil/Hr) - by Ace - 09-13-2014, 05:58 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products