This commit is contained in:
7
trunk/dist/game/data/scripts/events/HeavyMedal/31228-1.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31228-1.htm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Event Manager Roy the Cat:<br>
|
||||
<font color="LEVEL">1 - Medals and Prizes</font><br>
|
||||
Hunting the monsters that dwell outside the village will yield medals. Bring them to me and I'll reward you with a fabulous prize, personally selected for you by Collector Bashtal! You'll find two types of medals: Regular medals and glittering medals. Glittering medals are quite rare, and therefore most valuable, especially for your future.<br><br>
|
||||
<font color="LEVEL">2 - Advancing Levels</font><br>
|
||||
A collector's level reflects that player's contribution to the medal collection and collecting skill. Meow! Higher levels are eligible for a greater selection of prizes. Winnie over there can tell you more about raising your level.<br>
|
||||
<a action="bypass -h Quest HeavyMedal 31228.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-2.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-2.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Roy the Cat:<br>
|
||||
These are the <font color="LEVEL">prizes</font> that were selected by my Lord Bashtal: <font color="LEVEL">Greater Haste Potion, Greater Swift Attack Potion, Greater Magic Haste Potion, Quick Healing Potion, Blessed Scroll of Escape, Blessed Scroll of Resurrection, Scroll: Enchant Armor (All Grades), Scroll: Enchant Weapon (All Grades), Red Party Mask, Soul Crystal (All Colors) - Stage 11, Soul Crystal (All Colors) - Stage 12, Sealed Majestic Necklace, Sealed Majestic Earring, and Sealed Majestic Ring</font>.<br>
|
||||
You'll need to raise your collector level to be eligible for some of these items. If you wish to raise your level, go see Winnie the Cat!<br>
|
||||
<a action="bypass -h Quest HeavyMedal 31228.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-0.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-0.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager:<br>
|
||||
Raise your level as a collector, newbie! You can exchange medals for more valuable prizes! Meeow!<br>
|
||||
Here are the prizes you can choose from!<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122800">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-1.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-1.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Roy the Cat:<br>
|
||||
A rabbit, eh? You still have a long way to go! Don't get discouraged, just raise your level!<br>
|
||||
Here are the prizes you can choose from! Meow!<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122801">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-2.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-2.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Event Manager Roy the Cat:<br>
|
||||
Ah, a hyena! Meow! Very impressive! Thanks for all the medals! Meow!<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122802">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-3.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-3.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Roy the Cat:<br>
|
||||
Ah, a fox, eh? Meow! Thanks for all the medals! Thank you!<br>
|
||||
Here are the prizes you can choose from! Meow!<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122803">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-4.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31228-lvl-4.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Roy the Cat:<br>
|
||||
Ah, a wolf, eh? It's been too long since I've had the pleasure of meeting a collector of your character!<br>
|
||||
Here are the prizes you can choose from!<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 3122804">"I want to trade a medal for a prize."</a>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/events/HeavyMedal/31228.htm
vendored
Normal file
8
trunk/dist/game/data/scripts/events/HeavyMedal/31228.htm
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Event Manager Roy the Cat:<br>
|
||||
Meow! Greetings! I'm Roy the Cat!<br>
|
||||
My master, the great collector Bashtal from the Bronze Key guild, has asked me and my friends to collect medals that were scattered throughout the world. The search has brought me to this village!<br>
|
||||
I'm organizing an event I'm calling the <font color="LEVEL">Medal Collecting Event</font>! Anyone who brings medals will receive fabulous prizes! Meow!<br>
|
||||
<a action="bypass -h Quest HeavyMedal talk">"I want to trade medals for prizes."</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal 31228-1.htm">"Tell me more about the event."</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal 31228-2.htm">"What are the prizes?"</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-1.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-1.htm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
<font color="LEVEL">1 - Medals and Prizes</font><br>
|
||||
Hunting the monsters that dwell outside the village will yield medals. Bring them to me and I'll reward you with a fabulous prize, personally selected for you by Collector Bashtal!<br><br>
|
||||
<font color="LEVEL">2 - Advancing Levels</font><br>
|
||||
A collector's level reflects that player's contribution to the medal collection and collecting skill. You should raise your level as high as you can! Meow!! To raise your level, just bring me glittering medals and pass a simple test. Meow~!<br>
|
||||
<a action="bypass -h Quest HeavyMedal 31229.htm">Back</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-2.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-2.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Here are the <font color="LEVEL">event prizes</font> that have been prepared by my Lord Bashtal: <font color="LEVEL">Greater Haste Potion, Greater Swift Attack Potion, Greater Magic Haste Potion, Quick Healing Potion, Blessed Scroll of Escape, Blessed Scroll of Resurrection, Scroll: Enchant Armor (All Grades), Scroll: Enchant Weapon (All Grades), Red Party Mask, Soul Crystal (All Colors) - Stage 11, Soul Crystal (All Colors) - Stage 12, Sealed Majestic Necklace, Sealed Majestic Earring, and Sealed Majestic Ring</font>. Whew! An impressive list, eh? Meow!<br>
|
||||
I don't think I missed anything. Roy the Cat over there will trade medals for prizes. Meow~!<br>
|
||||
<a action="bypass -h Quest HeavyMedal 31229.htm">Back</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-game.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-game.htm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
I'll toss a coin, and you call either heads or tails. Meow! <font color="LEVEL">When you guess correctly, I'll raise your level!!</font><br>
|
||||
Now! Then... Fling! Whirl... whirl... whirl... slap!<br>
|
||||
Meow~ What's it gonna be? Heads or tails?<br>
|
||||
<a action="bypass -h Quest HeavyMedal heads">"Heads!"</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal tails">"Tails!"</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-0.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-0.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Heads, eh? Let's see...<br>
|
||||
Sorry, you lose! It's tails! Bring more glittering medals and I'll play the game with you again!
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-1.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-1.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Heads? Let's see...<br>
|
||||
Heads it is!!! Congratulations!<br>
|
||||
<font color="LEVEL">Here is the token for rabbit!</font> Carry this mark with you to prove that you belong to the rabbit level. If you lose it, you won't be able to prove your level. Be careful with it!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-10.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-10.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
You don't have enough glittering medals. Hmm, I thought you had enough... I suppose I was mistaken. Collect more glittering medals and bring them to me! Meow!!
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-2.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-2.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Heads? Let's see...<br>
|
||||
Heads it is!!! Congratulations!<br>
|
||||
<font color="LEVEL">Here is the token for hyena!</font> Carry this mark with you to prove that you belong to the hyena level. If you lose it, you won't be able to prove your level. Be careful with it!
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-3.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-3.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Heads? Let's see...<br>
|
||||
Heads it is!!! Congratulations!<br>
|
||||
<font color="LEVEL">Here is the token for fox!</font> Carry this mark with you to prove that you belong to the fox level. If you lose it, you won't be able to prove your level. Be careful with it!
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-4.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/events/HeavyMedal/31229-heads-4.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Heads? Let's see...<br>
|
||||
Heads it is!!! Congratulations!<br>
|
||||
<font color="LEVEL">Here is the token for wolf!</font> Carry this mark with you to prove that you belong to the wolf level. If you lose it, you won't be able to prove your level. Be careful with it!
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-0.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-0.htm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
A <font color="LEVEL">no level collector</font>, eh?<br>
|
||||
<font color="LEVEL">If you'd like to try to raise your level, give me 5 glittering medals and I'll play a game with you! Meow!</font> If you lose, you can always try again!<br>
|
||||
The game will help you develop the qualities you'll need as a collector. Meow! Your abilities are evaluated by the number of glittering medals you collect and your luck is tested by the number of times you win the game.<br>
|
||||
You can play as long as you have glittering medals! Meow!! Would you like to give it a try?<br>
|
||||
<a action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-1.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-1.htm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Ah, a <font color="LEVEL">rabbit</font>, eh?<br>
|
||||
<font color="LEVEL">To raise your level to hyena, pay me 10 glittering medals and I'll play a game with you! </font>Meow!<br>
|
||||
The game is a test of both your luck and skill, the two essential qualities of a collector. Meow! Your abilities are evaluated by the number of glittering medals you collect, and your luck is tested by how often you win the game.<br>
|
||||
If you lose, pay 10 more glittering medals and try again! You'll eventually win. Meow!! Would you like to give it a try?<br>
|
||||
<a action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-2.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-2.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Ah, a <font color="LEVEL">hyena</font>, eh? I know you've been working hard, so I'll keep the explanation brief.<br>
|
||||
<font color="LEVEL">If you wish to become a fox level collector, pay me 20 glittering medals and I'll play a game with you! Meow!</font> You can play as many times as you want, as long as you have enough glittering medals<br>
|
||||
This game tests your ablities as well as your luck. Meow! Your abilities are evaluated by the number of glittering medals you collect and your luck is tested by the number of times you win the game!<br>
|
||||
<a action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-3.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-3.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Wow! <font color="LEVEL">Are you really a fox level collector?</font> Meow! I wouldn't have known at first glance, but now that I get a closer look at you, I can see it in your eyes! I'm sure your'e already familiar with the game, so I'll keep the explanation brief...<br>
|
||||
<font color="LEVEL">If you wish to become a wolf level collector, pay me 40 glittering medals and I'll play a game with you! Meow!</font> You can play as many times as you want, as long as you have enough glittering medals.<br>
|
||||
The game tests both your abilities and your luck, the two essential qualities of a collector! Meow!<br>
|
||||
<a action="bypass -h Quest HeavyMedal game">"I want to play the coin-toss game."</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-4.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-lvl-4.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
<font color="LEVEL">Wow, a wolf?!</font> I can't remember the last time I met a wolf level collector! You've reached the highest level possible! Great job! Meow!!!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-no.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-no.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
You don't have enough glittering medals to play the coin-toss game. Collect some more medals and come back. Meow!!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-0.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-0.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Tails? Let's see...<br>
|
||||
Sorry, you lose! Go collect more glittering medals and try again. Meow!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-1.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-1.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Tails? Let's see...<br>
|
||||
Tails it is! Congratulations, you've reached <font color="LEVEL">rabbit level</font>! Keep this mark with you to prove it.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-10.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-10.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
You don't have enough glittering medals. Hmm, I thought you had enough... I suppose I was mistaken. Collect more glittering medals and bring them to me! Meow!!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-2.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-2.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Tails? Let me see...<br>
|
||||
Tails it is! Congratulations, you've reached <font color="LEVEL">hyena level</font>! Keep this mark with you to prove it.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-3.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-3.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Tails? Let's see...<br>
|
||||
Tails it is! Congratulations, you've reached <font color="LEVEL">fox level</font>! Keep this mark with you to prove it.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-4.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/events/HeavyMedal/31229-tails-4.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Tails? Let's see...<br>
|
||||
Tails it is! Congratulations, you've reached <font color="LEVEL">wolf level</font>! Keep this mark with you to prove it.
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/events/HeavyMedal/31229.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/events/HeavyMedal/31229.htm
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>Event Manager Winnie the Cat:<br>
|
||||
Meow! Greetings! I'm Winnie the Cat!<br>
|
||||
Our master, Collector Bashtal, formerly of the Bronze Key guild, has asked us to collect medals that were scattered throughout the world. We've come to this village as his personal emmissaries!<br>
|
||||
We're organizing a <font color="LEVEL">Medal Collecting Event</font>! Would you like to participate? Collect medals and take them to Roy the Cat over there!<br>
|
||||
There's so much to do, but I need a nap!! Meow!!<br>
|
||||
<a action="bypass -h Quest HeavyMedal talk">"I want to raise my level."</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal 31229-1.htm">"Tell me more about the event."</a><br>
|
||||
<a action="bypass -h Quest HeavyMedal 31229-2.htm">"What are the prizes?"</a>
|
||||
</body></html>
|
151
trunk/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java
vendored
Normal file
151
trunk/dist/game/data/scripts/events/HeavyMedal/HeavyMedal.java
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* 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 events.HeavyMedal;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.event.LongTimeEvent;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
|
||||
/**
|
||||
* Heavy Medals event AI.
|
||||
* @author Gnacik
|
||||
*/
|
||||
public final class HeavyMedal extends LongTimeEvent
|
||||
{
|
||||
private final static int CAT_ROY = 31228;
|
||||
private final static int CAT_WINNIE = 31229;
|
||||
private final static int GLITTERING_MEDAL = 6393;
|
||||
|
||||
private final static int WIN_CHANCE = 50;
|
||||
|
||||
private final static int[] MEDALS =
|
||||
{
|
||||
5,
|
||||
10,
|
||||
20,
|
||||
40
|
||||
};
|
||||
private final static int[] BADGES =
|
||||
{
|
||||
6399,
|
||||
6400,
|
||||
6401,
|
||||
6402
|
||||
};
|
||||
|
||||
private HeavyMedal()
|
||||
{
|
||||
super(HeavyMedal.class.getSimpleName(), "events");
|
||||
addStartNpc(CAT_ROY);
|
||||
addStartNpc(CAT_WINNIE);
|
||||
addTalkId(CAT_ROY);
|
||||
addTalkId(CAT_WINNIE);
|
||||
addFirstTalkId(CAT_ROY);
|
||||
addFirstTalkId(CAT_WINNIE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
String htmltext = event;
|
||||
int level = checkLevel(st);
|
||||
|
||||
if (event.equalsIgnoreCase("game"))
|
||||
{
|
||||
htmltext = st.getQuestItemsCount(GLITTERING_MEDAL) < MEDALS[level] ? "31229-no.htm" : "31229-game.htm";
|
||||
}
|
||||
else if (event.equalsIgnoreCase("heads") || event.equalsIgnoreCase("tails"))
|
||||
{
|
||||
if (st.getQuestItemsCount(GLITTERING_MEDAL) < MEDALS[level])
|
||||
{
|
||||
htmltext = "31229-" + event.toLowerCase() + "-10.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.takeItems(GLITTERING_MEDAL, MEDALS[level]);
|
||||
|
||||
if (getRandom(100) > WIN_CHANCE)
|
||||
{
|
||||
level = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (level > 0)
|
||||
{
|
||||
st.takeItems(BADGES[level - 1], -1);
|
||||
}
|
||||
st.giveItems(BADGES[level], 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
level++;
|
||||
}
|
||||
htmltext = "31229-" + event.toLowerCase() + "-" + String.valueOf(level) + ".htm";
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("talk"))
|
||||
{
|
||||
htmltext = String.valueOf(npc.getId()) + "-lvl-" + String.valueOf(level) + ".htm";
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getQuestState(getName()) == null)
|
||||
{
|
||||
newQuestState(player);
|
||||
}
|
||||
return npc.getId() + ".htm";
|
||||
}
|
||||
|
||||
public int checkLevel(QuestState st)
|
||||
{
|
||||
int _lev = 0;
|
||||
if (st.hasQuestItems(6402))
|
||||
{
|
||||
_lev = 4;
|
||||
}
|
||||
else if (st.hasQuestItems(6401))
|
||||
{
|
||||
_lev = 3;
|
||||
}
|
||||
else if (st.hasQuestItems(6400))
|
||||
{
|
||||
_lev = 2;
|
||||
}
|
||||
else if (st.hasQuestItems(6399))
|
||||
{
|
||||
_lev = 1;
|
||||
}
|
||||
return _lev;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new HeavyMedal();
|
||||
}
|
||||
}
|
93
trunk/dist/game/data/scripts/events/HeavyMedal/config.xml
vendored
Normal file
93
trunk/dist/game/data/scripts/events/HeavyMedal/config.xml
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<event name="Heavy Medal" active="27 02 2007-28 02 2007" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
|
||||
<droplist>
|
||||
<add item="6392" min="1" max="1" chance="45%" /> <!-- Event - Medal -->
|
||||
<add item="6393" min="1" max="1" chance="5%" /> <!-- Event - Glittering Medal -->
|
||||
</droplist>
|
||||
<spawnlist>
|
||||
<!-- Roy -->
|
||||
<add npc="31228" x="-44337" y="-113669" z="-224" heading="0" />
|
||||
<add npc="31228" x="-44628" y="-115409" z="-240" heading="22500" />
|
||||
<add npc="31228" x="-13073" y="122801" z="-3117" heading="0" />
|
||||
<add npc="31228" x="-13949" y="121934" z="-2988" heading="32768" />
|
||||
<add npc="31228" x="-14786" y="123686" z="-3117" heading="8192" />
|
||||
<add npc="31228" x="11281" y="15652" z="-4584" heading="25000" />
|
||||
<add npc="31228" x="11303" y="17732" z="-4574" heading="57344" />
|
||||
<add npc="31228" x="18178" y="145149" z="-3054" heading="7400" />
|
||||
<add npc="31228" x="19208" y="144380" z="-3097" heading="32768" />
|
||||
<add npc="31228" x="19508" y="145775" z="-3086" heading="48000" />
|
||||
<add npc="31228" x="17396" y="170259" z="-3507" heading="36000" />
|
||||
<add npc="31228" x="47151" y="49436" z="-3059" heading="32000" />
|
||||
<add npc="31228" x="44122" y="50784" z="-3059" heading="57344" />
|
||||
<add npc="31228" x="79806" y="55570" z="-1560" heading="0" />
|
||||
<add npc="31228" x="83328" y="55824" z="-1525" heading="32768" />
|
||||
<add npc="31228" x="80986" y="54504" z="-1525" heading="32768" />
|
||||
<add npc="31228" x="83332" y="149160" z="-3405" heading="49152" />
|
||||
<add npc="31228" x="82277" y="148598" z="-3467" heading="0" />
|
||||
<add npc="31228" x="81621" y="148725" z="-3467" heading="32768" />
|
||||
<add npc="31228" x="81680" y="145656" z="-3467" heading="32768" />
|
||||
<add npc="31228" x="114733" y="-178691" z="-821" heading="0" />
|
||||
<add npc="31228" x="115708" y="-182362" z="-1449" heading="0" />
|
||||
<add npc="31228" x="-80789" y="151073" z="-3043" heading="28672" />
|
||||
<add npc="31228" x="-84049" y="150176" z="-3129" heading="4096" />
|
||||
<add npc="31228" x="-82623" y="151666" z="-3129" heading="49152" />
|
||||
<add npc="31228" x="117498" y="76630" z="-2695" heading="38000" />
|
||||
<add npc="31228" x="115914" y="76449" z="-2711" heading="59000" />
|
||||
<add npc="31228" x="119536" y="76988" z="-2275" heading="40960" />
|
||||
<add npc="31228" x="-84516" y="242971" z="-3730" heading="34000" />
|
||||
<add npc="31228" x="-86003" y="243205" z="-3730" heading="60000" />
|
||||
<add npc="31228" x="147184" y="27405" z="-2192" heading="17000" />
|
||||
<add npc="31228" x="147920" y="25664" z="-2000" heading="16384" />
|
||||
<add npc="31228" x="111776" y="221104" z="-3543" heading="16384" />
|
||||
<add npc="31228" x="107904" y="218096" z="-3675" heading="0" />
|
||||
<add npc="31228" x="114920" y="220020" z="-3632" heading="32768" />
|
||||
<add npc="31228" x="147888" y="-58048" z="-2979" heading="49000" />
|
||||
<add npc="31228" x="147262" y="-56450" z="-2776" heading="33000" />
|
||||
<add npc="31228" x="44176" y="-48732" z="-800" heading="33000" />
|
||||
<add npc="31228" x="44319" y="-47640" z="-792" heading="50000" />
|
||||
<!-- Winnie -->
|
||||
<add npc="31229" x="-44342" y="-113726" z="-240" heading="0" />
|
||||
<add npc="31229" x="-44671" y="-115437" z="-240" heading="22500" />
|
||||
<add npc="31229" x="-13073" y="122841" z="-3117" heading="0" />
|
||||
<add npc="31229" x="-13972" y="121893" z="-2988" heading="32768" />
|
||||
<add npc="31229" x="-14843" y="123710" z="-3117" heading="8192" />
|
||||
<add npc="31229" x="11327" y="15682" z="-4584" heading="25000" />
|
||||
<add npc="31229" x="11243" y="17712" z="-4574" heading="57344" />
|
||||
<add npc="31229" x="18154" y="145192" z="-3054" heading="7400" />
|
||||
<add npc="31229" x="19214" y="144327" z="-3097" heading="32768" />
|
||||
<add npc="31229" x="19459" y="145775" z="-3086" heading="48000" />
|
||||
<add npc="31229" x="17418" y="170217" z="-3507" heading="36000" />
|
||||
<add npc="31229" x="47146" y="49382" z="-3059" heading="32000" />
|
||||
<add npc="31229" x="44157" y="50827" z="-3059" heading="57344" />
|
||||
<add npc="31229" x="79798" y="55629" z="-1560" heading="0" />
|
||||
<add npc="31229" x="83328" y="55769" z="-1525" heading="32768" />
|
||||
<add npc="31229" x="80986" y="54452" z="-1525" heading="32768" />
|
||||
<add npc="31229" x="83329" y="149095" z="-3405" heading="49152" />
|
||||
<add npc="31229" x="82277" y="148564" z="-3467" heading="0" />
|
||||
<add npc="31229" x="81620" y="148689" z="-3464" heading="32768" />
|
||||
<add npc="31229" x="81691" y="145610" z="-3467" heading="32768" />
|
||||
<add npc="31229" x="114719" y="-178742" z="-821" heading="0" />
|
||||
<add npc="31229" x="115708" y="-182422" z="-1449" heading="0" />
|
||||
<add npc="31229" x="-80731" y="151152" z="-3043" heading="28672" />
|
||||
<add npc="31229" x="-84097" y="150171" z="-3129" heading="4096" />
|
||||
<add npc="31229" x="-82678" y="151666" z="-3129" heading="49152" />
|
||||
<add npc="31229" x="117459" y="76664" z="-2695" heading="38000" />
|
||||
<add npc="31229" x="115936" y="76488" z="-2711" heading="59000" />
|
||||
<add npc="31229" x="119576" y="76940" z="-2275" heading="40960" />
|
||||
<add npc="31229" x="-84516" y="243015" z="-3730" heading="34000" />
|
||||
<add npc="31229" x="-86031" y="243153" z="-3730" heading="60000" />
|
||||
<add npc="31229" x="147124" y="27401" z="-2192" heading="40960" />
|
||||
<add npc="31229" x="147985" y="25664" z="-2000" heading="16384" />
|
||||
<add npc="31229" x="111724" y="221111" z="-3543" heading="16384" />
|
||||
<add npc="31229" x="107899" y="218149" z="-3675" heading="0" />
|
||||
<add npc="31229" x="114920" y="220080" z="-3632" heading="32768" />
|
||||
<add npc="31229" x="147924" y="-58052" z="-2979" heading="49000" />
|
||||
<add npc="31229" x="147285" y="-56461" z="-2776" heading="33000" />
|
||||
<add npc="31229" x="44176" y="-48688" z="-800" heading="33000" />
|
||||
<add npc="31229" x="44294" y="-47642" z="-792" heading="50000" />
|
||||
</spawnlist>
|
||||
<messages>
|
||||
<add type="onEnd" text="Heavy Medal: Event end!" />
|
||||
<add type="onEnter" text="Heavy Medal Event: Collect Medals and trade them for prizes at Event Cats in every town! Hurry up, since the event will end at Feb 28th!" />
|
||||
</messages>
|
||||
</event>
|
Reference in New Issue
Block a user