kito2
www.masteria.net
Hey all,
On my OT an idea has came to our minds and is to let NPC Banks understand money "strings", like 1kk, 8kk, etc.
We have developed this function:
Now the idea would be to integrate this function to all strings messages related to NPC Banks.
Right now I am in a middle of lot of work, so I am not able to continue more than this right now. So I am creating this post, cause it can be an idea which more people would like to work on, integrate and finish it.
Thanks in advice if you want to help with it
On my OT an idea has came to our minds and is to let NPC Banks understand money "strings", like 1kk, 8kk, etc.
We have developed this function:
LUA:
function testMoney(str)
if (tonumber( str)) then
return tonumber(str)
end
local number = string.match(str, '^%d+')
if (number) then
local ks = string.match(str, '[k]+')
if (ks and ks:len() > 0) then
local exp = 1000 ^ ks:len()
return number * exp
end
end
return 0
end
Now the idea would be to integrate this function to all strings messages related to NPC Banks.
Right now I am in a middle of lot of work, so I am not able to continue more than this right now. So I am creating this post, cause it can be an idea which more people would like to work on, integrate and finish it.
Thanks in advice if you want to help with it