Jump to content

Recommended Posts

Posted (edited)

Well, this event, like the title says, is about hunting the PK. (easy to code but funny for players, at least for me xd)

How it works? Whenever someone of your server gets PK there is a chance of 1/X to start the event, if the PK is unlucky and the event starts, automatically appear one announcement saying, for example, "PkHunter Event started: Wyatt is the PK, write .gopk to teleport where the pk was done.". Then, all players except the PK can use the command .gopk to teleport to that area.

You can also use .pkinfo to know if you are far or near from the pk location.

The first player that kills the PK will win the event.

While you are the PK of the event you can't use /unstuck, teleport scrolls, summon skills, mount, logout, restart, etc. and the system set 900000 karma to you.

 

Does the PK has any survival chance? Yes, one way is killing mobs to remove ALL karma; if the PK gets 0 karma, the PK wins.

There is another way to finish the event: if mobs kill the PK, also with no winners.

If the time of the event passes and the pk is still alive, the PK wins.

 

It's coded for L2jServer H5 stable but can easy be adapted to any pack/chronicle.

 

 

V.1 - Tested

DP side

Core Side

 

V.2 - Mostly tested, awaiting for reports

Added Timer to end the event if nothing happens.

Added reward for the pk if he survives when time/karma is over.

Added command .pkinfo to know if you are near or far from the pk location.

Added L2SkillTeleport instead of teleToLocation(), to move to event area.

DP side

Core Side

 

 

 

Credits: Wyatt

Location command: Leluche

Edited by ^Wyatt
  • Upvote 1
Posted

Quite good idea, but the PK guy won't be happy when he get killed and drop some nice items.. :D

 

As I see, there is only reward for killing the PK guy, right? I think there should be also a reward for survival :D

Posted

Quite good idea, but the PK guy won't be happy when he get killed and drop some nice items.. :D

Yep but in the event the Pk is protecting about dropping.

Nice that u told it coz I forgot to add it to the patch, I'm editing it in some minutes :P.

Posted

Yep but in the event the Pk is protecting about dropping.

Nice that u told it coz I forgot to add it to the patch, I'm editing it in some minutes :P.

 

Ohh, that's good. But from the other hand, not rly. Maybe make it configurable :)

 

Also, why not to let him mount a strider for example, he will have more chances to survive :D

Posted

Ohh, that's good. But from the other hand, not rly. Maybe make it configurable :)

 

Also, why not to let him mount a strider for example, he will have more chances to survive :D

That's up to users then, don't add the mount restriction XD I won't create 1000 configs, it's boring t.t...

 

edit:updated with the pk drop thing

Posted

There's some duration in this event? If the PK manage to get in a peace zone or restart/logout the event will keep run?

Yep there isn't but i'll update it with this kinda things I forgot in a v2. I'll put a timer, X minutes by config.

Btw if he manages to restart the event finishes.

 

Edit: there you go :D V.2

Posted

No found :S

 

Index: java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java

===================================================================

--- java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java (revision 5822)

+++ java/com/l2jserver/gameserver/network/clientpackets/RequestRestartPoint.java (working copy)

@@ -28,6 +28,7 @@

import com.l2jserver.gameserver.model.entity.Castle;

import com.l2jserver.gameserver.model.entity.ClanHall;

import com.l2jserver.gameserver.model.entity.Fort;

+import com.l2jserver.gameserver.model.entity.PkHunterEvent;

import com.l2jserver.gameserver.model.entity.TvTEvent;

import com.l2jserver.gameserver.model.entity.clanhall.SiegableHall;

 

@@ -76,6 +77,10 @@

if (TvTEvent.isStarted() && TvTEvent.isPlayerParticipant(activeChar.getObjectId()))

return;

 

+ if (PkHunterEvent.isPk(activeChar))

+ {

+ return;

+ }

//SystemMessage sm2 = SystemMessage.getSystemMessage(SystemMessage.S1_S2);

//sm2.addString("type:"+requestedPointType);

//activeChar.sendPacket(sm2);

 

Posted

Wow very interesting! You don't see such ideas very often. Here's some changes I propose :

 

1)Make the pk lose gear if he dies. There's no better survival motivation than protecting your gear. Else the PK will just die to get done with it and go do his things.

 

2).gotopk command should only move you to the location that the pk happened, not where the PK is. Also the command should be available about 20-30 secs after the pk has happened. This gives the pk some time to make a run for it.

 

3)The event should be on a timer, lets say 30 mins. If in 30 mins people can't get the pk, he wins and he gets some very very good prize.

 

4)Add a locate command so as people can see where the pk is going. I will contribute that command from my private collection :P

 

package org.bitbucket.customacis.herosystem.handlers;

import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.util.Util;

public class LocateHandler implements IVoicedCommandHandler{

@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar,
		String params) {

	if(params == null)
	{
		activeChar.sendMessage("Usage: .locate <playername> | Example: .locate xXBestArcherXx");
		return false;
	}

	L2PcInstance target = L2World.getInstance().getPlayer(params);

	if(target == null)
	{
		activeChar.sendMessage(params +" is not online.");
		return false;
	}

	double angle = activeChar.getHeading()/182.044444444;

	double angle2 = Util.calculateAngleFrom(activeChar, target);

	String location = "";
	String distance = "";

	double finalAngle = angle - angle2;

	if(finalAngle < 0)
		finalAngle +=360;

	double octamore = 22.5;

	if(finalAngle>=octamore*15 && finalAngle <octamore*17)
	{
		location = "infront of you";
	}
	else if(finalAngle >= octamore*1 && finalAngle < octamore * 3)
	{
		location = "infront of you on your left";
	}
	else if(finalAngle >= octamore*3 && finalAngle < octamore * 5)
	{
		location = "on your left";
	}
	else if(finalAngle >= octamore*5 && finalAngle < octamore * 7)
	{
		location = "behind you on your left";
	}
	else if(finalAngle >= octamore*7 && finalAngle < octamore * 9)
	{
		location = "behind you";
	}
	else if(finalAngle >= octamore*9 && finalAngle < octamore * 11)
	{
		location = "behind you on your right";
	}
	else if(finalAngle >= octamore*11 && finalAngle < octamore * 13)
	{
		location = "on your right";
	}
	else if(finalAngle >= octamore*13 && finalAngle < octamore * 15)
	{
		location = "infront of you on your right";
	}

	double dist = Util.calculateDistance(activeChar, target, false);

	if(dist < 400)
		distance = "very close";
	else if(dist < 1000)
		distance = "close";
	else if(dist < 4000)
		distance = "at medium range";
	else if(dist < 12000)
		distance = "quite some distance away";
	else if(dist < 20000)
		distance = "far away";
	else
		distance = "very very far away";
		activeChar.sendMessage(target.getName()+ " is " + location + " "+ distance+".");
	return false;
}

@Override
public String[] getVoicedCommandList() {

	return new String[]{"locate"};
}

}

 

Adjust it accordingly.

Posted

Wow very interesting! You don't see such ideas very often. Here's some changes I propose :

 

1)Make the pk lose gear if he dies. There's no better survival motivation than protecting your gear. Else the PK will just die to get done with it and go do his things.

2).gotopk command should only move you to the location that the pk happened, not where the PK is. Also the command should be available about 20-30 secs after the pk has happened. This gives the pk some time to make a run for it.

3)The event should be on a timer, lets say 30 mins. If in 30 mins people can't get the pk, he wins and he gets some very very good prize.

4)Add a locate command so as people can see where the pk is going. I will contribute that command from my private collection :P

1-I already put the config to set if the pk can drop or not

2-the command is only moving where the pk happened yes >_< and about the delay I dunno if I'll add it, I don't like at all the idea

3-the timer is already added too! i'll add the reward for the pk if survives ok

4-I like it, i'll try use it

Posted

30 secs delay might be a lot indeed, but clearly 0 isnt that great either. Cause once the pk happens, everyone will use the command to get to the pk really fast and kill him before he can even move. If I was a player, I would set the command in macro and once I see the event message, BOOM press the command get there kill him before he can make a run for it.

 

Oh, HAMBURGERS!  in 1:50 till the end. ;)

 

PS: For those that didn't see the southpark episode, Butters lost the PK Event ;)

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

    • these are all my interfaces)
    • Updates:    Revision 568: 2020-10-28 Fix: -Mp potions thanks to RuLLezZ for report. -Archangels(Baium) attack. -geonegine doors npe. -geoengine layer correction. -boats are now properly working. -max enchant protection ,thanks to RuLLezZ-Fortitude for report. -character selection enchant effect,thanks to RuLLezZ-Fortitude for report. -multisell exploit. -SevenSigns leak-optimize. -pledge visual packet. -Party match room unhardcoded newid. -party match room auto join l2off like. Skills fix: -Force Meditation. -skill type: TARGET_MULTIFACE properly working. Rework: -sql connection pt2. -community board ClanList.java (from 120 lines to 65) -community board CastleStatus.java -community board RaidList.java optimize: -sql: player item restore. -Cboard HeroList update every 4 hours(avoid to execute sql connection on click.) Remove: -top players from cboard(and kept the one from rank system, in order to work you must enable the rank system) -   Revision 569: 2020-12-14 Fix: -npe onMagicFinalizer. -FrequentSkill npe. -Cyrillic characters support in cboard ,thanks to Fortitude for report. -255 tutorial message,thanks to Fortitude for report. -cboard switch typo,thanks to Fortitude for report. -multiply statement , thanks to Fortitude for report. -allow to interact with dead monsters to use "sweep" correctly. -potions are now visible under buffs(l2off like). -hp-mp negative value. -optimize-fix updateAbnormalEffect unnecessary packet broadcast. now it will send the update only if abnormal effects are in use or effected by somone,which is lead to a huge broadcast optimize. Monster behavior: -onAggression remove minion assist(l2 off like), -onAggression minions are following master and attacking only when we attack master-minion.tested on advext. Skills fix: -lure(skill) behavior on monster,thanks nijota for report. Rework: CharEffectList.java optimize: (Custom)EventEgnine: "asynchronize" teleport to avoid massive lag. -   Revision 570: 2021-04-11 Fix: -client-server desync(jump backward ,weird effect) while pressing attack and try to move away. -npe on player protection. -npe on summon magic skill use. -npe on use item. -on duel: you can attack summons properly.(with same duel id) -on duel finish: summons are now stop attacking and return to their owner. -soulshot properly usage after finish casting. -party member position. thanks Cibo for report. -combat-chase movement system. -Antharas-Valakas Shock skill effect l2off like. -properly remove cubics on restart-logout. -status update avoid sending unnecessary packets. -On equip-unequip item avoid sending unnecessary packets. -Revert L2GamePacketHandler.java to switch method. -shortcut doubling(properly update). thanks to ragef for report. -Event engine teleport , thanks to daffynash for report. Quest fix: -Q115_TheOtherSideOfTruth: Misa Spawn at night. thanks Cibo for report. -Q648_AnIceMerchantsDream: Steward on talk html. thanks Cibo for report. Skills fix: -augment stack. Rework: -Friend system (client-server packets l2off like). -   Revision 571: 2021-09-11 Bug fix: -avoid following target after restart-logout , thanks to EXCLUS1VE for report. -pick up stuck , thanks to EXCLUS1VE for report. -summon patk/matk speed visual animation. -summon attack request , thanks to EXCLUS1VE for report. -effect relax , thanks to EXCLUS1VE for report. -formulas hitmiss , thanks to EXCLUS1VE for report. -Social action request , thanks to EXCLUS1VE for report. -cubic attack , thanks to EXCLUS1VE for report. -Party match room chat, thanks to EXCLUS1VE for report. -pick up issue , thanks to EXCLUS1VE for report. -pet npe, thanks to EXCLUS1VE for report. Rework: -player template. -skilltreedata. -RequestAquireSkill. -RequestAquireSkillInfo. -RequestExEnchantSkill. -RequestExEnchantSkillInfo. -AcquireSkillList. -ExEnchantSkillList. Optimize: -players got their own getMoveSpeed getter , and triggers when speed change by user(walk/run commands) or buff-debuff, that way we avoid unnecessary speed calculation by updateposition task that literaly spam the calculators. -castle traps are optimized and enabled. damage calculation formula: -blow damage position bonus. -when you make a magic critical hit, the magic damage is now tripled. -melee normal attack Damage position bonus. Implement: -new vote api system.(npc-> //spawn 61) Organization: FenceManager moved in -> datatables/xml and rename to FenceData. Remove: -old antibot system and kept only one as main. -old vote system. -   Revision 572: 2022-01-08 fix -Elroki , ToIVortex , Pagan , Oracle teleporters. -shop distance(sell-buy) bug, thanks to exclusive for report. -Monster Derby Track teleport. thanks to lorka for report. -MissQueen multisell coupon. thanks to lorka for report. -Olympiad spectator error thanks to magister for report. -Quest ShowResult replace objId instead name. -html over 200++ corrections typo - bypass. -(Custom config) DAGGERS-ARCHERS wear HEAVY-LIGHT on use item unequip equipped item if config is false , to avoid stuck , thanks to exclusive for report. -Npe on connection close , thanks to exclusive for report. -Herbs auto destroy , thanks to exclusive for report. Spawn: -Implement L2off spawn data and territory system. -xml spawn list added inside datapack data/xml/spawn. -Sql spawn list has been merged with new spawn system and manage only the custom admin //spawn. -Territory Monsters randomly spawn in their territory. -Shift click on monters -> "visual" will allow you to check their territory. Skill fix: -fixed all chance skills. Optimize: -NpcData.java -PetNameTable -Siege(tasks - sql connection) Implement: -Server-Player Variable -ClientSetTime packet. -AttackDeadTarget packet. -AttackinCoolTime packet. -AttackOutOfRange packet. Rework: -L2BossSpawnInstance Clean up - Delete: -remove L2ProtectorInstance. -remove unused configs. -remove AdminUnblockIp. -remove VipTeleportCmd. -AdminCommands.xml clean up. Organization: -AutoSpawnHandler,L2Spawn,SpawnData,SpawnTerritory moved inside gameserver.model.spawn . Dont forget: to update your databse and use geodata!!! is important for the new spawn system! -   Revision 573-574: 2022-02-04 fix -Herbs auto destroy time (14 seconds) -Clan skills learn npe , thanks to Ziklis for report. -potions visual bug , thanks to Ziklis for report. Optimize: -Quest engine. -Hero engine. -SevenSigns. -Event engine. Implement: -Siegable Clan Halls (from l2j thanks to Zoey76) you can use //siege ingame for test. -Spawn data spawn_bydefault field. -CustomSpawnManager (holds npc spawn data by field "spawn_bydefault" that equals false) Clean up - Delete: -delete:EventStats.java -delete:pmoff - tradeoff handlers and merge in one (.menu voiced) -spawnlist old sql file. -   Revision 575: 2022-05-14 Fix: -Clan Skills , thanks to shush for report. -Olympiad doDie error , thanks to shush and Elliot for report. -backstub 100 % succes if attacker is behind of target. -player siege state status update. -CrownManager unhardcoded checkCrowns. -   Revision 576: 2022-07-21 Fix: -Elven Fortress teleport. thanks to JMD for report. -Traders when geodata enabled. thanks to JMD for report. -Summon Cp Potion(skills store-restore has been fixed) thanks to Noone4 for report. -Elixir reuse time , to Noone4 for report.   - Revision 577: 2022-09-25 Fix: -Drop item location.(items cannot be dropped inside wall etc, geodata must be enabled) -Hero count. Npc -Dark Choir Lancer heigh correction -Dark Choir Captain heigh correction Misc Ai: -Implement NpcWalkerTaskManager(handle npc walker ai). Misc: -isNewBie delete config-sql-getters and now depends on level. -TopRankManager is now available(merged with community board) holding stats for top players pvp-pk etc. -   Revision 578: 2022-11-07 Misc: Sql typo , thanks to noone4. Rework: -Balancer.(also save button added at the bottom) - Revision 579: 2023-03-28 Fix: -Multisell ingredient for clan points, thanks to noone4 for report. -Raid respawn time, thanks to noone4 for report. -Quest delay , thanks to noone4 for report. -Minion respawn task, thanks to noone4 for report. Rework: -Achievement Engine.(rework and optimize). -Couple - Wedding Manager.(rework and optimize). Delete: -WeddingCmd (voiced command) , wedding is now available only on npc manager. Dont forget to update your sql tables and config files.    -   Revision 580: Fix: -Start creatures AI only when they are in active region. -Subclass : In order to change the base class you can only manage it by using the master with the same type, thanks  to noone4 for report. -olympiad check item restriction and unharcoded. -monster properly delete by admin command , thanks to noone4 for report. -Zaken properly attack. thanks to l2valhalla for report. -QueenAnt nurse heal. thanks to l2valhalla for report. -Door region check to avoid stuck while wallking through.thanks to l2valhalla for report. -Rain of Fire (1296) skill radius , thanks to millerose for report. -Frost Wall (1174) skill radius , thanks to millerose for report. -RaidBossSpawnManager calendar replaced with system current time millis. -VIPTvT npe on selectNewVipOfTeam , .thanks to l2valhalla for report. -onActionShift spawn-territory npe. -L2Party properly change party leader. -AutoAttackable class cast exeption. -RequestMagicSkilluse AIOB. -L2StaticObjectInstance npe. Rework: -Project update to java 17.(you can download latest jdk version here: https://adoptium.net/temurin/releases/ ) -Remove MysqlConnector and implement MariaDb. -GeoEngine.(currently working only with l2j type , download the new geodata here: https://www.mediafire.com/file/c2tvxwt5bz086jh/geodata.rar/file ) -DoorData. -Geometry algorithm. -SQL account manager. -CustomSpawnManager(Handle npcs-monsters that are not spawned by default via xml spawn.) -L2Skill.java getTargetList rework and cleanup : case TARGET_AURA , case TARGET_AREA , case TARGET_MULTIFACE , case TARGET_PARTY ,  avoid unnecessary - heavy tasks(optimized). -Impement: -Support api for https://l2rankzone.com/ . -Admin Bookmark. -FakePlayer Chat. Organise: -CustomSpawnManager moved inside -> gameserver.model.spawn Delete: -Unused libs.   Revision 581: Fix -Fishing skill list properly show, thanks to ByDenisko for report. -Multisell enchanted items , thanks to ByDenisko for report. -Drop range between mercenary tickets. -Break Duress skill(461) , thanks to DevilMStar for report. -Interact-pickup tickets , thanks to DevilMStar for report. Rework: -refreshExpertisePenalty to avoid unnecessary calculation. -Mercenary tickets. -ClanGate skill handler.   -   Revision 582: Fix: -Siege guard aggro due to the last rework , thanks to ByDenisko for report. -Siege zone , thanks to ByDenisko for report. -Trade npe , thanks to ByDenisko for report. -Olympiad port player back position. -Antharas CCE , thanks to ByDenisko for report. -Interact exception , thanks to ByDenisko for report. -interact-pick up: action denied if the player is dead-fakedeath. (players can still interact with NPCs, but they must be within the designated interaction distance.) Rework: -Skills Array to ConcurrentSkipListMap. -L2AttackableAI think to avoid unnecessary - heavy tasks. Implement: -AutoSaveTaskManager. -AiThinkTaskManager wich handle attackable think. -Check for Event engine to activate-deactivate. -Admin zone cretion. Organization: -Rename gameserver.scrips -> gameserver.scripts   -   Revision:583 Java 21 ,DropItem-protection,ThreadPoolManager,Geongine,AdminTeleport,TopRankmanager Java 21: -The project has transitioned to Java (JDK) 21 for improved performance and features. Fix: -TopRankManager added snap list to avoid empty list while updating. -TopRankManager npe. -BookMark Teleport. -Siege: Allow pray only on the artifact spot. -Olympiad hp npe -Olympiad ip check npe -Olympiad teleport back npe Rework: -Reworked the whole Drop Protection concept and eliminated the need for synchronized methods and multiple tasks for each item.  The process is now centralized under a single manager: DropProtectionManager which centrally manages all items by one task for optimal efficiency. GeoEngine: -Maxiterations are now depends on mapsize and limit them to 13500. ThreadPoolManager: -ThreadPoolManager is now using java virtual pools.   -   Revision:584(latest 24/8/2025) RespawnTaskManager,TradeController,MerchantTaskManager,StatusListenerManager,FollowTaskManager,ItemAutoSaveTaskManager Rework: -Refactored inventory save system for improved efficiency The entire inventory save system has been restructured to eliminate redundancy and enhance performance. Previously, each item triggered its own database save Connection task (e.g., on equip, unequip, drop, add, etc.), resulting in overhead and complexity. Now, a centralized ItemAutoSaveTaskManager handles all pending item saves through a single, unified SQL connection task. -The entire creature respawn system has been restructured to eliminate redundant tasks and improve efficiency. Previously, each creature had its own separate respawn task, leading to potential overhead and complexity. Now, a centralized RespawnTaskManager handles all pending creature respawns through a single task. -TradeController has been restructured to eliminate redundant tasks by using MerchantTaskManager(same optimization as creature spawn) -StatusListenerManager now handles broadcast of statusUpdate(hp) -FollowTaskManager handles all following creatures through a single task. Fix: -clan hall buff support. thanks to Almaz. -Valakas Teleport. thanks to Almaz.  SQL Connection: Update MariaDB connector to 3.5.4          
    • isnt his i also find it on l2ketrawars  https://imgur.com/a/4BMldRQ someone lock the topic ,solved!
    • You might also take https://github.com/vercel-labs/agent-skills into consideration
    • Hay Algun datapack de L1 OFF ? 
  • 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..

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