This commit is contained in:
87
trunk/dist/game/data/scripts/custom/ShadowWeapons/ShadowWeapons.java
vendored
Normal file
87
trunk/dist/game/data/scripts/custom/ShadowWeapons/ShadowWeapons.java
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* L2J DataPack 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package custom.ShadowWeapons;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
|
||||
/**
|
||||
* Shadow Weapons AI.<br>
|
||||
* Original Jython script by DrLecter.
|
||||
* @author Nyaran, jurchiks
|
||||
*/
|
||||
public final class ShadowWeapons extends Quest
|
||||
{
|
||||
// @formatter:off
|
||||
private static final int[] NPCS =
|
||||
{
|
||||
30037, 30066, 30070, 30109, 30115, 30120, 30174, 30175, 30176, 30187,
|
||||
30191, 30195, 30288, 30289, 30290, 30297, 30373, 30462, 30474, 30498,
|
||||
30499, 30500, 30503, 30504, 30505, 30511, 30512, 30513, 30595, 30676,
|
||||
30677, 30681, 30685, 30687, 30689, 30694, 30699, 30704, 30845, 30847,
|
||||
30849, 30854, 30857, 30862, 30865, 30894, 30897, 30900, 30905, 30910,
|
||||
30913, 31269, 31272, 31276, 31285, 31288, 31314, 31317, 31321, 31324,
|
||||
31326, 31328, 31331, 31334, 31336, 31958, 31961, 31965, 31968, 31974,
|
||||
31977, 31996, 32092, 32093, 32094, 32095, 32096, 32097, 32098, 32193,
|
||||
32196, 32199, 32202, 32205, 32206, 32213, 32214, 32221, 32222, 32229,
|
||||
32230, 32233, 32234
|
||||
};
|
||||
// @formatter:on
|
||||
private ShadowWeapons()
|
||||
{
|
||||
super(-1, ShadowWeapons.class.getSimpleName(), "custom");
|
||||
addStartNpc(NPCS);
|
||||
addTalkId(NPCS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext;
|
||||
boolean has_d = hasQuestItems(player, 8869); // Shadow Item Exchange Coupon (D-Grade)
|
||||
boolean has_c = hasQuestItems(player, 8870); // Shadow Item Exchange Coupon (C-Grade)
|
||||
|
||||
if (has_d || has_c)
|
||||
{
|
||||
if (!has_d)
|
||||
{
|
||||
htmltext = "exchange_c.html";
|
||||
}
|
||||
else if (!has_c)
|
||||
{
|
||||
htmltext = "exchange_d.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "exchange_both.html";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "exchange_no.html";
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
public static void main(String args[])
|
||||
{
|
||||
new ShadowWeapons();
|
||||
}
|
||||
}
|
6
trunk/dist/game/data/scripts/custom/ShadowWeapons/exchange_both.html
vendored
Normal file
6
trunk/dist/game/data/scripts/custom/ShadowWeapons/exchange_both.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>
|
||||
A Shadow weapon is a special weapon that is made in cooperation between the Ivory Tower and the Black Anvil Guild. It is created by magically projecting the power of a weapon onto another catalytic object. While that means that it can only be used while the magic charge remains, it has made it possible to mass produce projectile weapons.<br>
|
||||
Its performance is no different than if you used the original weapon, except that it cannot possess the special ability to absorb souls or refine through a Stone of Life. Also, although it acts as a weapon, it is actualy in the magic category -- once opened, it cannot be passed on to someone else. Consider it an aid on your new path until you lay your hands on some real weapons.<br>
|
||||
If you have a Shadow Weapon exchange coupon, you can receive a Shadow Weapon right for you.<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 306893003">Give the shadow Weapon exchange coupon.</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/custom/ShadowWeapons/exchange_c.html
vendored
Normal file
6
trunk/dist/game/data/scripts/custom/ShadowWeapons/exchange_c.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>
|
||||
A Shadow weapon is a special weapon that is made in cooperation between the Ivory Tower and the Black Anvil Guild. It is created by magically projecting the power of a weapon onto another catalytic object. While that means that it can only be used while the magic charge remains, it has made it possible to mass produce projectile weapons.<br>
|
||||
Its performance is no different than if you used the original weapon, except that it cannot possess the special ability to absorb souls or refine through a Stone of Life. Also, although it acts as a weapon, it is actualy in the magic category -- once opened, it cannot be passed on to someone else. Consider it an aid on your new path until you lay your hands on some real weapons.<br>
|
||||
If you have a Shadow Weapon exchange coupon, you can receive a Shadow Weapon right for you.<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 306893002">Give the shadow Weapon exchange coupon.</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/custom/ShadowWeapons/exchange_d.html
vendored
Normal file
6
trunk/dist/game/data/scripts/custom/ShadowWeapons/exchange_d.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>
|
||||
A Shadow weapon is a special weapon that is made in cooperation between the Ivory Tower and the Black Anvil Guild. It is created by magically projecting the power of a weapon onto another catalytic object. While that means that it can only be used while the magic charge remains, it has made it possible to mass produce projectile weapons.<br>
|
||||
Its performance is no different than if you used the original weapon, except that it cannot possess the special ability to absorb souls or refine through a Stone of Life. Also, although it acts as a weapon, it is actualy in the magic category -- once opened, it cannot be passed on to someone else. Consider it an aid on your new path until you lay your hands on some real weapons.<br>
|
||||
If you have a Shadow Weapon exchange coupon, you can receive a Shadow Weapon right for you.<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 306893001">Give the shadow Weapon exchange coupon.</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/custom/ShadowWeapons/exchange_no.html
vendored
Normal file
4
trunk/dist/game/data/scripts/custom/ShadowWeapons/exchange_no.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>
|
||||
You don't have a Shadow weapon exchange coupon.<br>
|
||||
A shadow Weapon exchange coupon is a <font color="LEVEL">gift received from a Grand Master, Magister or High Priest when you complete a class transfer.</font>
|
||||
</body></html>
|
Reference in New Issue
Block a user