Diley007 1 Postado Junho 9, 2012 Share Postado Junho 9, 2012 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 Link para o comentário https://xtibia.com/forum/topic/187632-acrescentar-umas-coisas-no-report-aqui/ Compartilhar em outros sites More sharing options...
0 Oneshot 732 Postado Junho 9, 2012 Share Postado Junho 9, 2012 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. Link para o comentário https://xtibia.com/forum/topic/187632-acrescentar-umas-coisas-no-report-aqui/#findComment-1274640 Compartilhar em outros sites More sharing options...
0 Diley007 1 Postado Junho 9, 2012 Autor Share Postado Junho 9, 2012 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. quase perfeito mais o delaytime n ta funfando, to conseguindo reportar toda hora Link para o comentário https://xtibia.com/forum/topic/187632-acrescentar-umas-coisas-no-report-aqui/#findComment-1274660 Compartilhar em outros sites More sharing options...
0 Oneshot 732 Postado Junho 9, 2012 Share Postado Junho 9, 2012 (editado) Certo, então isso é erro da biblioteca exhaustion do seu servidor. Vou fazer uma pequena "gambiarra". 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 = getPlayerStorageValue(cid, storage) if exhaust < os.time() then setPlayerStorageValue(cid, storage, os.time()+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 " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to report.") end return TRUE end Editado Junho 9, 2012 por Oneshot Link para o comentário https://xtibia.com/forum/topic/187632-acrescentar-umas-coisas-no-report-aqui/#findComment-1274662 Compartilhar em outros sites More sharing options...
0 Diley007 1 Postado Junho 9, 2012 Autor Share Postado Junho 9, 2012 Certo, então isso é erro da biblioteca exhaustion do seu servidor. Vou fazer uma pequena "gambiarra". 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 = getPlayerStorageValue(cid, storage) if exhaust < os.time() then setPlayerStorageValue(cid, storage, os.time()+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 " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to report.") end return TRUE end aee veio agora deu, po to te devendo 2 REP ja xD Link para o comentário https://xtibia.com/forum/topic/187632-acrescentar-umas-coisas-no-report-aqui/#findComment-1274781 Compartilhar em outros sites More sharing options...
0 Critical 70 Postado Junho 9, 2012 Share Postado Junho 9, 2012 Dúvida sanada; tópico movido. Atenciosamente, Critical. Link para o comentário https://xtibia.com/forum/topic/187632-acrescentar-umas-coisas-no-report-aqui/#findComment-1274790 Compartilhar em outros sites More sharing options...
Pergunta
Diley007 1
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
Link para o comentário
https://xtibia.com/forum/topic/187632-acrescentar-umas-coisas-no-report-aqui/Compartilhar em outros sites
5 respostass a esta questão
Posts Recomendados