Jump to content

Recommended Posts

Posted

update

 

Fix Trade pou eixate problima kai eixa 3exasi na anebaso to Dm event gi ayto mporei kapoia paidia na eixan kapoia error

 

Timeline

Flash 9a mpwrouses na m apantisis sto mnm pou s exw afisi gia t topic s? Thnx
Posted

Flash 9a mpwrouses na m apantisis sto mnm pou s exw afisi gia t topic s? Thnx

 

exo fix ayta me ta phx pou einai gnosta exo perasei kai ena java so warehouse  pou otan baleis items kai  pas na ta pareis 8elei 10s exo fix polla pragmata mporeis na deis kai st o timeline pou  edwsa poio pano  to noobish k ta server attacker  den ta exo fix akoma aytes tis meres 8a ta fix kai 8a einai ok to pack :P

Posted

exo fix ayta me ta phx pou einai gnosta exo perasei kai ena java so warehouse  pou otan baleis items kai  pas na ta pareis 8elei 10s exo fix polla pragmata mporeis na deis kai st o timeline pou  edwsa poio pano  to noobish k ta server attacker  den ta exo fix akoma aytes tis meres 8a ta fix kai 8a einai ok to pack :P

mporo na sta fix ego ;)

Posted

flash m vgazei ena error sto eclipse... sto com.Flash.gameserver.hadler kai akrivws sto AdminComandHadler.java ... ti error einai afto??? lookareto mia plzzz i pes m mipws einai diko m prob...

Posted
package com.Flash.gameserver.handler;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Logger;

import javolution.util.FastMap;
import com.Flash.Config;
import com.Flash.gameserver.handler.admincommandhandlers.AdminDMEngine;   <------- edw einai to error..
import com.Flash.gameserver.model.actor.instance.L2PcInstance;

/**
* This class ...
*
* @version $Revision: 1.1.4.5 $ $Date: 2005/03/27 15:30:09 $
*/
public class AdminCommandHandler
{
private static Logger _log = Logger.getLogger(AdminCommandHandler.class.getName());

private static AdminCommandHandler _instance;

private Map<String, IAdminCommandHandler> _datatable;

   //Alt privileges setting
   private static Logger _priviLog = Logger.getLogger("AltPrivilegesAdmin");
   private static FastMap<String,Integer> _privileges;

public static AdminCommandHandler getInstance()
{
	if (_instance == null)
	{
		_instance = new AdminCommandHandler();
	}
	return _instance;
}

private AdminCommandHandler()
{
	_datatable = new FastMap<String, IAdminCommandHandler>();
	registerAdminCommandHandler(new AdminDMEngine());
}

public void registerAdminCommandHandler(IAdminCommandHandler handler)
{
	String[] ids = handler.getAdminCommandList();
	for (int i = 0; i < ids.length; i++)
	{
		if (Config.DEBUG) _log.fine("Adding handler for command "+ids[i]);
		_datatable.put(ids[i], handler);
	}
}

public IAdminCommandHandler getAdminCommandHandler(String adminCommand)
{
	String command = adminCommand;
	if (adminCommand.indexOf(" ") != -1) {
		command = adminCommand.substring(0, adminCommand.indexOf(" "));
	}
	if (Config.DEBUG)
		_log.fine("getting handler for command: "+command+
				" -> "+(_datatable.get(command) != null));
	return _datatable.get(command);
}

   /**
    * @return
    */
   public int size()
   {
       return _datatable.size();
   }

   public final boolean checkPrivileges(L2PcInstance player, String adminCommand)
   {
       //Only a GM can execute a admin command
       if (!player.isGM())
           return false;

       //Skip special privileges handler?
       if (!Config.ALT_PRIVILEGES_ADMIN || Config.EVERYBODY_HAS_ADMIN_RIGHTS)
           return true;

       if (_privileges == null)
           _privileges = new FastMap<String,Integer>();

       String command = adminCommand;
       if (adminCommand.indexOf(" ") != -1) {
           command = adminCommand.substring(0, adminCommand.indexOf(" "));
       }

       //The command not exists
       if (!_datatable.containsKey(command))
           return false;

       int requireLevel = 0;

       if (!_privileges.containsKey(command))
       {
           //Try to loaded the command config
           boolean isLoaded = false;

           try
           {
               Properties Settings   = new Properties();
               InputStream is          = new FileInputStream(Config.COMMAND_PRIVILEGES_FILE);
               Settings.load(is);
               is.close();

               String stringLevel = Settings.getProperty(command);

               if (stringLevel != null)
               {
                   isLoaded = true;
                   requireLevel = Integer.parseInt(stringLevel);
               }
           }
           catch (Exception e) { }

           //Secure level?
           if (!isLoaded)
           {
               if (Config.ALT_PRIVILEGES_SECURE_CHECK)
               {
                   _priviLog.info("The command '" + command + "' haven't got a entry in the configuration file. The command cannot be executed!!");
                   return false;
               }

               requireLevel = Config.ALT_PRIVILEGES_DEFAULT_LEVEL;
           }

           _privileges.put(command,requireLevel);
       }
       else
       {
           requireLevel = _privileges.get(command);
       }

       if (player.getAccessLevel() < requireLevel)
       {
           _priviLog.warning("<GM>" + player.getName() + ": have not access level to execute the command '" + command +"'");
           return false;
       }

       return true;
   }

gia lookare gt dn 3erw gt m to vgazei proti fora m to vgazei afto edw....

Posted

to fixara ego pedes.kante checkout pali.opos l2jattacker fixed.tora exoume to noobish error.se 5 lepta 8a ine gg

Posted

to fixara ego pedes.kante checkout pali.opos l2jattacker fixed.tora exoume to noobish error.se 5 lepta 8a ine gg

to fixares?? katse na dw k tha sou pw...
Guest
This topic is now closed to further replies.



  • Posts

    • what pack you use  send me on discord for it
    • package custom.events.RandomZoneEvent; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.concurrent.ScheduledFuture; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.commons.time.SchedulingPattern; import org.l2jmobius.commons.time.TimeUtil; import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.managers.ZoneManager; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.quest.Event; import org.l2jmobius.gameserver.model.zone.ZoneId; import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.model.zone.type.RandomZone; import org.l2jmobius.gameserver.util.Broadcast; /** * Random Zone Event - Activates one random PvP zone temporarily. No modifica la clase de la zona: usa flags PvP en runtime. * @author Juan */ public class RandomZoneEvent extends Event { private static final String CONFIG_FILE = "data/scripts/custom/events/RandomZoneEvent/config.xml"; private static int EVENT_DURATION_MINUTES = 15; private static boolean _isActive = false; private ScheduledFuture<?> _eventTask = null; private final List<ZoneType> _availableZones = new ArrayList<>(); private ZoneType _activeZone = null; public RandomZoneEvent() { loadConfig(); loadZones(); registerZoneListeners(); } /** * Registra listeners a TODAS LAS ZONAS random */ private void registerZoneListeners() { for (ZoneType zone : _availableZones) { addEnterZoneId(zone.getId()); addExitZoneId(zone.getId()); LOGGER.info("[RandomZoneEvent] Registered listener for zone: " + zone.getName()); } } private void loadConfig() { new IXmlReader() { @Override public void load() { parseDatapackFile(CONFIG_FILE); } @Override public void parseDocument(Document doc, File file) { forEach(doc, "event", eventNode -> { final StatSet att = new StatSet(parseAttributes(eventNode)); final String name = att.getString("name"); for (Node node = eventNode.getFirstChild(); node != null; node = node.getNextSibling()) { if ("schedule".equals(node.getNodeName())) { final StatSet attributes = new StatSet(parseAttributes(node)); final String pattern = attributes.getString("pattern"); final SchedulingPattern schedulingPattern = new SchedulingPattern(pattern); final StatSet params = new StatSet(); params.set("Name", name); params.set("SchedulingPattern", pattern); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer("Schedule_" + name, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Event " + name + " scheduled at " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } }); } }.load(); } private void loadZones() { for (ZoneType zone : ZoneManager.getInstance().getAllZones(RandomZone.class)) { if ((zone.getName() != null) && zone.getName().toLowerCase().startsWith("random_zone")) { _availableZones.add(zone); LOGGER.info("[RandomZoneEvent] Loaded zone: " + zone.getName() + " (id=" + zone.getId() + ")"); } } LOGGER.info("[RandomZoneEvent] Total random zones loaded: " + _availableZones.size()); } @Override public void onTimerEvent(String event, StatSet params, Npc npc, Player player) { if (event.startsWith("Schedule_")) { eventStart(null); final SchedulingPattern schedulingPattern = new SchedulingPattern(params.getString("SchedulingPattern")); final long delay = schedulingPattern.getDelayToNextFromNow(); getTimers().addTimer(event, params, delay + 5000, null, null); LOGGER.info("[RandomZoneEvent] Rescheduled for " + TimeUtil.getDateTimeString(System.currentTimeMillis() + delay)); } } @Override public boolean eventStart(Player eventMaker) { if (_isActive) { if (eventMaker != null) { eventMaker.sendMessage("RandomZoneEvent already active."); } return false; } if (_availableZones.isEmpty()) { Broadcast.toAllOnlinePlayers("[RandomZoneEvent] No zones configured."); return false; } _isActive = true; Broadcast.toAllOnlinePlayers("⚔️ Random Zone Event has started!"); _eventTask = ThreadPool.schedule(this::activateRandomZone, 5_000); return true; } private void activateRandomZone() { _activeZone = _availableZones.get(new Random().nextInt(_availableZones.size())); _activeZone.setEnabled(true); Broadcast.toAllOnlinePlayers("🔥 Random Zone Event: " + _activeZone.getName() + " is now PvP for " + EVENT_DURATION_MINUTES + " minutes!"); _eventTask = ThreadPool.schedule(this::eventStop, EVENT_DURATION_MINUTES * 60 * 1000L); } @Override public boolean eventStop() { if (!_isActive) { return false; } _isActive = false; if (_eventTask != null) { _eventTask.cancel(true); _eventTask = null; } if (_activeZone != null) { _activeZone.setEnabled(false); Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended. " + _activeZone.getName() + " is back to normal."); _activeZone = null; } else { Broadcast.toAllOnlinePlayers("🏁 Random Zone Event ended."); } return true; } @Override public void onEnterZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, true); if (creature.isPlayer()) { creature.sendMessage("Esta zona está en modo PvP temporalmente."); } } } @Override public void onExitZone(Creature creature, ZoneType zone) { if (!_isActive || (_activeZone == null)) { return; } if ((zone == _activeZone) && creature.isPlayable()) { creature.setInsideZone(ZoneId.PVP, false); if (creature.isPlayer()) { creature.sendMessage("Abandonaste la zona PvP temporal."); } } } @Override public boolean eventBypass(Player player, String bypass) { return true; } @Override public String onEvent(String event, Npc npc, Player player) { return super.onEvent(event, npc, player); } @Override public String onFirstTalk(Npc npc, Player player) { return null; } public static void main(String[] args) { new RandomZoneEvent(); } } i have this but its not working
    • ZonePvPSpawnBossRadio=0 ZonePvPSpawnBossBarakiel=0 at the Customs.ini in L2Server folder. Im prety sure this is it because i had the same problem with you in cruma 1 floor for example and i couldn't fix it but i fixed it finally by changing these 2 lines
    • Siege Reward Start PM Msg Rework Config root BossDieAnnounce and BossDieSound in the L24Team.properties and Config.java files for global raid boss death notifications and sounds. Adds a new reward_list table to the DB.sql file to track castle rewards. Improves character creation logic for thread safety and validation. Adds extensive state checks to the RequestEnchantItem method to prevent enchantments during inappropriate player states. Fixed auto-attack animation bug (there was no attack animation, only damage animation) Clean Code Other fixes I forgot to list! Java 14 Fixed issue where deleting a character would prevent it from leaving the screen or being removed, or even after a delete CD (it would only exit when re-logging in or creating a new character). Added Premium System from the other C2 project (Needs testing and improvement). Added the "Improved" Community Board (incomplete).
  • 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