----edit---
arrumei uma parte ali que estava faltando..
ta ai
aqui ele irá checar se ele tiver a storage
if isPlayer(cid) == TRUE and getPlayerStorageValue(cid, 100) == 0 then setPlayerStorageValue(cid, 100, 1)
ai acho que fica assim:
local time = 5 -- 1 = 1 sec, 2 = 2 sec, ...
local say_events = {}
local function SayText(cid)
if isPlayer(cid) == TRUE then
if say_events[getPlayerGUID(cid)] ~= nil then
if isPlayer(cid) == TRUE then
doSendAnimatedText(getPlayerPosition(cid),"<~King~>", math.random(01,255))
doSendMagicEffect(getCreaturePosition(cid), math.random(28, 30))
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)
end
end
return TRUE
end
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
if param == "on" then
if isPlayer(cid) == TRUE and getPlayerStorageValue(cid, 100) == 0 then
doSendAnimatedText(getPlayerPosition(cid),"<~King~>", math.random(01,255))
setPlayerStorageValue(cid, 100, 1)
end
say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You active now the command.")
elseif param == "off" then
stopEvent(say_events[getPlayerGUID(cid)])
say_events[getPlayerGUID(cid)] = nil
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You disable the Command.")
end
return TRUE
end









info
Grupo: Artesão
Registrado: 24/06/07
Posts: 104
Reputação: +3
Char no Tibia: Tavas
Olá pessoal,
eu encontrei um scripit aqui no pc e achei engraçado elaborar ele mas fiquei perdido porque ainda sou noobinho nos scripits ... eu acho que a resolução deste é bem facil!
O Objectivo é:
O player executar o commando !style on mas so se tive o STORAGEID == 100(EXMEPLO)
Scripit
local time = 5 -- 1 = 1 sec, 2 = 2 sec, ... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"<~King~>", math.random(01,255)) doSendMagicEffect(getCreaturePosition(cid), math.random(28, 30)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if param == "on" then if isPlayer(cid) == TRUE and getPlayerStorageValue(cid) == 100 then doSendAnimatedText(getPlayerPosition(cid),"<~King~>", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You active now the command.") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"You disable the Command.") end return TRUE endEspero a vossa ajuda... eu acho que a resolução é bem facil xD mas eu sou noobinho ainda hehehe
Flw
Editado Abril 9 por tavax