• 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!

Avesta 7.4 - Bug Report + Rule Violation Report

222222

Intermediate OT User
Joined
Jul 3, 2007
Messages
207
Reaction score
144
Hi!

I am working on an Avesta 7.4 server but I noticed that a tutor (Access 2) can access both Ctrl+Z (bug report) and Ctrl+Y (rule violation report).
I want to make it so that a tutor can only access Ctrl+Z (bug report).

Furthermore, for access level 3 (I have named it Counsellor, which is old name for Senior Tutor), I want them to be able to only namelock players.
I can fix this part by adding an if on the "player->accessLevel() >= 3" or I will just do a cancel; player->sendCancel("You can not report a player for that reason");

But I would prefer if the Counsellor could only SEE the namelock options. No ban/notation/etc.

Only accesslevel 4+ (Gamemaster, on my server) should be able to ban people for all sorts of reasons.

So, I need:
1. I need to disable Ctrl+Y for tutors, only allow Ctrl+Z
2. Is there a way to hide certain ban reasons for players that are not Counsellors/Senior Tutors


Again, I have managed to do this AFTER the user has opened the report window.
I can easily block it via code to not accept any reports for a specific accesslevel.
But I want it so that when a player with access level 0, 1 or 2 presses Ctrl+Y, nothing will happen!
No message, no error, no pop up window. Just like in real tibia.


For Ctrl+Y (rule violation window):
file: game.cpp
bool Game::violationWindow(uint32_t playerId, std::string name, uint8_t reason, std::string comment, uint8_t action, bool IPBanishment)

I added this at the top:

Code:
Player* player = getPlayerByID(playerId);
    if(player->getAccessLevel() < 3) {
        player->sendCancel("You are a noob.");
        return false;
    }

This will cancel their report. But I dont even want them to be able to SEE the report window.


Here is what rights each player should have, and here are also my groups I have named them:

Groups:
  1. Player (Access: 0)
  2. Premium Player (Access: 1)
  3. Tutor (Access: 2) Should only be able to do Bug Report (Ctrl+Z)
  4. Counsellor (Access: 3) Should be able to do Bug Report (Ctrl+Z) and Namelock reports (Ctrl+Y)
  5. Gamemaster (Access: 4) Should be able to do Bug Report (Ctrl+Z) and any report (Ctrl+Y)
  6. Senior Gamemaster (Access: 5)
  7. God (Access: 6)
 
You should use flags for that


There is no flag for the Ctrl+Y. That's not the "Can answer rule violations".
Answering rule violations is the "Rule Violation" chat channel for Gamemasters.

What I am talking about is the "ban window".
Is there a way to disable hotkeys like "Ctrl+Y" for anyone with a specific accessLevel?

I have now managed to block any reports made. But I would prefer if the window didn't show up at all with the ban reasons etc...
 
Back
Top