Boa garoto, continue assim
- Forums
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Status System
info
Group: Infante
Joined: 04/03/11
Posts: 1.6k
Reputation: +393
Tibia Character: No Have

Umas melhorias
.
local exhausted = 10
function onSay(cid, words, param)
if param ~= "" and getPlayerStorageValue(cid, 11450) > os.time() then
doPlayerSendTextMessage(cid, 20, "Você deve aguardar "..getPlayerStorageValue(cid, 11450) - os.time().." segundos para mudar seus Status.") return true end
if param == "clean" then
setPlayerStorageValue(cid, 11449, -1) return true end
if param == "" then
str = "-- \\ Atualização de status // --"
for _, pid in ipairs(getPlayersOnline()) do
if getPlayerStorageValue(pid, 11449) == tonumber(-1) then return true end
str = str..""..getCreatureName(pid)..": "..getPlayerStorageValue(pid, 11449).."\n"
end
doShowTextDialog(cid, 1397, str)
return true
end
setPlayerStorageValue(cid, 11449, param)
setPlayerStorageValue(cid, 11450, os.time() + exhausted)
doPlayerSendTextMessage(cid, 20, "Você atualizou o seu Status para: {"..param.."}.")
return true
end
Edited Maio 19 by caotic
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

Muito legal caotic, fica bem massa com DialogBox, obrigado ^^
info
Group: Visconde
Joined: 27/01/13
Posts: 443
Reputation: +83
Gender: Masculino

Sem clichê algum, seu desenvolvimento é monstruoso, parabéns, um ótimo trabalho, mas um né?! rs, Parabéns cara.
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

Isso é uma bela notícia Scyte, muito obrigado pelos elogios ![]()
info
Group: Herói
Joined: 25/10/12
Posts: 2.4k
Reputation: +687
Gender: Masculino
Tibia Character: Nuncative

Parabéns Roksas, sempre inovando e trazendo conteúdo novo!
Te admiro garoto! ![]()





info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino
Status System
Como em grandes fórums ou no Facebook, nós podemos mudar nossos Status. Que tal ter isso no nosso próprio Server? Que tal poder interagir com todos por meio de um simples comando? Sem precisar configurar nada no código.
Instalação
Vá em data/talkactions/scripts, crie um arquivo chamado status.lua ou copie algum arquivo da pasta e cole, renomeie para status e coloque isso dentro:
local exhausted = 10 function onSay(cid, words, param) if param ~= "" and getPlayerStorageValue(cid, 11450) > os.time() then doPlayerSendTextMessage(cid, 20, "Você deve aguardar "..getPlayerStorageValue(cid, 11450) - os.time().." segundos para mudar seus Status.") return true end if #param > 200 then doPlayerSendTextMessage(cid, 20, "Você deve digitar um status com no máximo 200 caractéres.") return true end if param == "clean" then setPlayerStorageValue(cid, 11449, -1) return true end if param == "" then doPlayerSendTextMessage(cid, 20, "Este comando requer um status.") doPlayerSendTextMessage(cid, 20, "-- \\ Atualização de status // --") for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, 11449) == tonumber(-1) then return true end doPlayerSendTextMessage(cid, 20, ""..getCreatureName(pid)..": "..getPlayerStorageValue(pid, 11449).."") end return true end setPlayerStorageValue(cid, 11449, param) setPlayerStorageValue(cid, 11450, os.time() + exhausted) doPlayerSendTextMessage(cid, 20, "Você atualizou o seu Status para: {"..param.."}.") return true endAbra o talkactions.xml com algum editor de texto e cole essa tag:
Nesta parte do código:
Você configura um exhausted, ou seja, a cada quantos segundos pode mudar seu Status.
Demonstração
Edited Maio 19 by Roksas