• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

check this :o

Colandus

Advanced OT User
Senator
Joined
Jun 6, 2007
Messages
2,434
Solutions
19
Reaction score
219
Location
Sweden
I've shorten few of your functions (haven't seen the others, since i haven't downloaded TFS yet loool)

PHP:
function getArticle(str)
	return str:find("[AaEeIiOoUu]") == 1 and "an" or "a"
end

PHP:
function isNumber(str)  
    return tonumber(str) ~= nil and TRUE or FALSE 
end

Your isNumber function frightened me :eek:


And here's a function you might want to add too :p
PHP:
function isInArea(pos, fromPos, toPos)
    -- by Colandus
    if pos.x >= fromPos.x and pos.x <= toPos.x then
        if pos.y >= fromPos.y and pos.y <= toPos.y then
            if pos.z >= fromPos.z and pos.z <= toPos.z then
                return true
            end
        end
    end
    return false
end
 
Last edited:
Isn't Y a vocal anymore now? :p

Nice functions :)

Make the getArticle get the words like an hour right too?
 
No, but I do know in Sweden it is and probably in Norway too ^.-

So because of Sweden my lastname contains 7 vowels and 1 consonant :p My wierd lastname is "Yahyaoui" :D :D


However, it should be that way ^.^


And about "hour", well I don't THINK it's possible, because you do say "an hour" just because you don't spell the "h", so it's like saying "an our"... Which means I'd need a table of all exceptions ^.-

But in real english ALL "h" is vowels...
 
Last edited:
Btw, sorry for bump, but otherwise nobody would see this hehe... Who makes the lua scripts for TFS? Such as the isNumber?
 
Last edited:
Back
Top