mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-15 10:44:54 +02:00
A few Lua scripts updates, converted Lua scripts to RevScriptSys (#431)
- changed folder name from LUA to Lua - Added installation instructions - fixed playerdeath variables (fixes #430) - Added outfit IDs up to Jouster outfit to the sync outfit script - Removed unecessary instruction - Added revscriptsys version of all scripts
This commit is contained in:
21
Lua/TFS_10/revscriptsys/report_talkaction.lua
Normal file
21
Lua/TFS_10/revscriptsys/report_talkaction.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local talkaction = TalkAction("!report")
|
||||
|
||||
function talkaction.onSay(player)
|
||||
local storage = 6708 -- You can change the storage if its already in use
|
||||
local delaytime = 30 -- Exhaust In Seconds.
|
||||
if param == '' then
|
||||
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Command param required.")
|
||||
return true
|
||||
end
|
||||
if player:getStorageValue(storage) <= os.time() then
|
||||
player:sendTextMessage(MESSAGE_INFO_DESCR, "Your report has been received successfully!")
|
||||
db.query("INSERT INTO `znote_player_reports` (`id` ,`name` ,`posx` ,`posy` ,`posz` ,`report_description` ,`date`)VALUES (NULL , " .. db.escapeString(player:getName()) .. ", '" .. player:getPosition().x .. "', '" .. player:getPosition().y .. "', '" .. player:getPosition().z .. "', " .. db.escapeString(param) .. ", '" .. os.time() .. "')")
|
||||
player:setStorageValue(storage, os.time() + delaytime)
|
||||
else
|
||||
player:sendTextMessage(MESSAGE_STATUS_WARNING, "You have to wait " .. player:getStorageValue(storage) - os.time() .. " seconds to report again.")
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
talkaction:separator(" ")
|
||||
talkaction:register()
|
Reference in New Issue
Block a user