Jump to content
  • 0

[help] me away system


Question

Posted

kalhspera!!

exw ftiaksei ena away system (bsk pira ena p hparxei sto site kai to allaksa)

kai exw ena prob

apo8ikebete to title kai to xrwma t title se kapies me tablhtes

kai meta otan pathsei o allos back pernei aytes tis times

poy einai to problhma twra?

oi times gia to xroma kai to title den apo8ikeyete ksexwrista gia ton ka8e paixth alla oi metablhtes pernoyn tis times toy teleftaioy paixth p ekane away

otan meta kaneis back perneis tis times toy teleytaioy kai oxi tis dikes s

oriste to code:

package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

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

private String chartitle;
private  int charcolor;

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	if (command.equalsIgnoreCase("away"))
{
	if (activeChar.isInJail())
	{
		activeChar.sendMessage("You cannot use this command while you are in Jail!");
		return false;
		}
	else if(activeChar.isInOlympiadMode())
		{
		activeChar.sendMessage("You cannot use this command while you are in the Olympiad now.");
		return false;
		}
	else if(activeChar.atEvent)
		{
			activeChar.sendMessage("You cannot use this command while you are in an event.");
			return false;
			}
	else  if (activeChar.isInDuel())
			{
		activeChar.sendMessage("You cannot use this command while you are in a duel!");
		return false;
		}            else if (activeChar.inObserverMode())
		{
			activeChar.sendMessage("You cannot use this command while you are in Observer Mode.");
			}
		else if (activeChar.isFestivalParticipant())
			{
				activeChar.sendMessage("You cannot use this command while you are in a festival.");
				return false;
				}
			else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift())
			{
				activeChar.sendMessage("You cannot use this command while you are in the dimensional rift.");
				return false;
				}
			else if (activeChar.isParalyzed())
	        {
		        activeChar.sendMessage("You are already away from keyboard.");
	          	return false;
	            }
	                chartitle = activeChar.getTitle();
	                charcolor = activeChar.getAppearance().getTitleColor();
					activeChar.sendMessage("You are away from keyboard.");
					activeChar.setTitle("*Away*"); // Title text when somebody is away.
					activeChar.getAppearance().setTitleColor(0xFF000);
                        activeChar.setIsParalyzed(true);
                        activeChar.broadcastUserInfo();

          	}

        else

    if (command.equalsIgnoreCase("back"))
   {
     if (activeChar.isInJail())
   	{
	   	activeChar.sendMessage("You cannot use this command while you are in Jail!");
		return false;
		}
	else if(activeChar.isInOlympiadMode())  
	{
		activeChar.sendMessage("You cannot use this command while you are in the Olympiad.");
		return false;
		}
	else if(activeChar.atEvent)
		{
			activeChar.sendMessage("You cannot use this command while you are in an event.");
			return false;
			}
	else  if (activeChar.isInDuel())
			{
				activeChar.sendMessage("You cannot use this command while you are in a duel!");
				return false;
				}
	else if (activeChar.inObserverMode())
	{
		activeChar.sendMessage("You cannot use this command while you are in Observer Mode.");
		}
	else if (activeChar.isFestivalParticipant())
		{
			activeChar.sendMessage("You cannot use this command while you are in a festival.");
			return false;
			}
		else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift())
		{
			activeChar.sendMessage("You cannot use this command while you are in the dimensional rift.");
			return false;
			}
			activeChar.sendMessage("Welcome back, have fun!");
			activeChar.setTitle(chartitle);
			activeChar.getAppearance().setTitleColor(charcolor);
                activeChar.setIsParalyzed(false);
                activeChar.broadcastUserInfo();
			}
      return true;

    }

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

 

an mporei kaoios na me boh8hsei 8a to ekthmoysa poly....

7 answers to this question

Recommended Posts

  • 0
Posted

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

private String chartitle;
private  int charcolor;

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
	if (activeChar.isInJail())
	{
		activeChar.sendMessage("You cannot use this command while you are in Jail!");
		return false;
		}
	 if(activeChar.isInOlympiadMode())
		{
		activeChar.sendMessage("You cannot use this command while you are in the Olympiad now.");
		return false;
		}
	 if(activeChar.atEvent)
		{
			activeChar.sendMessage("You cannot use this command while you are in an event.");
			return false;
			}
	 if (activeChar.isInDuel())
			{
		activeChar.sendMessage("You cannot use this command while you are in a duel!");
		return false;
		}             if (activeChar.inObserverMode())
		{
			activeChar.sendMessage("You cannot use this command while you are in Observer Mode.");
			}
		 if (activeChar.isFestivalParticipant())
			{
				activeChar.sendMessage("You cannot use this command while you are in a festival.");
				return false;
				}
			 if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift())
			{
				activeChar.sendMessage("You cannot use this command while you are in the dimensional rift.");
				return false;
				}
			 if (activeChar.isParalyzed())
	        {
		        activeChar.sendMessage("You are already away from keyboard.");
	          	return false;
	            }
	{
		if (command.equalsIgnoreCase("away"))

	                chartitle = activeChar.getTitle();
	                charcolor = activeChar.getAppearance().getTitleColor();
					activeChar.sendMessage("You are away from keyboard.");
					activeChar.setTitle("*Away*"); // Title text when somebody is away.
					activeChar.getAppearance().setTitleColor(0xFF000);
                       activeChar.setIsParalyzed(true);
                       activeChar.broadcastUserInfo();

      	}
     if (activeChar.isInJail())
   	{
	   	activeChar.sendMessage("You cannot use this command while you are in Jail!");
		return false;
		}
	if(activeChar.isInOlympiadMode())  
	{
		activeChar.sendMessage("You cannot use this command while you are in the Olympiad.");
		return false;
		}
	if(activeChar.atEvent)
		{
			activeChar.sendMessage("You cannot use this command while you are in an event.");
			return false;
			}
	if (activeChar.isInDuel())
			{
				activeChar.sendMessage("You cannot use this command while you are in a duel!");
				return false;
				}
	if (activeChar.inObserverMode())
	{
		activeChar.sendMessage("You cannot use this command while you are in Observer Mode.");
		}
	if (activeChar.isFestivalParticipant())
		{
			activeChar.sendMessage("You cannot use this command while you are in a festival.");
			return false;
			}
		if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift())
		{
			activeChar.sendMessage("You cannot use this command while you are in the dimensional rift.");
			return false;
			}
     {
	    if (command.equalsIgnoreCase("back"))
	    	
			activeChar.sendMessage("Welcome back, have fun!");
			activeChar.setTitle(chartitle);
			activeChar.getAppearance().setTitleColor(charcolor);
               activeChar.setIsParalyzed(false);
               activeChar.broadcastUserInfo();
			}
     return true;

   }

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

oriste. dokimase to kai pes mou

  • 0
Posted

filarako m ayxarhstw gia thn boh8eia

omws den katalabes akribws p exw to problhma h isws na mhn eimoyn egw safhs

to title allazei kai to xroma

ti ginete omws

patas esy away

pataw egw away

ara exoyn apo8ikeytei oi dikes m times

ama pathseis back 8a pareis tis dikies m times oxi tis dikes s:/

basika 8elw na ftiaksw ena table p na apo8ikebei to onoma to xroma kai ton titlo

kai otan o allos pataei back na pernei tis times apo to table

  • 0
Posted

oi times gia to color kai to title alalzoyn gia olous stoys char to idio kai pernoin tis times toy teleftaioy char p einai away.

den einai skexwristes gia ton ka8e char

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

    • Hello everyone! L2 Imagination High Five x30 Summer Seasson     OPEN BETA from 05.07.2026 LIVE START 10.07.2026 GMT+2      Rates: XP/SP 30x, Spoil 15x, Drop 15x, Adena 15x   Server Features: Spoil Agathion, Free Auto-Farm, Castle Instance, Daily Reward Calendar, Adena Boxes VIP Gold Color Chat, Unique Olympiad Extra Points Engine, GvG Event Solo Instance, PvP Solo Rift, Automatic GvG Event, Improved Orfen and Core Areas Lair of Antharas and Dragon Valley alternating PvP and Normal  every hour 6:00PM-0:00AM      Website: https://www.l2imagination.com  Discord: https://discord.com/invite/frCaDM4Bhg
    • L2 ASAGONIUM - High Five heavily customised PVE Server [OPEN BETA] Website: http://l2asagonium.eu/ Hello everyone, After months of development, tuning and a lot of late nights, I'd like to introduce you to L2 Asagonium - a Lineage 2 High Five server built around one simple idea: a fair, long-lasting world where your time and skill matter more than your wallet. We are currently in OPEN BETA, which means the server is fully online, fully playable, and we are actively listening to feedback to polish the final experience before the official launch. ----------------------------------------------------------- ABOUT THE SERVER - Chronicle: High Five (Mobius) - Type: Really hard PVE with custom content - Status: Open Beta - join, test, shape the server - Mentality: No Pay-to-Win. Ever. ----------------------------------------------------------- WHAT MAKES ASAGONIUM DIFFERENT 1) Custom Armor & Weapon Sets We have introduced new tiers of equipment (Twilight, Cronos, Olympus, Exodus, Leviathan, Ixion, Assassin, Odyssey, Chaos, Immortal) with their own visuals, set bonuses and passive skills. Each set has a clear identity and a real role in the meta - no "one best set wins everything". 2) Custom Passive Skills New Asagonium passive skills (P.Atk, M.Atk, HP, Haste and more) tied to gear and progression, so character building has more depth than just stacking enchants. 3) Live Leaderboards on the Website This is the part I'm most proud of. Our website is connected directly to the game database in real time. You can browse all characters and see: - Level + exact % to next level - Online / Offline / Offline Farming status - "You Died" status (Dark Souls style, stays until next login) - Death counter per character - Total time played (days / hours / minutes) - Top Adena, Top PvP, Top PK - Max Enchant on equipped weapons - Hover a character name to see their passive skills with icons - Hover an enchant value to see the weapon name, P.Atk and set It updates live. Anyone can check the rankings without logging in. ----------------------------------------------------------- NO PAY-TO-WIN - SERIOUSLY I'm tired of servers that promise "balanced donations" and then sell the best items in the cash shop two weeks later. On Asagonium: - No donation items that affect gameplay balance. - No paid enchants, no paid stats, no paid gear. - No "VIP" buffs that make you stronger than free players. Donations (if/when they exist) will be strictly cosmetic and quality-of-life only. The goal is a server that survives because people enjoy playing it, not because a few whales fund it. ----------------------------------------------------------- OPEN BETA - WHY YOU SHOULD JOIN NOW - The server is fully online and stable. - Your feedback directly shapes the final balance. - You get to learn the custom content before everyone else. - Active development - bugs get fixed, ideas get tested fast. ----------------------------------------------------------- HOW TO JOIN 1. Go to http://l2asagonium.eu/ 2. Open "How to Connect" - it walks you through the client download, the 64-bit patch and the system config in 5 simple steps. ----------------------------------------------------------- LINKS http://l2asagonium.eu/ ----------------------------------------------------------- Thanks for reading. If you give Asagonium a try during the beta, please drop your feedback - good or bad. That's exactly what this phase is for. See you in-game.
  • 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..