Jump to content

Recommended Posts

Posted

Hi, i killed some time by creating some npcs in the old style. I may create and a shop later.

Buffer's java side is not mine.

Can't be asked to do a normal upload of the files.

drtfu6ud5fg11k5zg.jpg

 

Gatekeeper: The castle spots are outside the castles. Bosses spots are directly inside the boss room(It may not work if you need quest to join the room).

ID: 50012

Data/Html/Teleporter/50012:

<html>
<title>Gatekeeper</title>
<body>
<table width=300>
    <tr>
        <td><font color="FFFF00">Towns:</td>
        <td>Castles:</td>
        <td>Arenas:</font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 120" msg="811;The Town of Giran">Giran</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10043" msg="811;Outside the Castle of Giran">Giran</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10038" msg="811;Giran Arena">Giran</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 10041" msg="811;The Town of Aden">Aden</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10042" msg="811;Outside the Castle of Aden">Aden</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10039" msg="811;Gludin Arena">Gludin</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 119" msg="811;The Town of Goddard">Goddard</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10044" msg="811;Outside the Castle of Goddard">Goddard</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10040" msg="811;Floran Arena">Floran</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 1101" msg="811;The Town of Schuttgart">Schuttgart</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10045" msg="811;Outside the Castle of Schuttgart">Schuttgart</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 76" msg="811;Coliseum">Coliseum</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 1100" msg="811;The Town of Heine">Heine</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10046" msg="811;Outside the Castle of Innadril">Innadril</a></font></td>
        <td></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 26" msg="811;The Town of Oren">Oren</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10047" msg="811;Outside the Castle of Oren">Oren</a></font></td>
        <td><font color="FFFF00">Primeval:</font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 25" msg="811;The Town of Dion">Dion</a></font></td>
		<td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10048" msg="811;Outside the Castle of Dion">Dion</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10051" msg="811;Primeval Lost Nest">Lost Nest</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 1055" msg="811;The Town of Gludio">Gludio</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10049" msg="811;Outside the Castle of Gludio">Gludio</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10052" msg="811;Primeval Plains">Plains</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 1057" msg="811;Rune Township">Rune</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10050" msg="811;Outside the Castle of Rune">Rune</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10053" msg="811;Primeval Isle Wharf">Wharf</a></font></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10054" msg="811;Primeval Research Facility">Research Facility</a></font></td>
    </tr>
    <tr>
        <td><font color="FFFF00">Villages:</font></td>
        <td><font color="FFFF00">Bosses:</font></td>
        <td></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 9" msg="811;The Village of Talking Island">Talking Island</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10061" msg="811;Valakas Lair">Valakas</a></font></td>
        <td><font color="FFFF00">Special:</font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 3" msg="811;The Village of Elven">Elven</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10060" msg="811;Antharas Lair">Antharas</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10062" msg="811;Massive PVP Zone">Mass PVP</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 4" msg="811;The Village of Dark Elven">Dark Elven</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10059" msg="811;Baium Lair">Baium</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10063" msg="811;Safe Farming Zone">Safe Farm</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 1033" msg="811;The Village of Orc">Orc</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10058" msg="811;Zakens Room">Zaken</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10064" msg="811;PVP and Farming Zone">PVP & Farm</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 1034" msg="811;The Village of Dwarven">Dwarven</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10055" msg="811;Queen Ant Nest">Queen Ant</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_goto 10065" msg="811;Level-up Zone">Level up</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 5" msg="811;The Village of Gludin">Gludin</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10056" msg="811;Core Room">Core</a></font></td>
        <td></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_goto 49" msg="811;The Village of Hunters">Hunter</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_goto 10057" msg="811;Orfen Nest">Orfen</a></font></td>
        <td></td>
    </tr>
</table>
</body>
</html>

Data/xml/Teleport.xml:

		<!-- arenas -->
	<teleport id="10038" loc_x="73656" loc_y="142632" loc_z="-3768" price="0" fornoble="0"/>
	<teleport id="10039" loc_x="-87272" loc_y="142328" loc_z="-3640" price="0" fornoble="0"/>
	<teleport id="10040" loc_x="12311" loc_y="182746" loc_z="-3565" price="0" fornoble="0"/>
	<!-- Aden new spot -->
	<teleport id="10041" loc_x="147462" loc_y="25836" loc_z="-2012" price="37000" fornoble="0"/>
	<!-- Outside the castle spots -->
	<teleport id="10042" loc_x="147463" loc_y="20045" loc_z="-2008" price="50000" fornoble="0"/>
	<teleport id="10043" loc_x="106821" loc_y="145283" loc_z="-3428" price="50000" fornoble="0"/>
	<teleport id="10044" loc_x="154651" loc_y="-52284" loc_z="-2978" price="50000" fornoble="0"/>
	<teleport id="10045" loc_x="76673" loc_y="-145348" loc_z="-1239" price="50000" fornoble="0"/>
	<teleport id="10046" loc_x="117713" loc_y="24118" loc_z="-1526" price="50000" fornoble="0"/>
	<teleport id="10047" loc_x="74692" loc_y="39602" loc_z="-3214" price="50000" fornoble="0"/>
	<teleport id="10048" loc_x="18705" loc_y="152024" loc_z="-3325" price="50000" fornoble="0"/>
	<teleport id="10049" loc_x="-14965" loc_y="118145" loc_z="-3055" price="50000" fornoble="0"/>
	<teleport id="10050" loc_x="27929" loc_y="-48775" loc_z="-1345" price="50000" fornoble="0"/>
	<!-- Primeval Isle Spots -->
	<teleport id="10051" loc_x="26174" loc_y="-17134" loc_z="-2747" price="20000" fornoble="0"/>
	<teleport id="10052" loc_x="8264" loc_y="-14431" loc_z="-3696" price="20000" fornoble="0"/>
	<teleport id="10053" loc_x="10468" loc_y="-24569" loc_z="-3650" price="20000" fornoble="0"/>
	<teleport id="10054" loc_x="6229" loc_y="-2924" loc_z="-2965" price="20000" fornoble="0"/>
	<!-- Bosses Spots -->
	<teleport id="10055" loc_x="-21541" loc_y="184546" loc_z="-5721" price="100000" fornoble="0"/>
	<teleport id="10056" loc_x="17718" loc_y="111877" loc_z="-6583" price="100000" fornoble="0"/>
	<teleport id="10057" loc_x="45862" loc_y="17226" loc_z="-4331" price="100000" fornoble="0"/>
	<teleport id="10058" loc_x="55012" loc_y="218813" loc_z="-3227" price="100000" fornoble="0"/>
	<teleport id="10059" loc_x="113200" loc_y="14620" loc_z="10078" price="100000" fornoble="0"/>
	<teleport id="10060" loc_x="180251" loc_y="114784" loc_z="-7707" price="100000" fornoble="0"/>
	<teleport id="10061" loc_x="208909" loc_y="-113630" loc_z="-259" price="100000" fornoble="0"/>
	<!-- Special Spots -->
	<teleport id="10062" loc_x="174229" loc_y="-88023" loc_z="-5116" price="10000" fornoble="0"/>
	<teleport id="10063" loc_x="115898" loc_y="75334" loc_z="-2599" price="10000" fornoble="0"/>
	<teleport id="10064" loc_x="185382" loc_y="20357" loc_z="-3269" price="10000" fornoble="0"/>
	<teleport id="10065" loc_x="83457" loc_y="256969" loc_z="-11670" price="10000" fornoble="0"/>

Data/xml/npcs.xml:

		<npc id="50012" idTemplate="30080" name="Layla" title="Gatekeeper">
		<set name="level" val="80"/>
		<set name="radius" val="7"/>
		<set name="height" val="25"/>
		<set name="rHand" val="0"/>
		<set name="lHand" val="0"/>
		<set name="type" val="L2Teleporter"/>
		<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"/>
		<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="18"/>
		</skills>
	</npc>

sep5cdfrdsu595mzg.jpg

ID:9001

Data/Html/Buffer:

<html>
<title>Buffer</title>
<body>
<table width=300>
    <tr>
        <td><font color="FFFF00">Buffs:</td>
        <td>Dances:</td>
        <td>Specials:</font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1204 2 data/html/buffer/9001.htm">Wind Walk</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 275 1 data/html/buffer/9001.htm">Fury</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1389 3 data/html/buffer/9001.htm">Greater Shield</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1040 3 data/html/buffer/9001.htm">Shield</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 274 1 data/html/buffer/9001.htm">Fire</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1388 3 data/html/buffer/9001.htm">Greater Might</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1036 2 data/html/buffer/9001.htm">Magic Barrier</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 271 1 data/html/buffer/9001.htm">Warrior</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1362 1 data/html/buffer/9001.htm">Chant of Spirit</a></font></td></tr>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1259 4 data/html/buffer/9001.htm">Resist Shock</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 272 1 data/html/buffer/9001.htm">Inspiration</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1363 1 data/html/buffer/9001.htm">Chant of Victory</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1035 4 data/html/buffer/9001.htm">Mental Shield</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 310 1 data/html/buffer/9001.htm">Vampire</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1414 1 data/html/buffer/9001.htm">Victories of Pa'agrio</a></font></td></tr>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1045 6 data/html/buffer/9001.htm">Bless Body</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 273 1 data/html/buffer/9001.htm">Mystic</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 1356 1 data/html/buffer/9001.htm">Prophecy of Fire</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1048 6 data/html/buffer/9001.htm">Bless Soul</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 365 1 data/html/buffer/9001.htm">Siren</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 1357 1 data/html/buffer/9001.htm">Prophecy of Wind</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1062 2 data/html/buffer/9001.htm">Berseker Spirit</a></font></td>
		<td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 276 1 data/html/buffer/9001.htm">Concentration</a></font></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 1355 1 data/html/buffer/9001.htm">Prophecy of Water</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1243 6 data/html/buffer/9001.htm">Bless Shield</a></font></td>
        <td></td>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 1413 1 data/html/buffer/9001.htm">Magnus Chant</a></font></td>
    </tr>
    <tr>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 1304 3 data/html/buffer/9001.htm">Advanced Block</a></font></td>
        <td><font color="FFFF00">Songs:</font></td>
        <td></td>
    </tr>
    <tr>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 1240 3 data/html/buffer/9001.htm">Guidance</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 268 1 data/html/buffer/9001.htm">Wind</a></font></td>
        <td><font color="FFFF00">Summons:</font></td>
    </tr>
    <tr>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 1087 3 data/html/buffer/9001.htm">Agility</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 264 1 data/html/buffer/9001.htm">Earth</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 4703 13 data/html/buffer/9001.htm">Gift of Seraphim</a></font></td>
    </tr>
    <tr>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 1268 3 data/html/buffer/9001.htm">Vampiric Rage</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 267 1 data/html/buffer/9001.htm">Warding</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 4702 13 data/html/buffer/9001.htm">Blessing of Seraphim</a></font></td>
    </tr>
    <tr>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 1068 3 data/html/buffer/9001.htm">Might</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 304 1 data/html/buffer/9001.htm">Vitality</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 4700 13 data/html/buffer/9001.htm">Gift of Queen</a></font></td>
    </tr>
    <tr>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 1077 3 data/html/buffer/9001.htm">Focus</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 305 1 data/html/buffer/9001.htm">Vengeance</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 4699 13 data/html/buffer/9001.htm">Blessing of Queen</a></font></td>
    </tr>
    <tr>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 1242 3 data/html/buffer/9001.htm">Death Whisper</a></font></td>
        <td><font color="98AFC7"><a action="bypass -h npc_%objectId%_getbuff 349 1 data/html/buffer/9001.htm">Renewal</a></font></td>
        <td></td>
    </tr>
    <tr>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 1303 2 data/html/buffer/9001.htm">Wild Magic</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 364 1 data/html/buffer/9001.htm">Champion</a></font></td>
        <td><font color="FFFF00"><a action="bypass -h npc_%objectId%_restore">Restore</a></font></td>
    </tr>
    <tr>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 1078 6 data/html/buffer/9001.htm">Concentration</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 269 1 data/html/buffer/9001.htm">Hunter</a></font></td>
        <td><font color="FFFF00"><a action="bypass -h npc_%objectId%_cancel">Cancel</a></font></td>
    </tr>
    <tr>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 1059 3 data/html/buffer/9001.htm">Empower</a></font></td>
        <td><font color="FFF380"><a action="bypass -h npc_%objectId%_getbuff 266 1 data/html/buffer/9001.htm">Water</a></font></td>
        <td></td>
    </tr>
    <tr>
        <td><font color="6CBB3C"><a action="bypass -h npc_%objectId%_getbuff 1085 3 data/html/buffer/9001.htm">Acumen</a></font></td>
        <td></td>
        <td><font color="98AFC7">All</font>,<font color="FFF380">Fighters</font>,<font color="6CBB3C">Mages</font></td>
    </tr>
</table>
</body>
</html>

Data/xml/npcs.xml:

		<npc id="9001" idTemplate="30519" name="Sisko" title="Buffer">
		<set name="level" val="80"/>
		<set name="radius" val="7"/>
		<set name="height" val="18"/>
		<set name="rHand" val="0"/>
		<set name="lHand" val="0"/>
		<set name="type" val="L2Buffe"/>
		<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="18"/>
		</skills>
	</npc>

model/actor/instance/L2BuffeInstance.java:

/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 * http://www.gnu.org/copyleft/gpl.html
 */
package net.sf.l2j.gameserver.model.actor.instance;


import java.util.StringTokenizer;

import net.sf.l2j.commons.random.Rnd;
import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;
import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.MyTargetSelected;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
import net.sf.l2j.gameserver.network.serverpackets.ValidateLocation;


/**
*
* @author KDerD64
*/
public final class L2BuffeInstance extends L2NpcInstance
{
    public L2BuffeInstance(int objectId, NpcTemplate template)
    {
        super(objectId, template);
    }


     @Override
    public void onBypassFeedback(L2PcInstance player, String command)
    {
      StringTokenizer st = new StringTokenizer(command, " ");
      String actualCommand = st.nextToken();


      int buffid = 0;
      int bufflevel = 1;
        String nextWindow = null;
      if (st.countTokens() == 3) {
         buffid = Integer.valueOf(st.nextToken());
         bufflevel = Integer.valueOf(st.nextToken());
            nextWindow = st.nextToken();
      }
      else if (st.countTokens() == 1)
      buffid = Integer.valueOf(st.nextToken());


      if (actualCommand.equalsIgnoreCase("getbuff"))
      {
         if (buffid != 0)
         {
            MagicSkillUse mgc = new MagicSkillUse(this, player, buffid, bufflevel, -1, 0);
            
            SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player);
            broadcastPacket(new MagicSkillUse(this, player, buffid, bufflevel, 500, 0));
            showMessageWindow(player);
            player.broadcastPacket(mgc);
                showChatWindow(player, nextWindow);
         }
      }
      else if (actualCommand.equalsIgnoreCase("restore")) {
         player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
         player.setCurrentCp(player.getMaxCp());
         broadcastPacket(new MagicSkillUse(this, player, 1258, 4, 500, 0));
         showMessageWindow(player);
      }
      else if (actualCommand.equalsIgnoreCase("cancel")) {
         player.stopAllEffects();
         broadcastPacket(new MagicSkillUse(this, player, 1056, 12, 500, 0));
         showMessageWindow(player);
      }
      else
         super.onBypassFeedback(player, command);
    }


    @Override
    public void onAction(L2PcInstance player)
    {
      if (this != player.getTarget()) {
         player.setTarget(this);
         player.sendPacket(new MyTargetSelected(getObjectId(), player.getLevel() - getLevel()));
         player.sendPacket(new ValidateLocation(this));
      }
      else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false)) {
    	  SocialAction sa = new SocialAction(this, Rnd.get(8));
         broadcastPacket(sa);
         player.setCurrentFolkNPC(this);
         showMessageWindow(player);
         player.sendPacket(ActionFailed.STATIC_PACKET);
      }
      else {
         player.getAI().setIntention(CtrlIntention.INTERACT, this);
         player.sendPacket(ActionFailed.STATIC_PACKET);
      }
    }
   
    private void showMessageWindow(L2PcInstance player)
    {
      String filename = "data/html/buffer/" + getNpcId() + ".htm";
      
      filename = getHtmlPath(getNpcId(), 0);
      NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
      html.setFile(filename);
      html.replace("%objectId%", String.valueOf(getObjectId()));
      html.replace("%npcname%", getName());
      player.sendPacket(html);      
    }
   @Override
   public String getHtmlPath(int npcId, int val)
   {
      String pom = "";
      if (val == 0)
         pom = "" + npcId;
      else
         pom = npcId + "-" + val;
      
      return "data/html/buffer/" + pom + ".htm";
   }   
}
Posted

file s euxaristw epsaxna kapoia kalin gk gia l2jacis eutixos p ine gia auto to project gt poios evaze ta teleports 1-1 apo frozen.. :D oso gia tin buffer dn tin xriazome ala einai kalin. :) 

Posted

file s euxaristw epsaxna kapoia kalin gk gia l2jacis eutixos p ine gia auto to project gt poios evaze ta teleports 1-1 apo frozen.. :D oso gia tin buffer dn tin xriazome ala einai kalin. :)

 

tha xriasti na allaksis ta boss spawn. ap ti thimame den se afini na bis sto room katefthian ;p

"vintage" really?

:O

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • [Release] Solo PvP Zone System 🔹 Compatible with: aCis 401+ 📜 Features: ✅ Automatic Exit on Restart: Players are removed from the zone if a restart occurs or logout. ✅ Custom Exit Command: Players can exit the Solo Zone with the voice command .exit. ✅ Teleport NPC Command: new bypass solopvp for gatekeeper. ✅ Random Name Generator: Generates random names. ✅ PvP Flag: The players are flagged within this zone.   xml preview & java code backup code -> https://pastebin.com/974V2p2p   SoloZone.xml <?xml version="1.0" encoding="UTF-8"?> <list> <zone shape="NPoly" minZ="-5200" maxZ="-4680"><!-- Frintezza Solo Zone --> <stat name="name" val="Solo PvP Zone" /> <stat name="locs" val="174244,-89089,-5112;174260,-86881,-5112;173184,-88090,-5112;175309,-88018,-5112;174231,-88019,-5112;175136,-88828,-5104;174962,-87025,-5104;173149,-87142,-5104;173470,-88908,-5112" /> <stat name="restrictedClasses" val="15,16,97" /> <node x="172031" y="-90127"/> <node x="176428" y="-90089"/> <node x="176428" y="-74051"/> <node x="172057" y="-74108"/> </zone> </list> SoloZone Code: diff --git a/java/net/sf/l2j/gameserver/taskmanager/SoloZoneTaskManager.java b/java/net/sf/l2j/gameserver/taskmanager/SoloZoneTaskManager.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/taskmanager/SoloZoneTaskManager.java @@ -0,0 +1,98 @@ +package net.sf.l2j.gameserver.taskmanager; + +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.logging.Logger; + +import net.sf.l2j.commons.random.Rnd; + +import net.sf.l2j.gameserver.data.manager.ZoneManager; +import net.sf.l2j.gameserver.enums.ZoneId; +import net.sf.l2j.gameserver.handler.voicecommandhandlers.VoiceExitSoloZone; +import net.sf.l2j.gameserver.model.World; +import net.sf.l2j.gameserver.model.actor.Player; +import net.sf.l2j.gameserver.model.location.Location; +import net.sf.l2j.gameserver.model.zone.type.SoloZone; + + +/** + * @author MarGaZeaS + */ +public class SoloZoneTaskManager implements Runnable { + + private static final Location EXIT_LOCATION = VoiceExitSoloZone.getExitLocation(); // Λαμβάνουμε την έξοδο από το VoiceExitSoloZone + + @Override + public void run() + { + // Διασχίζουμε όλους τους παίκτες του κόσμου + for (Player player : World.getInstance().getPlayers()) + { + // Ελέγχουμε αν ο παίκτης είναι στο SoloZone + if (player.isInsideZone(ZoneId.SOLO)) + { + // Μεταφέρουμε τον παίκτη στην έξοδο + player.teleportTo(EXIT_LOCATION.getX(), EXIT_LOCATION.getY(), EXIT_LOCATION.getZ(), 0); + player.sendMessage("The server is restarting, you have been moved out of the Solo Zone."); + } + } + } + + private int _id; + + private static final Logger _log = Logger.getLogger(SoloZoneTaskManager.class.getName()); + private static final ArrayList<String> _rndNames = new ArrayList<>(); + private static final int RANDOM_NAMES = 500; + private static final String CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + private int _playersInSoloZone = 0; + + public int getPlayersInside() { + return _playersInSoloZone; + } + + public void setPlayersInside(int val) { + _playersInSoloZone = val; + } + + public SoloZoneTaskManager() { + _log.info("Solo Zone System: Loading..."); + for (int i = 0; i < RANDOM_NAMES; i++) { + String name = generateName(); + _rndNames.add(name); + _log.info("Generated name: " + name); + } + _log.info("Solo Zone System: Loaded " + _rndNames.size() + " names."); + } + + public String getAName() { + if (_rndNames.isEmpty()) { + _log.warning("SoloZoneManager: No random names available."); + return "Unknown"; + } + return _rndNames.get(Rnd.get(5, RANDOM_NAMES - 5)); + } + + private static String generateName() { + SecureRandom rnd = new SecureRandom(); + StringBuilder sb = new StringBuilder(15); + for (int i = 0; i < 15; i++) { + sb.append(CHARS.charAt(rnd.nextInt(CHARS.length()))); + } + return sb.toString(); + } + + public int getZoneId() + { + return _id; + } + + public final static SoloZone getCurrentZone() { + return ZoneManager.getInstance().getAllZones(SoloZone.class) + .stream() + .findFirst() // Επιστρέφει την πρώτη SoloZone (αν υπάρχει μόνο μία) + .orElse(null); + } + + public static SoloZoneTaskManager getInstance() { + return SingletonHolder._instance; + } + + private static class SingletonHolder { + private static final SoloZoneTaskManager _instance = new SoloZoneTaskManager(); + } +} diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java b/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java index a707ce5..d247e2e 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java final Player player = entry.getKey(); final long timeLeft = entry.getValue(); + if(player.isInsideZone(ZoneId.SOLO)) + continue; if(player.isInsideZone(ZoneId.BOSS)) continue; // Time is running out, clear PvP flag and remove from list. if (currentTime > timeLeft) diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java index a707ce5..d247e2e 100644 +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java if (Config.ALLOW_FISH_CHAMPIONSHIP) FishingChampionshipManager.getInstance(); + if (Config.ENABLE_STARTUP) + StartupManager.getInstance(); diff --git a/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java b/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java if (!st.hasMoreTokens()) { sendHtmlForm(player); return; } try { switch (st.nextToken()) { case "shutdown": + SoloZoneTaskManager exitTask = new SoloZoneTaskManager(); + ThreadPool.schedule(exitTask, 0); Shutdown.getInstance().startShutdown(player, null, Integer.parseInt(st.nextToken()), false); break; case "restart": + exitTask = new SoloZoneTaskManager(); + ThreadPool.schedule(exitTask, 0); Shutdown.getInstance().startShutdown(player, null, Integer.parseInt(st.nextToken()), true); break; case "abort": Shutdown.getInstance().abort(player); break; diff --git a/java/net/sf/l2j/gameserver/handler/voicecommandhandlers/VoiceExitSoloZone.java b/java/net/sf/l2j/gameserver/handler/voicecommandhandlers/VoiceExitSoloZone.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/handler/voicecommandhandlers/VoiceExitSoloZone.java +package net.sf.l2j.gameserver.handler.voicecommandhandlers; + +import net.sf.l2j.commons.pool.ThreadPool; + +import net.sf.l2j.gameserver.enums.ZoneId; +import net.sf.l2j.gameserver.handler.IVoiceCommandHandler; +import net.sf.l2j.gameserver.model.actor.Player; +import net.sf.l2j.gameserver.model.location.Location; +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; + +/** + * Handles the voice command for exiting the Solo Zone with delay and effects. + * + * @author MarGaZeaS + */ +public class VoiceExitSoloZone implements IVoiceCommandHandler +{ + private static final String[] VOICE_COMMANDS = + { + "exit" + }; + + // Default location to teleport players when exiting the Solo Zone + private static final Location EXIT_LOCATION = new Location(81318, 148064, -3464); // Replace with your desired coordinates + + // Προσθήκη της μεθόδου για να πάρουμε την τοποθεσία εξόδου + public static Location getExitLocation() { + return EXIT_LOCATION; + } + + @Override + public void useVoiceCommand(Player player, String command) + { + if (command.equalsIgnoreCase("exit")) + { + if (!player.isInsideZone(ZoneId.SOLO)) + { + player.sendMessage("You are not inside the Solo Zone."); + return; + } + + // Notify the player about the delay + player.sendMessage("You will be teleported out of the Solo Zone in 2 seconds."); + + // Cast skill effect (Skill ID: 2100, Level: 1) + player.broadcastPacket(new MagicSkillUse(player, player, 2100, 1, 2000, 0)); + + // Schedule the teleportation after a 2-second delay + ThreadPool.schedule(() -> { + // Teleport the player to the designated exit location + player.teleportTo(EXIT_LOCATION.getX(), EXIT_LOCATION.getY(), EXIT_LOCATION.getZ(), 0); + + // Inform the player + player.sendMessage("You have exited the Solo Zone."); + }, 2000); // Delay in milliseconds (2000ms = 2 seconds) + } + } + + @Override + public String[] getVoiceCommandList() + { + return VOICE_COMMANDS; + } +} diff --git a/java/net/sf/l2j/gameserver/handler/VoiceCommandHandler.java b/java/net/sf/l2j/gameserver/handler/VoiceCommandHandler.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/handler/VoiceCommandHandler.java public class VoiceCommandHandler { private final Map<String, IVoiceCommandHandler> _entries = new HashMap<>(); protected VoiceCommandHandler() { ............ ............ + registerHandler(new VoiceExitSoloZone()); } public void registerHandler(IVoiceCommandHandler handler) { for (String command : handler.getVoiceCommandList()) _entries.put(command, handler); } diff --git a/java/net/sf/l2j/gameserver/model/actor/Npc.java b/java/net/sf/l2j/gameserver/model/actor/Npc.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/model/actor/Npc.java else if (command.startsWith("Chat")) { int val = 0; try { val = Integer.parseInt(command.substring(5)); } catch (final IndexOutOfBoundsException ioobe) { } catch (final NumberFormatException nfe) { } showChatWindow(player, val); + ) + else if (command.startsWith("solopvp")) + { + SoloZoneTaskManager.getInstance(); + player.teleportTo(SoloZoneTaskManager.getCurrentZone().getLoc(), 25); + } else if (command.startsWith("Link")) { final String path = command.substring(5).trim(); if (path.indexOf("..") != -1) return; final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/" + path); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } diff --git a/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java b/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java // Fixed. - else if (_requestType == 4) - { - if (!player.isGM() && !player.isFestivalParticipant()) - return; - - loc = player.getPosition(); - } + if (_requestType == 4) + { + // Έλεγχος αν ο παίκτης δεν είναι GM, δεν είναι μέρος του φεστιβάλ και δεν είναι στην Solo Zone + if (!player.isGM() && !player.isFestivalParticipant() && !player.isInsideZone(ZoneId.SOLO)) + { + return; + } + + SoloZoneTaskManager.getInstance(); + SoloZone currentZone = SoloZoneTaskManager.getCurrentZone(); + if (currentZone != null && currentZone.getLoc() != null) + { + // Αν υπάρχει ζώνη και οι τοποθεσίες δεν είναι κενές, χρησιμοποιούμε τυχαία τοποθεσία από την ζώνη + loc = currentZone.getLoc(); + } else + { + // Διαφορετικά, κάνουμε respawn στην τρέχουσα θέση του παίκτη + loc = player.getPosition(); + } + } diff --git a/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java b/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java if (player.isFestivalParticipant() && FestivalOfDarknessManager.getInstance().isFestivalInitialized()) { player.sendPacket(SystemMessageId.NO_RESTART_HERE); sendPacket(RestartResponse.valueOf(false)); return; } + if (player.isInsideZone(ZoneId.SOLO)) + { + player.sendMessage("You cannot restart your character while in Solo Zone. Use .exit to leave"); + player.setFakeName(null); + sendPacket(RestartResponse.valueOf(false)); + return; + } player.removeFromBossZone(); diff --git a/java/net/sf/l2j/gameserver/network/clientpackets/Logout.java b/java/net/sf/l2j/gameserver/network/clientpackets/Logout.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/clientpackets/Logout.java player.removeFromBossZone(); player.logout(true); } } + + if (player.isInsideZone(ZoneId.SOLO)) + { + player.sendMessage("You cannot logout or restart your character while in Solo Zone. Use .exit to leave"); + player.setFakeName(null); + player.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + player.removeFromBossZone(); player.logout(true); } } diff --git a/java/net/sf/l2j/gameserver/model/zone/type/SoloZone.java b/java/net/sf/l2j/gameserver/model/zone/type/SoloZone.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/model/zone/type/SoloZone.java +package net.sf.l2j.gameserver.model.zone.type; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.sf.l2j.commons.random.Rnd; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.enums.MessageType; +import net.sf.l2j.gameserver.enums.ZoneId; +import net.sf.l2j.gameserver.handler.voicecommandhandlers.VoiceExitSoloZone; +import net.sf.l2j.gameserver.model.World; +import net.sf.l2j.gameserver.model.actor.Creature; +import net.sf.l2j.gameserver.model.actor.Player; +import net.sf.l2j.gameserver.model.location.Location; +import net.sf.l2j.gameserver.model.zone.type.subtype.ZoneType; +import net.sf.l2j.gameserver.network.SystemMessageId; +import net.sf.l2j.gameserver.network.serverpackets.EtcStatusUpdate; +import net.sf.l2j.gameserver.taskmanager.PvpFlagTaskManager; +import net.sf.l2j.gameserver.taskmanager.SoloZoneTaskManager; + +/** + * @author MarGaZeaS + * + */ +public class SoloZone extends ZoneType +{ + private String _name; + private List<Location> _locations = new ArrayList<>(); + + public SoloZone(int id) + { + super(id); + } + + @Override + public void setParameter(String name, String value) + { + if (name.equals("name")) + _name = value; + else if (name.equals("locs")) + { + for (String locs : value.split(";")) + { + String[] coordinates = locs.split(","); + if (coordinates.length == 3) + { + int x = Integer.parseInt(coordinates[0]); + int y = Integer.parseInt(coordinates[1]); + int z = Integer.parseInt(coordinates[2]); + _locations.add(new Location(x, y, z)); + } + else + { + LOGGER.warn("Invalid location format: " + locs); + } + } + } + } + + + @Override + protected void onEnter(Creature character) + { + if (character instanceof Player) + { + final Player player = (Player) character; + + if ((player.getClassId().getId() == 15 || player.getClassId().getId() == 16 || player.getClassId().getId() == 97)) + { + Location respawnLocation = VoiceExitSoloZone.getExitLocation(); + player.instantTeleportTo(respawnLocation, 20); + player.sendMessage("Your class is not allowed in this zone."); + return; + } + + String randomName = SoloZoneTaskManager.getInstance().getAName(); + if (randomName == null || randomName.isEmpty() || !isValidName(randomName)) + { + randomName = generateRandomName(); + } + if (isNameAlreadyTaken(randomName)) + { + randomName = generateRandomName(); + } + player.setFakeName(randomName); + player.sendMessage("Welcome to the Solo Zone, your random name is: " + randomName); + player.sendPacket(SystemMessageId.ENTERED_COMBAT_ZONE); + character.setInsideZone(ZoneId.SOLO, true); + character.setInsideZone(ZoneId.NO_STORE, true); + character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); + + if (player.getParty() != null) + { + player.getParty().removePartyMember(player, MessageType.DISCONNECTED); + } + + if (player.getPvpFlag() > 0) + PvpFlagTaskManager.getInstance().remove(player, true); + + player.updatePvPStatus(); + player.broadcastUserInfo(); + } + } + + private static boolean isValidName(String name) { + return name.matches("[a-zA-Z0-9_]+"); + } + + private static String generateRandomName() { + Random rand = new Random(); + int nameLength = rand.nextInt(12) + 4; + StringBuilder nameBuilder = new StringBuilder(); + + for (int i = 0; i < nameLength; i++) { + char randomChar = (char) (rand.nextInt(26) + 'a'); + nameBuilder.append(randomChar); + } + + return nameBuilder.toString(); + } + + private static boolean isNameAlreadyTaken(String name) { + return World.getInstance().getPlayers().stream().anyMatch(player -> player.getFakeName().equals(name)); + } + + @Override + protected void onExit(Creature character) + { + character.setInsideZone(ZoneId.SOLO, false); // Solo zone + character.setInsideZone(ZoneId.NO_STORE, false); // Allow making a store + character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false); // Allow summon + + if (character instanceof Player) + { + final Player player = (Player) character; + + if (player.getFakeName() != null) + { + player.setFakeName(null); + } + + player.sendPacket(SystemMessageId.LEFT_COMBAT_ZONE); + { + if(!player.isInObserverMode() && player.getPvpFlag() > 0) + PvpFlagTaskManager.getInstance().add(player, Config.PVP_NORMAL_TIME); + + player.sendPacket(new EtcStatusUpdate(player)); + player.broadcastUserInfo(); + } + } + } + + public String getName() + { + return _name; + } + + public Location getLoc() + { + if (_locations.isEmpty()) + { + return null; // Αν η λίστα είναι κενή, επιστρέφουμε null + } + return _locations.get(Rnd.get(0, _locations.size() - 1)); // Επιλέγουμε τυχαία τοποθεσία + } +} diff --git a/java/net/sf/l2j/gameserver/GameServer.java b/java/net/sf/l2j/gameserver/GameServer.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/GameServer.java if (Config.ALLOW_FISH_CHAMPIONSHIP) FishingChampionshipManager.getInstance(); + StringUtil.printSection("Custom Features"); + SoloZoneTaskManager.getInstance(); StringUtil.printSection("Handlers"); LOGGER.info("Loaded {} admin command handlers.", AdminCommandHandler.getInstance().size()); diff --git a/java/net/sf/l2j/gameserver/GameServer.java b/java/net/sf/l2j/gameserver/Shutdown.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/Shutdown.java // disconnect players try { disconnectAllPlayers(); LOGGER.info("All players have been disconnected."); } catch (Exception e) { // Silent catch. } + // Restore real names for players in SoloZone + restoreRealNamesInSoloZone(); // stop all threadpolls ThreadPool.shutdown(); try { LoginServerThread.getInstance().interrupt(); } catch (Exception e) { // Silent catch. } // avoids new players from logging in if (_secondsShut <= 60 && LoginServerThread.getInstance().getServerType() != ServerType.DOWN) LoginServerThread.getInstance().setServerType(ServerType.DOWN); _secondsShut--; Thread.sleep(1000); } } catch (InterruptedException e) { } } + // This method restores the real names of players in SoloZone + private static void restoreRealNamesInSoloZone() + { + for (Player player : World.getInstance().getPlayers()) + { + // Check if player is inside the SoloZone + if (player.isInsideZone(ZoneId.SOLO)) + { + // Restore the real name by removing the fake name + if (player.getFakeName() != null) + { + player.setFakeName(null); // Restore the real name + LOGGER.info("Player {}'s fake name has been removed and real name restored.", player.getName()); + } + } + } + } private static void sendServerQuit(int seconds) { World.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECONDS).addNumber(seconds)); } diff --git a/java/net/sf/l2j/gameserver/enums/ZoneId.java b/java/net/sf/l2j/gameserver/enums/ZoneId.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/enums/ZoneId.java public enum ZoneId { PVP(0), PEACE(1), SIEGE(2), MOTHER_TREE(3), CLAN_HALL(4), NO_LANDING(5), WATER(6), JAIL(7), MONSTER_TRACK(8), CASTLE(9), SWAMP(10), NO_SUMMON_FRIEND(11), NO_STORE(12), TOWN(13), HQ(14), DANGER_AREA(15), CAST_ON_ARTIFACT(16), NO_RESTART(17), SCRIPT(18), - BOSS(19), + BOSS(19), + SOLO(20); private final int _id; private ZoneId(int id) { _id = id; } diff --git a/java/net/sf/l2j/gameserver/network/serverpackets/Die.java b/java/net/sf/l2j/gameserver/network/serverpackets/Die.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/serverpackets/Die.java if (creature instanceof Player) { Player player = (Player) creature; - _allowFixedRes = player.getAccessLevel().allowFixedRes(); + _allowFixedRes = player.getAccessLevel().allowFixedRes() || player.isInsideZone(ZoneId.SOLO); _clan = player.getClan(); } diff --git a/java/net/sf/l2j/gameserver/model/actor/Player.java b/java/net/sf/l2j/gameserver//model/actor/Player.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java // Attacker or spectator logging into a siege zone will be ported at town. if (player.isInsideZone(ZoneId.SIEGE) && player.getSiegeState() < 2) player.teleportTo(TeleportType.TOWN); + if (player.isInsideZone(ZoneId.SOLO)) + { + ThreadPool.schedule(() -> { + Location exitLocation = VoiceExitSoloZone.getExitLocation(); + + if (exitLocation != null) + { + player.teleportTo(exitLocation.getX(), exitLocation.getY(), exitLocation.getZ(), 0); + player.sendMessage("You have been moved to the exit of the SoloZone."); + } + }, 5000); // 5000 milliseconds (5sec) + } diff --git a/java/net/sf/l2j/gameserver/model/actor/Player.java b/java/net/sf/l2j/gameserver/model/actor/Player.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/model/actor/Player.java @Override public void doRevive() { super.doRevive(); stopEffects(EffectType.CHARM_OF_COURAGE); sendPacket(new EtcStatusUpdate(this)); getStatus().setCpHpMp(getStatus().getMaxCp(), getStatus().getMaxHp(), getStatus().getMaxMp()); _reviveRequested = 0; _revivePower = 0; if (isMounted()) startFeed(_mountNpcId); + if (isInsideZone(ZoneId.SOLO)) + { + // Give Nobless (1323 ID) + L2Skill no = SkillTable.getInstance().getInfo(1323, 1); + no.getEffects(this, this); + sendMessage("You have received the Nobless status in the Solo Zone."); + } + }   If anyone thinks the code is wrong, please make an update and upload it here so I can update the post. A part was edited with chatgpt
    • Always remember, when you buy files, just compare with my files that I publish for free. and you will know that you are being ripped off. Greetings to all community!!! 🙂
    • Thank you for sharing. You are a capable and skilled person. Thank you again for your selfless dedication, Guytis🫡
    • he kept his promise! i think it's a good idea to unban his old account. he shares files with the community and could help both new and veteran l2off users! good job, Guytis!
  • Topics

×
×
  • Create New...