function onSay(cid, words, param, channel)
local storage = 6707
local delaytime = 120
local item = {itemid = 2160, count = 1}
local a = "data/logs/reports.txt"
local f = io.open(a, "a+")
if(param == '') then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
end
if not doPlayerRemoveItem(cid, item.itemid, item.count) then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need ".. item.count .." ".. getItemNameById(item.itemid) ..".")
end
local exhaust = exhaustion.get(cid, storage)
if(not exhaust) then
exhaustion.set(cid, storage, delaytime)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your report has been received successfully!")
f:write(""..param.." [x="..getPlayerPosition(cid).x..", y="..getPlayerPosition(cid).y..", z="..getPlayerPosition(cid).z.."].\n\n----------------------------------------------------------\n")
f:close()
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait " .. exhaustion.get(cid, storage) .. " seconds to report.")
end
return TRUE
end
Abraços.





info
Grupo: Artesão
Registrado: 17/01/12
Posts: 137
Reputação: -1
Char no Tibia: Nao Tenho
queria que quando o player reportace aparecece so o report dele
exemplo de como aparece:
Diley reported a bug at 03 June 2012 - 19:05:09.
bug na casa.
mais queria so o report assim:
bug na casa.
outra coisa queria que removesse um determinado item quando reportace
e arrumar o delaytime que nao ta funfando, ta 120 segundos mas o player ta reportando toda hora que quer
ta aqui o script do report, REP+ amanha pra quem ajudar
function onSay(cid, words, param, channel)
local storage = 6707
local delaytime = 120
local a = "data/logs/reports.txt"
local f = io.open(a, "a+")
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
local exhaust = exhaustion.get(cid, storage)
if(not exhaust) then
exhaustion.set(cid, storage, delaytime)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your report has been received successfully!")
f:write(""..getPlayerName(cid).." reported a bug at " .. os.date("%d %B %Y - %X.", os.time()) .."\n"..param.." [x=..getPlayerPosition(cid).x..", y="..getPlayerPosition(cid).y..", z="..getPlayerPosition(cid).z..].\n\n----------------------------------------------------------\n")
f:close()
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait " .. exhaustion.get(cid, storage) .. " seconds to report.")
end
return TRUE
end