Jump to content

Recommended Posts

Posted

Easy .pmoff voicedcommand to make the pm refusal mode accessible to players.

Credits to me.

(I know thats a very easy one to make so plz dont comment something like "easy to me" or else...that command only for FUN)

 

Tested and work on L2J ct2.2

 

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;

/**
* @author Intrepid
*
*/

public class pmoff implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS = 
{ 
	"pmoff"
};

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	if ((command.startsWith("pmoff")))
	{
		if (activeChar.getMessageRefusal()) // already in message refusal mode
		{
			activeChar.setMessageRefusal(false);
			activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_ACCEPTANCE_MODE));
		}
		else
		{
			activeChar.setMessageRefusal(true);
			activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_REFUSAL_MODE));
		}
	}
	return true;
}

public String[] getVoicedCommandList()
{
	return VOICED_COMMANDS;
}
}

Posted

Well... nobody said its very easy to make that.

But, /allblock does the exact same thing...

 

i know i know thats why i said just for fun:Pyou know thats more "special" i think because /allblock is work everywhere but find me a server where players can use a gm command(without access ofc):)

Posted

i know i know thats why i said just for fun:Pyou know thats more "special" i think because /allblock is work everywhere but find me a server where players can use a gm command(without access ofc):)

Well, ok. Its good to have those java modifications. :)

BTW you can make commands for trade refusal, duel, party etc.

That would be good.

Posted

Well, ok. Its good to have those java modifications. :)

BTW you can make commands for trade refusal, duel, party etc.

That would be good.

 

hmm good idea when i have some time i start to make them:D

Posted

/allblock

/allunblock

 

anyway gb... and thx for idea

 

you give me one idea :)

 

is for admins... when somene want to send pm to gm/admin and is refusal mode to see the  message xD

 

example :)

Players (NAME): tryed to say you "message" 

 

 

 

Posted

Everyone knew that.Bad post.

you cannot voted for bad post...

seems you can make something better?

he only posted for help and if you are newbie to java you can learn something from these codes...

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Website: https://l2aurum.com/  Discord: https://discord.gg/l2aurum   Hello Everyone,  finally, the moment has arrived: I'm launching my own server, L2Aurum!   L2Aurum x300 Closed Beta Test - Start: 17.02.2025  [20:00 GMT+2] Grand Opening 21.02.2025 [20:00 GMT+2]     Experience Rates: x300 Skill Points Rates: x300 Adena Drop: x300 Premium Accounts: x2 Drop Rates: x1 Spoil Rates: x1 Quest Rates: x1 Only one account per player, no dualboxing allowed. Everything is earned through gameplay, no pay-to-win mechanics. No server wipes—your progress is permanent. Fair play is a priority, with no room for corruption. All players are treated equally, no special favors.     Buffs slots: 26+4, all buffs in NPC and Scheme System. Custom Armors: Aurum Apella Armor Custom Weapons: Aurum Weapon Custom Accessories: +300 P.Def & M.Def Tattoos: Mage & Fighter & Custom Shirts Custom Jewels: New Grand Bosses Auto Farm is FREE for everyone. Status Noblesse: Barakiel. Player Spawn Protection: 10 seconds. Geodata e Panthodes: ENABLED. All Commands are visible in .menu. System 2 Bishop Per Party: ENABLED. Boss Protect - Anti-Zerg: ENABLED.     Siege Duration: 2 hours (120 minutes). Siege Period: Every 7 days. Castle Reward: 100E Per Castle. Available Castles: Rune Aden Giran Giran Siege: Every Friday 20:00 GMT +2. Aden Siege: Every Saturday 20:00 GMT +2. Rune Siege: Every Sunday 20:00 GMT +2. Main Clan: 40 Members max. Royal Clan: 12 Members max. Knight Clan: 7 Members max. Alliance: You can have only 1.     Epic Boss Valakas: Monday 22:30 (GMT+2) Zaken: Tuesday | Thursday 22:30 (GMT+2) Queen Ant: Monday | Wednesday 22:30 (GMT+2) Baium: Friday 22:30 (GMT+2) Antharas: Saturday 22:30 (GMT+2) Orfen: Tuesday | Thursday | Saturday 18:30 (GMT+2) Core: Monday | Wednesday | Friday | Sunday 18:30 (GMT+2)   Raid Boss  Flame Of Splendor Barakiel Last Hit: Every Day Respawn 3-4 hours Ember: Every Day Respawn 3-4 hours Lilith: Every Day Respawn 3-4 hours Anakim: Every Day Respawn 3-4 hours Queen Shyeed: Every Day Respawn 3-4 hours Golkonda: Every Day Respawn 3-4 hours Shuriel: Every Day Respawn 3-4 hours Varka's Hero Shadith: Every Day Respawn 3-4 hours Ketra's Hero Hekaton: Every Day Respawn 3-4 hours Varka's Mos: Every Day Respawn 3-4 hours Chief Horus: Every Day Respawn 3-4 hours Ketra's Tayer: Every Day Respawn 3-4 hours Chief Brakki: Every Day Respawn 3-4 hours Sailren: Every Day Respawn 02:00   🥳🥳🥳🥳 I would like to chat personally with all of you over on our Discord and discuss any suggestions or feedback you might have.      Website: https://l2aurum.com/  Discord: https://discord.gg/l2aurum
    • DISCORD : https://discord.com/users/325653525793210378 utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt
    • DISCORD : https://discord.com/users/325653525793210378 utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt
    • DISCORD : https://discord.com/users/325653525793210378 utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt
    • DISCORD : https://discord.com/users/325653525793210378 utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt
  • Topics

×
×
  • Create New...