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

    • SocNet is looking for new suppliers!  — Reddit accounts with karma  — LinkedIn accounts with real connections  Message us or contact support — let’s discuss terms!  We’re also open to other partnership opportunities.   Our Online Store Offers: Accounts: Telegram, Facebook, Reddit, Twitter (X), Instagram, YouTube, TikTok, Discord, VK, LinkedIn, GitHub, Snapchat, Gmail, Emails (Outlook, Firstmail, Rambler, Onet, Gazeta, GMX, Yahoo, Proton, Web.de), Google Voice, Google Ads Premium Subscriptions: Telegram Premium, Twitter Premium X, YouTube Premium, Spotify Premium, Netflix Premium, Discord Nitro, ChatGPT Plus/PRO, XBOX Game Pass Additional Services: Telegram Stars, Proxies (IPv4, IPv6, ISP, Mobile), VPN (Outline, WireGuard, etc.), VDS/RDP Servers   SMM Panel Services: Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, Soundcloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, Reddit, website traffic, TikTok, TrustPilot, Apple Music, Tripadvisor, Snapchat, and more. Promo code for store discount: PARTNER8 (8% off)  Get $1 trial balance for the SMM Panel:  Submit a ticket titled “Get Trial Bonus” via our website (Support)  ➡ Go to the SMM Panel (clickable) or contact us through the bot    Our Key Products:  Online Store: Click  Telegram Shop Bot: Click   SMM Panel: Click    Payments accepted: Bank cards · Crypto · Other popular methods   Returning buyers receive extra discounts and promo codes!   Support:  ➡ Telegram: https://t.me/solomon_bog   ➡ Discord: https://discord.gg/y9AStFFsrh   ➡ WhatsApp: https://wa.me/79051904467   ➡ Email: solomonbog@socnet.store    ➡ Telegram Channel: https://t.me/accsforyou_shop  You can also use these contacts to:  — Discuss bulk orders  — Form partnerships (Current partners: https://socnet.bgng.io/partners )  — Become our supplier SocNet — your digital goods & subscription store
    • Hello everyone, I could really use some of your knowledge regarding client-side editing. I'm not trying to do anything crazy, just a few small modifications here and there, like adding custom items or modifying how the glow effect appears on lower grade items. The issue is, I'm having a hard time navigating the file edits and figuring out exactly where each line needs to go. I tried using the Notepad++ method, but either it doesn't work for me, or I’m simply doing something wrong. To sum it up: when I import .txt files, the file editor doesn’t allow me to save and encrypt them. And even when I try making changes via the DAT editor, the client refuses to open afterward or it still doesn't save. If anyone has any experience or insight on this, I’d really appreciate your help. Thanks in advance!
    • We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX! Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock