Skip to content

[Share] Tvt Event

Featured Replies

TvT event engine

 

http://pastebin.com/1VnF6RP0

events.config

#---------------------------------------------------------------
# Team vs. Team Event Engine                     -
#---------------------------------------------------------------
# enable TvTEvent
TvTEventEnabled = True
# Time Between TvT events (in minutes, 300 = 5 hours)
TvTEventInterval = 300
#  Registration timer (in minutes) from start of event.
TvTEventParticipationTime = 7
#  Event running time, in minutes
TvTEventRunningTime = 10
# TvT Event NPC Details (create a custom npc of type L2TvTEventNpc)
TvTEventParticipationNpcId = 70010
TvTEventParticipationNpcCoordinates = 83425,148585,-3406
# Minimum amount of players allowed in each team 
TvTEventMinPlayersInTeams = 1
TvTEventMaxPlayersInTeams = 20
# Level rules 
TvTEventMinPlayerLevel = 1
TvTEventMaxPlayerLevel = 80
# Teleport delay Timers (in seconds)
TvTEventRespawnTeleportDelay = 10
TvTEventStartLeaveTeleportDelay = 10
# First Team Details (name, start and death x,y,z tp point)
TvTEventTeam1Name = Melyni
TvTEventTeam1Coordinates = 148695,46725,-3414
# Second Team Details (name, start and death x,y,z tp point)
TvTEventTeam2Name = Raudoni
TvTEventTeam2Coordinates = 149999,46728,-3414
# Reward for winning team 
# itemId,amount;itemId,amount;itemId,amount;...
# no ";" at the start or end
TvTEventReward = 57,100000;5575,1000
# TvTEvent Rules
TvTEventTargetTeamMembersAllowed = true
TvTEventPotionsAllowed = false
TvTEventSummonByItemAllowed = false
# Door id's to close/open on start/end
# ex.: 1;2;3;4;5;6
# no ";" at the start or end
TvTEventDoorsCloseOpenOnStartEnd =
npcs.xml

<npc id="70010" idTemplate="31280" name="Sir Bastian" title="Event Manager">
		<set name="level" val="70"/>
		<set name="radius" val="8"/>
		<set name="height" val="23"/>
		<set name="rHand" val="0"/>
		<set name="lHand" val="0"/>
		<set name="type" val="L2TvTEventNpc"/>
		<set name="exp" val="0"/>
		<set name="sp" val="0"/>
		<set name="hp" val="2444.46819"/>
		<set name="mp" val="1345.8"/>
		<set name="hpRegen" val="7.5"/>
		<set name="mpRegen" val="2.7"/>
		<set name="pAtk" val="688.86373"/>
		<set name="pDef" val="295.91597"/>
		<set name="mAtk" val="470.40463"/>
		<set name="mDef" val="216.53847"/>
		<set name="crit" val="4"/>
		<set name="atkSpd" val="253"/>
		<set name="str" val="40"/>
		<set name="int" val="21"/>
		<set name="dex" val="30"/>
		<set name="wit" val="20"/>
		<set name="con" val="43"/>
		<set name="men" val="20"/>
		<set name="corpseTime" val="7"/>
		<set name="walkSpd" val="50"/>
		<set name="runSpd" val="120"/>
		<set name="dropHerbGroup" val="0"/>
		<set name="attackRange" val="40"/>
		<ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/>
		<skills>
			<skill id="4045" level="1"/>
			<skill id="4416" level="14"/>
		</skills>
	</npc>

the code is not mine, i just adapted it

 

Edit: oh sry forgot to add npc htmls here u go

\data\html\mods

TvTEventParticipation.htm

<html><title>TvT Event</title><body>
Registration for TvT Event:<br><br><center>
%team1name%    (%team1playercount% players in)<br1>
%team2name%    (%team2playercount% players in)<br>
<button value="Participate" action="bypass -h npc_%objectId%_tvt_event_participation" width=50 height=15 back="sek.cbui94" fore="sek.cbui92">
<button value="Close" action="bypass -h npc_%objectId%_Close" width=50 height=15 back="sek.cbui94" fore="sek.cbui92">
</center></body></html>


TvTEventRemoveParticipation.htm

<html><title>TvT Event</title><body>
Cancel Registration yourself for TvT Event:<br1>
You are already registered for this event. Do you wish to cancel your participation in this Event?<br><br><center>
<button value="Yes" action="bypass -h npc_%objectId%_tvt_event_remove_participation" width=40 height=15 back="sek.cbui94" fore="sek.cbui92">
<button value="No" action="bypass -h npc_%objectId%_Close" width=40 height=15 back="sek.cbui94" fore="sek.cbui92">
</center></body></html>


TvTEventStatus.htm

<html><title>TvT Event</title><body>
Status:<br><br><center>
%team1name% with %team1playercount% players and %team1points% points.<br1>
%team2name% with %team2playercount% players and %team2points% points.<br>
</center></body></html>

Edited by Bunju

  1. +               while (_teams[0].getPoints() == _teams[1].getPoints())

  2. +               {

+                       try

+                       {

+                               Thread.sleep(1);

+                       }

+                       catch (InterruptedException ie)

+                       {}

+               }

 

 

 

 

WTF

 

  • Author

source is from l2j server, dont ask me what that is xD

source is from l2j server, dont ask me what that is xD

 

 

Then I guess its a pretty old one, cause their policy about shit codes is hard

  • Author

Ur wrong

Ur wrong

 

 

Anyways ;D

  • Author

There are all the checks needed except for escape on skills and potions use, havent looked yet

  • Author

network/serverpackets/SystemMessage.java

-	private SystemMessage(final SystemMessageId smId)
+	public SystemMessage(final SystemMessageId smId)

this should fix

Edited by Bunju

dont use this event. is not a good idea to use the method .sleep

 

 

good joke, sleep method releases all hardware resources from that instance which means it has no perfomance effect on runtime making it good for events

  • 2 weeks later...
  • 1 year later...

Nice share but what the comand to start the event;

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.