LucasFerraz
Systems Analyst
After a request made by me, Bogart helped me here: http://otland.net/f132/talkaction-bug-report-147010/#post1414381
Credits to him, not to me.
How it works
When player report a bug it will be saved in "data/logs/bugs.txt". 120 seconds(2min) of delay added to prevent spammers.
in talkactions.xml add
create .lua file and rename to "bugreport.lua".
How to use
Example
Credits to him, not to me.
How it works
When player report a bug it will be saved in "data/logs/bugs.txt". 120 seconds(2min) of delay added to prevent spammers.
in talkactions.xml add
XML:
<talkaction words="!bugreport;/bugreport" event="script" value="bugreport.lua"/>
create .lua file and rename to "bugreport.lua".
Lua:
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
How to use
Code:
!bugreport, [I][COLOR="#FF0000"]your comment[/COLOR][/I]
Example
Code:
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].
----------------------------------------------------------
Last edited: