Jump to content

Recommended Posts

Posted

2)AION pvp system(delay)

 

 

can you provide some more informations/stuff about this feature?I want some fresh ideas and I currently lack of

Posted (edited)

Another one, every Sunday a ship passes from from a wellknown location, players get on the ship and the ship goes to a custom location, there is a castle like area where you fight against mini bosses, raid bosses and grand raid bosses. When the epic grand raid boss gets killed the "siege" ends, players are ported back and rewarded(clan reward) or the reward can be a passive boosted skill reward (according on egrb killer) on race(human elf etc). Drops of the rbs can be clones of s armors with Class SAs(ranger,assasin,dualist,archmage etc) or custom scrolls where you can add special pvp effect on your armor! Another one can be mini boss with a key as drop. Then the player can open a specific chest somewhere hidden in the map. Reward may be enchant scrolls or a custom item.(chest should change locations every day). Heh I have many ideas...

Edited by kostantinosftw
Posted (edited)

don't you think it's better to be done with a sql table? 

Say what?

 

You can simply use AntiFeedManager from l2jserver or so.

Edited by SweeTs
Posted (edited)

it actually replace the antifeedManager plus "protect" the server economy (in case the players needs the pvps) from noobish players get killed and killed.. i don't think it needs further explanation.

 

 

Edit: Yea it is what I asked for! :DDDDDDDDDD  (going to test it)

 

Edit2: yep, awesome!!!

Edited by kostantinosftw
Posted (edited)

Well this is a feature i make for my last server, as i remember it works like that:

 

When you kill a player, a point is added in your name for that player. A task begins to make the points 0 after x seconds. If you kill him again before the x seconds pass, another point is added. This goes on and if you reach y points for that player, without them being nullified, a pvp protection starts for z minutes, where you won't take pvp points at that time when killing the specific player.

 

The times/points (x, y, z) are hardcoded, if you need help editing them tell me.

 

 

I don't see why there should be a sql table for that, except for the protections that are currently active, but i save players' names in order to avoid errors(exit game, restart or stuff) with L2PcInstance objects. (w00t if someone changes his name while protection is active :D:D)

Edited by An4rchy
Posted

Well this is a feature i make for my last server, as i remember it works like that:

 

When you kill a player, a point is added in your name for that player. A task begins to make the points 0 after x seconds. If you kill him again before the x seconds pass, another point is added. This goes on and if you reach y points for that player, without them being nullified, a pvp protection starts for z minutes, where you won't take pvp points at that time when killing the specific player.

 

The times/points (x, y, z) are hardcoded, if you need help editing them tell me.

 

 

I don't see why there should be a sql table for that, except for the protections that are currently active, but i save players' names in order to avoid errors(exit game, restart or stuff) with L2PcInstance objects. (w00t if someone changes his name while protection is active :D:D)

Why not the objectId at all? Just asking ^_^

Posted (edited)

May I ask for something else?  Looks like quite easy.

 

Player speaks with a NPC(presses a command), player controls are disabled and automatic follow a route. When the route ends player gain back access.

<route id="1" X="111160" Y="219672" Z="-3672" />
<route id="2" X="111240" Y="219160" Z="-3544" />
<route id="3" X="112664" Y="219048" Z="-3536" />
<route id="4" X="112776" Y="217784" Z="-3736" />
<route id="5" X="114504" Y="217896" Z="-3624" />
<route id="6" X="115640" Y="219272" Z="-3656" />
<route id="7" X="119048" Y="219272" Z="-3560" />
<route id="8" X="120104" Y="217608" Z="-3520" />
<route id="9" X="121896" Y="218456" Z="-3512" />
<route id="10" X="122456" Y="219384" Z="-3400" />
<route id="11" X="122680" Y="220456" Z="-3160" />
<route id="12" X="121992" Y="221768" Z="-2992" />
<route id="13" X="121144" Y="224104" Z="-3144" />
<route id="14" X="122184" Y="226696" Z="-3192" />
<route id="15" X="122488" Y="228424" Z="-2936" />
<route id="16" X="124248" Y="230072" Z="-2568" />
<route id="17" X="124408" Y="231480" Z="-2112" />
<route id="18" X="124424" Y="232568" Z="-1856" />
<route id="19" X="124424" Y="234904" Z="-1736" />
<route id="20" X="124408" Y="237288" Z="-1864" />
<route id="21" X="123768" Y="237592" Z="-1912" />
<route id="22" X="119496" Y="238152" Z="-2296" />
<route id="23" X="118552" Y="238664" Z="-1984" />
<route id="24" X="118008" Y="239688" Z="-1808" />
<route id="25" X="117576" Y="241496" Z="-1448" />
<route id="26" X="116216" Y="243768" Z="-1096" />
edit: I know it requires a change on the npcinstance to add the following command, and if it's pressed it will trigger a method, where should it be stores? script like ships?
Edited by kostantinosftw
Posted

 

May I ask for something else?  Looks like quite easy.

 

Player speaks with a NPC(presses a command), player controls are disabled and automatic follow a route. When the route ends player gain back access.

<route id="1" X="111160" Y="219672" Z="-3672" />
<route id="2" X="111240" Y="219160" Z="-3544" />
<route id="3" X="112664" Y="219048" Z="-3536" />
<route id="4" X="112776" Y="217784" Z="-3736" />
<route id="5" X="114504" Y="217896" Z="-3624" />
<route id="6" X="115640" Y="219272" Z="-3656" />
<route id="7" X="119048" Y="219272" Z="-3560" />
<route id="8" X="120104" Y="217608" Z="-3520" />
<route id="9" X="121896" Y="218456" Z="-3512" />
<route id="10" X="122456" Y="219384" Z="-3400" />
<route id="11" X="122680" Y="220456" Z="-3160" />
<route id="12" X="121992" Y="221768" Z="-2992" />
<route id="13" X="121144" Y="224104" Z="-3144" />
<route id="14" X="122184" Y="226696" Z="-3192" />
<route id="15" X="122488" Y="228424" Z="-2936" />
<route id="16" X="124248" Y="230072" Z="-2568" />
<route id="17" X="124408" Y="231480" Z="-2112" />
<route id="18" X="124424" Y="232568" Z="-1856" />
<route id="19" X="124424" Y="234904" Z="-1736" />
<route id="20" X="124408" Y="237288" Z="-1864" />
<route id="21" X="123768" Y="237592" Z="-1912" />
<route id="22" X="119496" Y="238152" Z="-2296" />
<route id="23" X="118552" Y="238664" Z="-1984" />
<route id="24" X="118008" Y="239688" Z="-1808" />
<route id="25" X="117576" Y="241496" Z="-1448" />
<route id="26" X="116216" Y="243768" Z="-1096" />
edit: I know it requires a change on the npcinstance to add the following command, and if it's pressed it will trigger a method, where should it be stores? script like ships?

 

I'm working on something like this, the only difference is that I'm using the FlyToLocation packet... if you know what I mean :lol:

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

    • 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
  • 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