• 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!

Solved Question about this lua script.

Joined
Sep 24, 2012
Messages
605
Reaction score
33
Location
Netherlands
Hello guys,

I have downloaded a datapack lately and i wanna check for some nice area's bla bla bla you get the point, but when i login i get the message "you will be disconnected and you need to enter your account number and password again"
so ok, no problem (kinda annoying but ok) but when i logged back in, i saw that my name was edited. first it was CM Lunera and now its [v] CM Lunera
so my question is, what does this script do, and what does [v] in the name mean?

Here is the part that makes the name adjustment in login.lua

Lua:
    local id,nm,qry = getPlayerAccountId(cid),string.find (getCreatureName(cid), "(%[+)%v*(%]+)%s*"),""
    if isPremium(cid) and nm == nil then
        qry = "UPDATE `tibiawar`.`players` SET `name` = '[v] "..getCreatureName(cid).."' WHERE `players`.`account_id`= "..id..";"
    elseif (not isPremium(cid)) and nm ~= nil then
        local nnome = string.gsub(getCreatureName(cid), "(%[+)%v*(%]+)%s*", "")
        qry = "UPDATE `tibiawar`.`players` SET `name` = '"..nnome.."' WHERE `players`.`account_id`= "..id..";"
    end
    if qry ~= "" then
        db.executeQuery(qry)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You will be disconnected and will be required to put the login and password again.")
        addEvent(doRemoveThing,3000,cid)
        return true
    end

can somebody explain what it exactly does?
Thanks in advance.
 
Last edited:
It's like something to check if you are premium
Idk what it does, if I was you and it caused any problems for me I'd just remove it.
 
Ye its easy to delete it, but if i knew what it did, maybe it was useful in some way. i knew it was checking for premium, but i like to know what it does exactly.
I only know that i have free premium enabled and he still logs me out and puts [v] infront of the name.
if somebody knows what it does, i would love to hear it.
 
This script adds a "[V]" in front of the player name if the player is premium.
The reason you have to relog is because the script edits the database and you can't change the name while the player is online.

If the player has the check in front of his name and isn't premium anymore, the check will be removed.

I would remove this script though, since you have free premium enabled. (or you can use it for VIP or someting).
 
Back
Top