psychosisneamia
~Beginner~
- Joined
- Jun 7, 2012
- Messages
- 162
- Reaction score
- 7
Add to engine/function/general.phpError i get is [12-Mar-2014 20:59:40 America/Chicago] PHP Fatal error: Call to undefined function getClock() in /home/frostot/public_html/admin_reports.php on line 141 (Sorry for the double post it wouldn't let me edit my last post.
function getClock($time = false, $format = false, $adjust = true) {
if ($time === false) $time = time();
// Date string representation
$date = "d F Y (H:i)"; // 15 July 2013 (13:50)
if ($adjust) $adjust = (1 * 3600); // Adjust to fit your timezone.
else $adjust = 0;
if ($format) return date($date, $time+$adjust);
else return $time+$adjust;
}
Maybe bugs that are on "Fixed" can be available in a public list? Thus players can see bugfixes, but not bugs that are not fixed yet so they cant be exploited?
Or make an option to toggle reports as public?
Znote i updated the script, so you can set it up for Znote Acc. Have a look: http://otland.net/threads/gesior-acc-report-bug-system-2-updated.211871/Originally coded by @Dark ShaoOz for Gesior AAC, I converted it to Znote AAC and improved it.
Should work with TFS 0.2 and 1.0, Znote AAC 1.4 and 1.5+
In-game talkaction
The list:
You can copy the /pos command and paste it in tibia client to teleport to location if you are GM.
Editing a list entry, OPTIONAL: Give them points for their help
Easily add and modify status types to fit your OT
Installation:
SQL:
Code:CREATE TABLE IF NOT EXISTS `znote_player_reports` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) NOT NULL, `posx` int(6) NOT NULL, `posy` int(6) NOT NULL, `posz` int(6) NOT NULL, `report_description` VARCHAR(255) NOT NULL, `date` INT(11) NOT NULL, `status` TINYINT(3) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
PHP:
Create file admin_reports.php in www(Znote AAC files) directory
with this code:
https://raw.github.com/Znote/ZnoteAAC/master/admin_reports.php
Link to it from Admin Panel:
Add this to layout/widgets/Wadmin.php:
LUA talkactionCode:<li> <a href='admin_reports.php'>Admin Reports</a> </li>
talkactions.xml:
Code:<talkaction words="!report" separator=" " script="adminreport.lua"/>
Lua:-- Coded by Dark ShaoOz function onSay(cid, words, param, channel) local storage = 6708 -- (You can change the storage if its already in use) local delaytime = 30 -- (Exhaust In Seconds.) local x = getPlayerPosition(cid).x -- (Do not edit this.) local y = getPlayerPosition(cid).y -- (Do not edit this.) local z = getPlayerPosition(cid).z -- (Do not edit this.) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command param required.") return true end if (getPlayerStorageValue(cid, storage) <= os.time()) then doPlayerSendTextMessage(cid, 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 , '" .. getPlayerName(cid) .. "', '" .. x .. "', '" .. y .. "', '" .. z .. "', " .. db.escapeString(param) .. ", '" .. os.time() .. "')") setPlayerStorageValue(cid,storage,os.time()+delaytime) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have to wait "..getPlayerStorageValue(cid, storage) - os.time().." seconds to report again.") end return TRUE end
Znote AAC 1.4 only (if you use 1.5+ ignore this step):
Add to engine/function/general.php
Enjoy.Code:function getClock($time = false, $format = false, $adjust = true) { if ($time === false) $time = time(); // Date string representation $date = "d F Y (H:i)"; // 15 July 2013 (13:50) if ($adjust) $adjust = (1 * 3600); // Adjust to fit your timezone. else $adjust = 0; if ($format) return date($date, $time+$adjust); else return $time+$adjust; }
-- Coded by Dark ShaoOz
function onSay(player, words, param)
local storage = 67081 -- (You can change the storage if its already in use)
local delaytime = 30 -- (Exhaust In Seconds.)
local x = player:getPosition().x -- (Do not edit this.)
local y = player:getPosition().y -- (Do not edit this.)
local z = player:getPosition().z -- (Do not edit this.)
if (param == '') then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Command param required.")
return false
end
if player:getStorageValue(storage) <= os.time() then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your report has been received successfully!")
db.query("INSERT INTO `znote_player_reports` (`id` ,`name` ,`posx` ,`posy` ,`posz` ,`report_description` ,`date`)VALUES (NULL , '" .. player:getName() .. "', '" .. x .. "', '" .. y .. "', '" .. z .. "', " .. db.escapeString(param) .. ", '" .. os.time() .. "')")
player:setStorageValue(storage,os.time()+delaytime)
else
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have to wait ".. player:getStorageValue(storage) - os.time().." seconds to report again.")
end
return false
end