Jump to content
  • 0

ClassChanger CommunityBoard


Question

9 answers to this question

Recommended Posts

  • 0
Posted (edited)
13 hours ago, John Mouling said:

hello. Could anyone help me please?. I'm looking to make a classchanger in the community. to make class changes as appropriate. Do you have any example code?

You can make a voice classmaster, use buttons for both cb and npc.

Or what is the question?

What source you use?

Edited by Psygrammator
  • 0
Posted (edited)

I added a button in community where you click on it and the idea is that windows shows you wich classes could you change. and click on in and changes your class. Do you have any code to share with me?. or an idea how can i make it?.

Im using mobius

Edited by John Mouling
  • 0
Posted
17 hours ago, John Mouling said:

I added a button in community where you click on it and the idea is that windows shows you wich classes could you change. and click on in and changes your class. Do you have any code to share with me?. or an idea how can i make it?.

Im using mobius

 

 

Bypass is called as a voice command.

 

https://pastebin.com/bmjH9UYD

 

  • 0
Posted

Thanks a lot Psygrammator. This means that i need to use a voicedcommans like .changeclass? could be in community?. because when i edit the button in community like "changeclass" an error show in console. Not handled RequestBypassToServer.

  • 0
Posted
5 hours ago, John Mouling said:

Thanks a lot Psygrammator. This means that i need to use a voicedcommans like .changeclass? could be in community?. because when i edit the button in community like "changeclass" an error show in console. Not handled RequestBypassToServer.

Because his classmaster is tied to instance.

I sent you an analogue of Mobius Classmaster, only rewritten to voice commands.

  • 0
Posted (edited)
17 minutes ago, John Mouling said:

Yes. Thanks. I tested on voicedcommand and it works. but when you click on New ClassButton nothings happen, i will rework. 
Last, i forget to add voicedcommand classmaster into masterhandler.

Check RequestBypassToServer

 

else if (_command.startsWith("voice ."))
{
	final IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler("voice");
	if (vch != null)
	{
		vch.useVoicedCommand(_command, player, null);
	}
}

And add class
 

/*
 * This file is part of the L2J Mobius project.
 * 
 * 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 org.l2jmobius.gameserver.handler.voicedcommandhandlers;

import org.l2jmobius.gameserver.handler.IVoicedCommandHandler;
import org.l2jmobius.gameserver.handler.VoicedCommandHandler;
import org.l2jmobius.gameserver.model.actor.Player;

/**
 * @author DS
 */
public class VoiceCommand implements IVoicedCommandHandler
{
    private static final String[] COMMANDS =
    {
       "voice"
    };
    
    @Override
    public boolean useVoicedCommand(String command, Player player, String target)
    {
       // only voice commands allowed
       if ((command.length() > 7) && (command.charAt(6) == '.'))
       {
          final String vc;
          final String vparams;
          final int endOfCommand = command.indexOf(' ', 7);
          if (endOfCommand > 0)
          {
             vc = command.substring(7, endOfCommand).trim();
             vparams = command.substring(endOfCommand).trim();
          }
          else
          {
             vc = command.substring(7).trim();
             vparams = null;
          }
          
          if (vc.length() > 0)
          {
             final IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(vc);
             if (vch != null)
             {
                return vch.useVoicedCommand(vc, player, vparams);
             }
          }
       }
       
       return false;
    }
    
    @Override
    public String[] getVoicedCommandList()
    {
       return COMMANDS;
    }
}

 

Or you can find how voice is used in request and change all bypasses in VoiceClassMaster

Edited by Psygrammator
  • 0
Posted

Hi!! i have lost my implementation of that solution. what im doing wrong here?. It opens a communityboard window but without content. its in proceess but i think that i should show a text.

 

/*
 * This file is part of the L2J Mobius project.
 * 
 * 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 handlers.voicedcommandhandlers;

import java.util.logging.Logger;

import org.l2jmobius.gameserver.enums.CategoryType;
import org.l2jmobius.gameserver.enums.Race;
import org.l2jmobius.gameserver.handler.CommunityBoardHandler;
import org.l2jmobius.gameserver.handler.IVoicedCommandHandler;
import org.l2jmobius.gameserver.model.actor.Player;

import ai.others.ClassMaster.ClassMaster;

/**
 * @author juan_
 */
public class ClassMasterVoiced implements IVoicedCommandHandler
{
	private static final Logger LOGGER = Logger.getLogger(ClassMaster.class.getName());
	
	private static final String[] VOICED_COMMANDS = new String[]
	{
		"1stClass",
		"2ndCass",
		"3rdCass",
		"AwakenClass"
	};
	
	/*
	 * (non-Javadoc)
	 * @see org.l2jmobius.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, org.l2jmobius.gameserver.model.actor.Player, java.lang.String)
	 */
	@Override
	public boolean useVoicedCommand(String command, Player player, String params)
	{
		if (command.equalsIgnoreCase("1stClass"))
		{
			getFirstOccupationChangeHtml(player);
		}
		return true;
	}
	
	/*
	 * (non-Javadoc)
	 * @see org.l2jmobius.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList()
	 */
	@Override
	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
	
	private void getFirstOccupationChangeHtml(Player player)
	{
		String htmltext = null;
		
		if (player.isInCategory(CategoryType.FIRST_CLASS_GROUP))
		{
			if (player.getRace() == Race.ERTHEIA)
			{
				CommunityBoardHandler.separateAndSend("SDASDASDSA", player);
			}
			else if (player.getLevel() < 20)
			{
				htmltext = "test_server_helper027.html";
			}
			else
			{
				switch (player.getClassId())
				{
					case FIGHTER:
					{
						htmltext = "test_server_helper026a.html";
						break;
					}
					case MAGE:
					{
						htmltext = "test_server_helper026b.html";
						break;
					}
					case ELVEN_FIGHTER:
					{
						htmltext = "test_server_helper026c.html";
						break;
					}
					case ELVEN_MAGE:
					{
						htmltext = "test_server_helper026d.html";
						break;
					}
					case DARK_FIGHTER:
					{
						htmltext = "test_server_helper026e.html";
						break;
					}
					case DARK_MAGE:
					{
						htmltext = "test_server_helper026f.html";
						break;
					}
					case ORC_FIGHTER:
					{
						htmltext = "test_server_helper026g.html";
						break;
					}
					case ORC_MAGE:
					{
						htmltext = "test_server_helper026h.html";
						break;
					}
					case DWARVEN_FIGHTER:
					{
						htmltext = "test_server_helper026i.html";
						break;
					}
					case MALE_SOLDIER:
					{
						htmltext = "test_server_helper026j.html";
						break;
					}
					case FEMALE_SOLDIER:
					{
						htmltext = "test_server_helper026k.html";
						break;
					}
				}
			}
		}
		else if (player.isInCategory(CategoryType.SECOND_CLASS_GROUP))
		{
			htmltext = "test_server_helper028.html";
		}
		else if (player.isInCategory(CategoryType.THIRD_CLASS_GROUP))
		{
			htmltext = "test_server_helper010.html";
		}
		else if (player.isInCategory(CategoryType.FOURTH_CLASS_GROUP))
		{
			htmltext = "test_server_helper011.html";
		}
		else if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
		{
			htmltext = "test_server_helper011a.html";
		}
		// CommunityBoardHandler.separateAndSend(htmltext, player);
	}
	
	private String getSecondOccupationChangeHtml(Player player)
	{
		String htmltext = null;
		if (player.isInCategory(CategoryType.SECOND_CLASS_GROUP) || player.isInCategory(CategoryType.FIRST_CLASS_GROUP))
		{
			if (player.getLevel() < 40)
			{
				htmltext = "test_server_helper023.html";
			}
			else
			{
				switch (player.getClassId())
				{
					case FIGHTER:
					{
						htmltext = "test_server_helper012.html";
						break;
					}
					case WARRIOR:
					{
						htmltext = "test_server_helper012a.html";
						break;
					}
					case KNIGHT:
					{
						htmltext = "test_server_helper012b.html";
						break;
					}
					case ROGUE:
					{
						htmltext = "test_server_helper012c.html";
						break;
					}
					case MAGE:
					{
						htmltext = "test_server_helper013.html";
						break;
					}
					case WIZARD:
					{
						htmltext = "test_server_helper013a.html";
						break;
					}
					case CLERIC:
					{
						htmltext = "test_server_helper013b.html";
						break;
					}
					case ELVEN_FIGHTER:
					{
						htmltext = "test_server_helper014.html";
						break;
					}
					case ELVEN_KNIGHT:
					{
						htmltext = "test_server_helper014a.html";
						break;
					}
					case ELVEN_SCOUT:
					{
						htmltext = "test_server_helper014b.html";
						break;
					}
					case ELVEN_MAGE:
					{
						htmltext = "test_server_helper015.html";
						break;
					}
					case ELVEN_WIZARD:
					{
						htmltext = "test_server_helper015a.html";
						break;
					}
					case ORACLE:
					{
						htmltext = "test_server_helper015b.html";
						break;
					}
					case DARK_FIGHTER:
					{
						htmltext = "test_server_helper016.html";
						break;
					}
					case PALUS_KNIGHT:
					{
						htmltext = "test_server_helper016a.html";
						break;
					}
					case ASSASSIN:
					{
						htmltext = "test_server_helper016b.html";
						break;
					}
					case DARK_MAGE:
					{
						htmltext = "test_server_helper017.html";
						break;
					}
					case DARK_WIZARD:
					{
						htmltext = "test_server_helper017a.html";
						break;
					}
					case SHILLIEN_ORACLE:
					{
						htmltext = "test_server_helper017b.html";
						break;
					}
					case ORC_FIGHTER:
					{
						htmltext = "test_server_helper018.html";
						break;
					}
					case ORC_RAIDER:
					{
						htmltext = "test_server_helper018a.html";
						break;
					}
					case ORC_MONK:
					{
						htmltext = "test_server_helper018b.html";
						break;
					}
					case ORC_MAGE:
					case ORC_SHAMAN:
					{
						htmltext = "test_server_helper019.html";
						break;
					}
					case DWARVEN_FIGHTER:
					{
						htmltext = "test_server_helper020.html";
						break;
					}
					case ARTISAN:
					{
						htmltext = "test_server_helper020b.html";
						break;
					}
					case SCAVENGER:
					{
						htmltext = "test_server_helper020a.html";
						break;
					}
					case MALE_SOLDIER:
					case TROOPER:
					{
						htmltext = "test_server_helper020c.html";
						break;
					}
					case FEMALE_SOLDIER:
					case WARDER:
					{
						htmltext = "test_server_helper020d.html";
						break;
					}
					case ERTHEIA_FIGHTER:
					{
						htmltext = "test_server_helper020e.html";
						break;
					}
					case ERTHEIA_WIZARD:
					{
						htmltext = "test_server_helper020f.html";
						break;
					}
				}
			}
		}
		else if (player.isInCategory(CategoryType.THIRD_CLASS_GROUP))
		{
			htmltext = "test_server_helper010.html";
		}
		else if (player.isInCategory(CategoryType.FOURTH_CLASS_GROUP))
		{
			htmltext = "test_server_helper011.html";
		}
		else if (player.isInCategory(CategoryType.SIXTH_CLASS_GROUP))
		{
			htmltext = "test_server_helper011a.html";
		}
		else
		{
			htmltext = "test_server_helper029.html";
		}
		return htmltext;
	}
	
}

 

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
Answer this question...

×   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

    • Would it be possible to update the guide? The images are offline! 😞
    • In the fast-paced world of digital marketing, having the right tools makes all the difference. If you're searching for a reliable SMM panel Nigeria, GoUpSocial is here to take your online presence to the next level. Built for influencers, marketers, startups, and content creators, our platform is the ultimate solution for smart and scalable social media growth. With GoUpSocial, you get more than just numbers—you get engagement that drives real impact. As a trusted Nigerian SMM panel, we help you gain visibility across top platforms like Instagram, TikTok, YouTube, Facebook, and Twitter—all at the most competitive prices in the market. Experience the Power of the Best SMM Panel in Nigeria We understand that quality matters just as much as affordability. That’s why GoUpSocial has become the go-to platform for users seeking the best SMM panel in Nigeria. Here’s what makes us the preferred choice: 🚀 Real-Time Delivery: Get your orders processed and completed in minutes, not hours. 💼 All-in-One Dashboard: Manage all your campaigns with ease from a clean, simple interface. 💡 Effective Strategies: Our tools are tailored for organic-looking growth and high user engagement. 🧾 Transparent Pricing: No hidden fees—just straightforward, affordable packages. 👩‍💻 Expert Support: Our team is available 24/7 to guide you through every step of the process. Whether you need more followers, likes, views, or overall engagement, our SMM panel Nigeria services deliver measurable and meaningful results. Why We’re the Nigeria Fastest and Cheapest SMM Panel GoUpSocial isn’t just another provider—it’s the Nigeria fastest and cheapest SMM panel built with performance and value in mind. We combine automation, intelligent targeting, and local market understanding to help you scale effortlessly. Need to boost a campaign today? Our platform supports instant order processing, real-time tracking, and localized engagement strategies—making it ideal for any influencer or business operating in Nigeria. Plus, as the cheapest SMM panel in Nigeria, we make sure that even clients with limited budgets can access top-quality services without compromise. A Nigerian SMM Panel Built for 2025 and Beyond As social media algorithms evolve, traditional methods of gaining reach and engagement no longer work. That’s why we’ve built the SMM panel Nigeria 2025—a next-gen platform optimized for today’s challenges. From smart delivery settings to niche-specific targeting, GoUpSocial provides you with every advantage in a competitive digital world. Our system adapts to the latest platform changes, helping you stay relevant, visible, and in control. Looking for a localized service? Our SMM panel for Nigerian followers helps you connect directly with your audience—boosting both credibility and conversions. All-in-One Online Panel in Nigeria for Every Social Goal No matter your objective—brand awareness, follower growth, or engagement improvement—GoUpSocial is the online panel in Nigeria that offers it all. With flexible services, dynamic campaigns, and secure systems, we give you the tools to succeed in a crowded online space. And because we’re committed to your growth, our platform is continually updated to reflect the best practices of modern digital marketing. Take the Leap with the Best Nigerian SMM Panel Ready to grow smarter? With GoUpSocial, you don’t just gain social proof—you build real influence. As the cheapest Nigeria SMM panel, we combine speed, quality, and affordability in one seamless platform. Whether you're an aspiring influencer, a marketing agency, or a brand aiming for greater reach, GoUpSocial is the ultimate Nigerian SMM panel to help you reach your full potential. 👉 Sign up today and unlock the next level of social media growth with GoUpSocial.
    • Lineage2 : Website Download now our System Patch. Registration from 12:00 UTC Time.
    • Daily reward system operational. 28 rewards. Option to buy days (Donate). Automatically resets on the first day of each month. External configuration file. You can submit daily rewards by account or IP. Minimum claim level. Claiming on the 28th locks the reward until the next month. Contact Discord: lykoz#0331
  • 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