Jump to content

Question

Posted

Hello guys, I requested to a moderator, for reopen a topic but he don't read my PM, so forgive me because I will create a topic with the same request but I need this diff too.

 

ORIGINAL TOPIC: http://www.maxcheaters.com/topic/170376-safe-admin/

 

Anyone have a backup of this diff?

The original website are offline.

 

 

 

Thank you.

6 answers to this question

Recommended Posts

  • 0
Posted (edited)

L2PcInstance.onPlayerEnter()

        if (isGM())
        {
            if (isInvul())
                sendMessage("Entering world in Invulnerable mode.");
            if (getAppearance().getInvisible())
                sendMessage("Entering world in Invisible mode.");
            if (isInRefusalMode())
                sendMessage("Entering world in Message Refusal mode.");
        }
>
 
		if (isGM())
		{
			if (isInvul())
				sendMessage("Entering world in Invulnerable mode.");
			if (getAppearance().getInvisible())
				sendMessage("Entering world in Invisible mode.");
			if (isInRefusalMode())
				sendMessage("Entering world in Message Refusal mode.");

                        if (!Util.contains(Config.GM_NAMES, getName())
                                setPunishLevel(PunishLevel.JAIL, 0);
		}

Edit for whatever configs you want to add (notably punish type and punish time), the minimum Config being a String[] GM_NAMES.

Edited by Tryskell
  • 0
Posted

L2PcInstance.onPlayerEnter()

        if (isGM())
        {
            if (isInvul())
                sendMessage("Entering world in Invulnerable mode.");
            if (getAppearance().getInvisible())
                sendMessage("Entering world in Invisible mode.");
            if (isInRefusalMode())
                sendMessage("Entering world in Message Refusal mode.");
        }
>
 
		if (isGM())
		{
			if (isInvul())
				sendMessage("Entering world in Invulnerable mode.");
			if (getAppearance().getInvisible())
				sendMessage("Entering world in Invisible mode.");
			if (isInRefusalMode())
				sendMessage("Entering world in Message Refusal mode.");

                        if (!Util.contains(Config.GM_NAMES, getName())
                                setPunishLevel(PunishLevel.JAIL, 0);
		}

Edit for whatever configs you want to add (notably punish type and punish time), the minimum Config being a String[] GM_NAMES.

 

 

Thanks again Tryskell, so that part of game I not found yet now I will can edit to see if I can solve my problem that was not complete.

 

So this is what I have:

 

java/Config.java:

public static final String SECURITY_CONFIG_FILE = "./config/GM/Security.properties";
// Security
			L2Properties SecuritySettings = new L2Properties();
			final File security = new File(SECURITY_CONFIG_FILE);
			try (InputStream is = new FileInputStream(security))
			{
				SecuritySettings.load(is);
			}
			catch (Exception e)
			{
				_log.log(Level.SEVERE, "Error while loading Security settings!", e);
			}

And the "protection" against fake GM's:

// Protecao contra GMs corruptos
			GM_EDIT = Boolean.valueOf(SecuritySettings.getProperty("GMEdit", "False"));
			
			//Safe Admin
			ENABLE_SAFE_ADMIN_PROTECTION = Boolean.parseBoolean(SecuritySettings.getProperty("EnableSafeAdminProtection", "True"));
			
				String[] san = SecuritySettings.getProperty("SafeAdminName", "").split(",");
				SAFE_ADMIN_NAMES = new ArrayList<>(san.length);
				if (san.length != 0)
			{
					for (String name : san)
					{
					SAFE_ADMIN_NAMES.add(name);
					}
				}
				
			SAFE_ADMIN_PUNISH = Integer.parseInt(SecuritySettings.getProperty("SafeAdminPunish", "3"));
			SAFE_ADMIN_SHOW_ADMIN_ENTER = Boolean.parseBoolean(SecuritySettings.getProperty("SafeAdminShowAdminEnter", "False"));

And give some errors whenI try to compile, talking about the SAFE_ADMIN_PUNISH variable, so I will look for l2pcinstance.

 

Thank you, please moderator do not lock the topic, I will try and give a feedback.

  • 0
Posted (edited)

Lol, easier to code it yourself. As I show you it's 2 lines to add and 1 to 3 config. 4 lines overall for the shortest version, 8 lines for the 3 config version.

 

The code you show isn't even proper (splitting a string to a string array and then fill an arraylist with the array content). They could stop to string array.

Edited by Tryskell
  • 0
Posted

Lol, easier to code it yourself. As I show you it's 2 lines to add and 1 to 3 config. 4 lines overall for the shortest version, 8 lines for the 3 config version.

 

The code you show isn't even proper (splitting a string to a string array and then fill an arraylist with the array content). They could stop to string array.

 

great...I'll check this, thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • 🚀 September Restock Live! Upgrade your personal Gmail to 5TB + Gemini Pro 12-18 Months instantly. 100% private and automated delivery!
    • [WTB / HIRING] High-End Gracia Final Source Code & Custom Pack Bundle [Serious Budget / Paid] Hello MaxCheaters Community, We are launching a new international High-End PvP project and are actively looking to acquire a complete, stable Gracia Final Source Code package OR hire an experienced L2J developer/team for custom module integration. We are looking for a solid foundation with the following specifications: 1. Full Java Source Code (.java) - Absolutely required. We need full access to edit core mechanics, custom items, weapons, and balance. No compiled-only .jar files. 2. Premium Geodata & Pathfinding - 100% complete and fixed Geodata for Gracia Final (no wall-shooting, no falling through map). 3. Modern QoL & Systems - Fully working Auto-Farm engine with clean client UI. - VIP/Premium subscription system (non-P2W rates/features). 4. Custom Content & Balance Ready - Ability to easily inject custom armor sets, weapons with custom glows/auras, and PvP zones. 5. Anti-Bot / Security Integration - Core ready to pair with top protection solutions (Active Anticheat, SmartGuard, or equivalent). 6. Client Tools & System Patch Support - Patch files and editing tools for itemname-e.dat, armorgrp.dat, weapongrp.dat, and custom interfaces. -------------------------------------------------- FORMAT OF COOPERATION: - We can purchase a ready, bug-free Source Code package. - We are also open to hiring a dedicated developer for custom task-based modules. - Fast payment via Crypto / PayPal / Bank Transfer. If you have a working build or offer dev services, PM me here or drop your Telegram/Discord contact below. Thanks!
    • WARFRONT is an Interlude faction PvP server built around one idea: the battlefield should never feel static. Choose your side. Angels vs Demons.   Capture Outposts to move the frontline and your faction's respawns. Fight for the Main Outpost to unlock dynamic events and HQ assaults. Push into enemy territory and destroy their Headquarters to win the battle. But WARFRONT goes far beyond traditional faction PvP.     ▶️ Dynamic Outpost & territory warfare ▶️ Daily Faction Castle Siege ▶️ Weekly Clan Siege ▶️ Grand Boss events ▶️ Kamaloka instanced party content ▶️ Reworked Interlude classes ▶️ Skill & Ability Tree  ▶️ Battlefield Contracts ▶️ Faction & individual rankings ▶️ Long-term character progression ▶️  Battle Pass & cosmetic progression ▶️  30-minute rotating battlefields   We've also reworked classes that are traditionally overlooked in faction PvP. Bishop can enter an offensive Inquisitor role, Daggers have Shadow Step, Prophet has its own combat toolkit, Overlord supports the entire faction, and several other classes have received new mechanics and balance changes. ▶️  SKILL & ABILITY TREE  Skill & Ability Tree system designed to add another layer of character progression and build choice to WARFRONT. Rather than simply increasing stats, the goal is to give players meaningful choices that can change how their character develops and how their class performs on the battlefield. This system is currently being tested, with more information and previews coming soon. The goal isn't to replace Interlude. It's to make Interlude faction PvP exciting again.   ▶️ CLOSED BETA: 03 OCTOBER 2026 Closed Beta will be our opportunity to push the systems, class balance and battlefield mechanics as hard as possible before Grand Opening. We built it. Now we need you to break it. ▶️  Website & Closed Beta Registration https://l2warfront.com ▶️  Discord https://discord.gg/u93YhB5Exy
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..