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.



×
×
  • Create New...