• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Znote AAC] Report bug system

@Znote Okay that fixed the problem with the console but now on the website it doesnt show the description box at all. It shows who reported it, the pos but the box breaks and has no description.
 
Error 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.
 
Error 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.
Add to engine/function/general.php
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;
}
 
ZNote, this system has been so useful. I started doing private testing for my server yesterday and some 40+ bugs were reported, and it's just been a blessing with the way you coded it already into /pos, this way I can copy and paste and check out the bug first hand if it doesn't seem to be a bug on the map editor. You rock, and it was so nice to speak with you on Nelvara the other day. Keep up the great work, really :)
 
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?

I like the idea, ima start to work for it. Ill post again for that great idea. If you haven't dont it yet.
 
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
4pt6w9.png
9zvfph.png


The list:
nQOMAL.png

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
7I6VyD.png


ea1lQR.png


Easily add and modify status types to fit your OT
1QFu3S.png


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:
Code:
           <li>
                <a href='admin_reports.php'>Admin Reports</a>
            </li>
LUA talkaction
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
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;
}
Enjoy.
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/
 
have possible to use it with ctrl+z report? can someone help me with that?
 
Awesome system.
If somebody needs here is the same script written on metatable: (not using compat.lua)
Code:
-- 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
 
[11/01/2015 16:14:24] data/talkactions/scripts/adminreport.lua:eek:nSay
[11/01/2015 16:14:24] Description:
[11/01/2015 16:14:24] data/talkactions/scripts/adminreport.lua:14: attempt to call field 'query' (a nil value)
[11/01/2015 16:14:24] stack traceback:
[11/01/2015 16:14:24] data/talkactions/scripts/adminreport.lua:14: in function <data/talkactions/scripts/adminreport.lua:2>

It does say you reported succesfully but the report doesn't appear on the website and server is giving this error >.<
Using TFS 0.3.6 and Znote 1.5

Anyone any idea?
 
Hey guys i just want to make a char with GM in the name, where can i make the site allow it? Thx!
 
Create a character with another name, go to phpmyadmin and change it's name there to whatever you please.
 
This is not working for me. Im using tfs 0.2.15. Please help. Did everything the correct way, but the !report talkaction is not doing anything in game.
 
Back
Top