function onSay(cid, words, param, channel)
local desbug = 10
local cdesbug = 10
local color = COLOR_ELECTRIC
local magic = 1
if hasCondition(cid, CONDITION_INFIGHT) then
return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Desculpe,voce esta em batalha.")
if exhaustion.get(cid, desbug) and exhaustion.get(cid, desbug) > 0 then
local tempo = tonumber(exhaustion.get(cid, desbug)) or 0
doPlayerSendCancel(cid, "Voce precisa esperar "..getStringmytempo(tempo).." para desbugar de novo!.")
return true
end
pos = getTownTemplePosition(getPlayerTown(cid))
pos = {x = 1020, y = 917, z = 7}
end
doTeleportThing(cid, pos, false)
doSendAnimatedText(getThingPos(cid), "DESBUGADO!", color)
doSendMagicEffect(getThingPos(cid), magic)
exhaustion.set(cid, desbug, cdesbug)
setPlayerStorageValue(cid, 31040, -1)
setPlayerStorageValue(cid, 181643, -1)
setPlayerStorageValue(cid, 17769, -1)
setPlayerStorageValue(cid, 89050, -1)
return true
end
esqueci do end
function onSay(cid, words, param, channel)
local desbug = 10
local cdesbug = 10
local color = COLOR_ELECTRIC
local magic = 1
if hasCondition(cid, CONDITION_INFIGHT) then
return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Desculpe,voce esta em batalha.")
end
if exhaustion.get(cid, desbug) and exhaustion.get(cid, desbug) > 0 then
local tempo = tonumber(exhaustion.get(cid, desbug)) or 0
doPlayerSendCancel(cid, "Voce precisa esperar "..getStringmytempo(tempo).." para desbugar de novo!.")
return true
end
pos = getTownTemplePosition(getPlayerTown(cid))
pos = {x = 1020, y = 917, z = 7}
end
doTeleportThing(cid, pos, false)
doSendAnimatedText(getThingPos(cid), "DESBUGADO!", color)
doSendMagicEffect(getThingPos(cid), magic)
exhaustion.set(cid, desbug, cdesbug)
setPlayerStorageValue(cid, 31040, -1)
setPlayerStorageValue(cid, 181643, -1)
setPlayerStorageValue(cid, 17769, -1)
setPlayerStorageValue(cid, 89050, -1)
return true
end