Mesmeroo
§
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
can somebody explain what it exactly does?
Thanks in advance.
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: