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

    • NEW SEASON GRAND OPENING FROM - 10/07/2026, FRIDAY, 20:00 +3 GMT !
    • System folder is indeed missing @eMommy
    • No complicated KYC, instant setup after purchase!  Boost your connection speed and secure your privacy today!  Official Website: https://novproxy.com?kwd=tt-max
    • I don't know this guy and I don't care about him or the server. What I want to say I already do it. And yes, it does seem like he has some mental problems to make up these stories. 
    • L2JForge Edition Update Revision: V1.0.119  Update: 15 June – 1 July 2026  Fixes & Improvements Fixed PawnShop pagination and inactive Community Board actions. Added thread-safe caching to the PawnShop system. Fixed MMOTopVote vote tracking. Fixed PvP Event participant cleanup. Restored the missing PvP Ranking broadcast. Improved CTF flag handling and zone validation. Added Try Skin / Hat Preview handlers to the Community Board. Improved character skin appearance refreshes without requiring a restart. Improved NPC positioning to reduce train and collision abuse. Fixed Seal of Ruler casting from invalid artifact positions. Added stricter castle artifact, range and height validation. Fixed character restoration stability during Enter World. Reworked Community Board Home, Shop, Bosses and Events sections. Added live Raid/Epic Boss status and respawn information. Added upcoming PvP and GvG event schedules. Integrated character services, settings and statistics into the Community Board. Moved Vote Rewards from a voiced command into the Character Menu in Community Board. Removed the obsolete Achievements / .rewards system.  Removed unused multilingual resources and simplified datapack loading. Improved datapack startup and HTML cache stability. Added automatic build revision and build-date metadata. Reorganized runtime libraries and standardized generated server jars. Refined the Player, Creature, GameClient, Clan and Frintezza systems. Performed extensive source cleanup and reliability improvements. Updated build configuration and repository exclusions.  Work in Progress Development continues with additional gameplay fixes, performance improvements, system cleanup and more upgrades already in progress..
  • 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..