222222
Intermediate OT User
- Joined
- Jul 3, 2007
- Messages
- 207
- Reaction score
- 145
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:
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:
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:
- Player (Access: 0)
- Premium Player (Access: 1)
- Tutor (Access: 2) Should only be able to do Bug Report (Ctrl+Z)
- Counsellor (Access: 3) Should be able to do Bug Report (Ctrl+Z) and Namelock reports (Ctrl+Y)
- Gamemaster (Access: 4) Should be able to do Bug Report (Ctrl+Z) and any report (Ctrl+Y)
- Senior Gamemaster (Access: 5)
- God (Access: 6)