GeKirAh
Banned User
!changepass "newpasshere
Exclusive to OTLand/OTLua
This Script will let players change there password in-game!
You must get permission to post this at other OpenTibia Forums.
PHP Code:
PHP Code:
Nothing Special. Just its not been done before Credits to Nitro and Colandus
Exclusive to OTLand/OTLua
This Script will let players change there password in-game!
You must get permission to post this at other OpenTibia Forums.
PHP Code:
Code:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return TRUE
end
dofile("./config.lua")
local env = assert(luasql.mysql())
local con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
local cur = assert(con:execute("UPDATE accounts AS a INNER JOIN players AS p ON p.id="..getPlayerGUID(cid).." SET a.password="..param..";"))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "KEEP NOTE! Your new password is : "..param.." ")
end
cur:close()
con:close()
env:close()
end
Code:
<talkaction words="!changepass" script="password.lua"/>
Last edited by a moderator: