PS
talkaction

Reportar Bugs

Por PsyMcKenzie, 24 de mar. de 2013 em Actions e Talkactions

script
7
1.3k
PsyMcKenzieP
24 de março de 2013 às 04:46

E ai galera, suave?

Achei esse script aqui e resolvi postar.

Vamos la!

 

Em talkactions.xml adicione:

 

<talkaction words="!bugreport;/bugreport" event="script" value="bugreport.lua"/>

 

Em talkactions/scripts crie um arquivo com o nome de bugreport.lua e adicione:

 

function onSay(cid, words, param, channel)
local storage = 6707
local delaytime = 120
local a = "data/logs/bugs.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

 

Como usar:

 

!bugreport, seu comentário

 

Exemplo:

 

 

Druid reported a bug at 21 December 2011 - 20:24:42
There is a bug in Carlin Wall. [x=32360, y=31782, z=7].

----------------------------------------------------------
Sorcerer reported a bug at 21 December 2011 - 20:28:01
Help me i cant move. [x=11457, y=45789, z=5].

----------------------------------------------------------

 

Créditos: Bogart

Editado Março 24 por PsyMcKenzie

1 mês depois...
gabyzinho1G
21 de abril de 2013 às 13:42

onde vamos reçeber essas menssagens se tivermos offline??

1 mês depois...
MaryGirl13M
20 de maio de 2013 às 04:49

onde vamos reçeber essas menssagens se tivermos offline??

Também fiquei com essa duvida.

PsyMcKenzieP
20 de maio de 2013 às 06:47

Teste e não haverá mais dúvidas :)

MaryGirl13M
20 de maio de 2013 às 23:42

Teste e não haverá mais dúvidas :)

Ok, estarei testando...

LooadingL
20 de maio de 2013 às 23:48

nem você mesmo testou não soube tirar a duvida :S kk

PsyMcKenzieP
21 de maio de 2013 às 12:05

nem você mesmo testou não soube tirar a duvida :S kk

 

Se o script fosse meu, eu tiraria.