This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
<html><body>Master Yogi:<br>
Are you ready to test your luck?<br>
If Fortune holds you in her embrace, then you could win a prize beyond your wildest expectations. And just remember, <font color="LEVEL">you can only have one staff at a time</font>.<br>
First, you must purchase a <font color="LEVEL">Staff of Master Yogi</font>. This item will cost a partly 1,000,000 adena, and will serve as the item to be enchanted.<br>
Second, you must obtain <font color="LEVEL">special enchant scrolls</font>.<br>
There are several ways this can be done. Every 6 hours I will sell you a package of 24 scrolls for only 5,000,000 adena. You can also obtain scrolls through normal hunting. Or you can buy additional scrolls from me for a slightly greater cost.<br>
Different rewards are given depending on the number of successful enchants applied to the weapon. And just like with normal enchanting, if you fail you will lose the staff. However unlike regular enchanting, enchantment failure will not result in crystals.<br>
If you exercise patience and perseverance, then I have no doubt you will be successful!<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-2.htm">Ask about the prizes.</a><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Participate in the event.</a><br>
<a action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,27 @@
<html><body>Master Yogi:<br>
Here is the reward list for the number of successful Enchants. Why not give it try?<br><br>
Enchant +1: No reward<br>
Enchant +2: No reward<br>
Enchant +3: No reward<br>
Enchant +4: 1 Small Firecracker<br>
Enchant +5: 2 Small Firecrackers, 1 Large Fireworks<br>
Enchant +6: 3 Small Firecrackers, 2 Large Fireworks<br>
Enchant +7: 1 Shadow-Type Hair Accessory<br>
Enchant +8: 1 Scroll: Enchant D-Grade Weapon<br>
Enchant +9: 1 Scroll: Enchant D-Grade Weapon, 1 Scroll: Enchant Armor<br>
Enchant +10: 1 Scroll: Enchant C-Grade Weapon<br>
Enchant +11: 1 Scroll: Enchant C-Grade Weapon, 1 Scroll: Enchant Armor<br>
Enchant +12: 1 Scroll: Enchant B-Grade Weapon<br>
Enchant +13: 1 Scroll: Enchant A-Grade Weapon<br>
Enchant +14: 1 Hair Accessory<br>
Enchant +15: 1 S-Grade Accessory<br>
Enchant +16: Top-Grade Life Stone<br>
Enchant +17: 1 Scroll: Enchant S-Grade Weapon<br>
Enchant +18: 1 S-Grade Armor<br>
Enchant +19: 1 S-Grade Weapon<br>
Enchant +20: 1 Stage 14 Soul Crystal<br>
Enchant +21: 1 Top-Grade Life Stone, 1 High-Grade Life Stone, 1 Soul Crystal<br>
Enchant +22: 1 S80-Grade Armor<br>
Enchant +23: 1 S80-Grade Weapon<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Master Yogi:<br>
I'm sorry but you create character after event start...<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Master Yogi:<br>
Aha! So you decided to accept the challenge, eh? Outstanding! Select one of the following to get started. And don't forget, you can only have one staff in your inventory at any given time. And the staff must be equipped in order to receive a reward. May the light of guidance fall upon you.<br><br>
<a action="bypass -h Quest MasterOfEnchanting buy_staff">Purchase Staff of Master Yogi (1,000,000 Adena).</a><br>
<a action="bypass -h Quest MasterOfEnchanting buy_scroll_24">Purchase 24 enchant Scrolls (5,000,000 adena).</a><br>
<a action="bypass -h Quest MasterOfEnchanting buy_scroll_1">Purchase 1 Enchant Scroll (500,000 Adena).</a><br>
<a action="bypass -h Quest MasterOfEnchanting buy_scroll_10">Purchase 10 Enchant Scrolls (5,000,000 Adena)</a><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-2.htm">View the prize list.</a><br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Master Yogi:<br>
The basic requirements are an <font color="LEVEL">Enchant success rate of at least +4 and an equipped staff.</font>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Master Yogi:<br>
Congratulations on beginning your enchants.<br>
It looks like luck is beginning to favor you. Don't be afraid to challenge yourself, my child. Well done!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Master Yogi:<br>
Tsk tsk. You don't have the money required to purchase this item.<br><br>
That means you must earn some more money or let this chance slip through your fingers. The choice is yours.<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Master Yogi:<br>
Ummm.... you seem a little shy on funds.<br>
Unless you have more money, I'm afraid I can't sell you these goods.<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Master Yogi:<br>
Nia Kujarako! You don't have enough Adena.<br>
Are you telling me that you don't even have a few thousand Adena? How disappointing.<br>
Go hunt and earn some quickly. You may not get another chance like this...<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Master Yogi:<br>
Ah, excellent, great hero! May the Yogi's sense be with you...<br>
I foresee good things in your future. Do not be afraid to aim high!<br>
Good luck! I hope to see you again.<br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Master Yogi:<br>
Ha ha!<br>
This package of 24 can only be purchased every 6 hours.<br>
If you look in your chat window, you should see a system message that tells you how much time is remaining before you can make this purchase again.<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Master Yogi:<br>
Congratulations on taking the first step! Now all you need are some scrolls, and you'll be on your way.<br>
Just remember young one, peace makes plenty.<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Master Yogi:<br>
Either you have insufficient adena or you already possess a Staff of Master Yogi. Remember, <font color="LEVEL">you can only have one!</font><br>
Why, you ask?<br>
Only the gods know. It is not our place to question their divine providence.<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Back</a>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Master Yogi:<br>
Hello child, and welcome.<br>
My name is Master Yogi, and I have come back to the lands of Aden and Elmore in possession of much knowledge and enlightenment.<br>
I have long walked the way of the ascetic and have only returned from my sojourn to share my wisdom with you.<br>
With me, I bring a new event. And through this event, you too will learn the secrets and mysteries surrounding enchantment.<br><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-1.htm">Ask about the event.</a><br>
<a action="bypass -h Quest MasterOfEnchanting 32599-participate.htm">Participate in the event.</a><br>
<a action="bypass -h Quest MasterOfEnchanting receive_reward">Receive reward.</a>
</body></html>

View File

@@ -0,0 +1,288 @@
/*
* 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.MasterOfEnchanting;
import java.util.Date;
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.itemcontainer.Inventory;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
/**
* Master of Enchanting event AI.
* @author Gnacik
*/
public final class MasterOfEnchanting extends LongTimeEvent
{
// NPC
private static final int MASTER_YOGI = 32599;
// Items
private static final int MASTER_YOGI_STAFF = 13539;
private static final int MASTER_YOGI_SCROLL = 13540;
// Misc
private static final int STAFF_PRICE = 1000000;
private static final int SCROLL_24_PRICE = 5000000;
private static final int SCROLL_24_TIME = 6;
private static final int SCROLL_1_PRICE = 500000;
private static final int SCROLL_10_PRICE = 5000000;
private static final int[] HAT_SHADOW_REWARD =
{
13074,
13075,
13076
};
private static final int[] HAT_EVENT_REWARD =
{
13518,
13519,
13522
};
private static final int[] CRYSTAL_REWARD =
{
9570,
9571,
9572
};
@SuppressWarnings("deprecation")
private static final Date _eventStart = new Date(2011, 7, 1);
private MasterOfEnchanting()
{
super(MasterOfEnchanting.class.getSimpleName(), "events");
addStartNpc(MASTER_YOGI);
addFirstTalkId(MASTER_YOGI);
addTalkId(MASTER_YOGI);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
QuestState st = getQuestState(player, false);
if (event.equalsIgnoreCase("buy_staff"))
{
if (!st.hasQuestItems(MASTER_YOGI_STAFF) && (st.getQuestItemsCount(Inventory.ADENA_ID) > STAFF_PRICE))
{
st.takeItems(Inventory.ADENA_ID, STAFF_PRICE);
st.giveItems(MASTER_YOGI_STAFF, 1);
htmltext = "32599-staffbuyed.htm";
}
else
{
htmltext = "32599-staffcant.htm";
}
}
else if (event.equalsIgnoreCase("buy_scroll_24"))
{
long _curr_time = System.currentTimeMillis();
String value = loadGlobalQuestVar(player.getAccountName());
long _reuse_time = value == "" ? 0 : Long.parseLong(value);
if (player.getCreateDate().after(_eventStart))
{
return "32599-bidth.htm";
}
if (_curr_time > _reuse_time)
{
if (st.getQuestItemsCount(Inventory.ADENA_ID) > SCROLL_24_PRICE)
{
st.takeItems(Inventory.ADENA_ID, SCROLL_24_PRICE);
st.giveItems(MASTER_YOGI_SCROLL, 24);
saveGlobalQuestVar(player.getAccountName(), Long.toString(System.currentTimeMillis() + (SCROLL_24_TIME * 3600000)));
htmltext = "32599-scroll24.htm";
}
else
{
htmltext = "32599-s24-no.htm";
}
}
else
{
long _remaining_time = (_reuse_time - _curr_time) / 1000;
int hours = (int) _remaining_time / 3600;
int minutes = ((int) _remaining_time % 3600) / 60;
if (hours > 0)
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_HOUR_S_AND_S2_MINUTE_S_REMAINING_UNTIL_THE_ITEM_CAN_BE_PURCHASED_AGAIN);
sm.addInt(hours);
sm.addInt(minutes);
player.sendPacket(sm);
htmltext = "32599-scroll24.htm";
}
else if (minutes > 0)
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_MINUTE_S_REMAINING_UNTIL_THE_ITEM_CAN_BE_PURCHASED_AGAIN);
sm.addInt(minutes);
player.sendPacket(sm);
htmltext = "32599-scroll24.htm";
}
else
{
// Little glitch. There is no SystemMessage with seconds only.
// If time is less than 1 minute player can buy scrolls
if (st.getQuestItemsCount(Inventory.ADENA_ID) > SCROLL_24_PRICE)
{
st.takeItems(Inventory.ADENA_ID, SCROLL_24_PRICE);
st.giveItems(MASTER_YOGI_SCROLL, 24);
saveGlobalQuestVar(player.getAccountName(), Long.toString(System.currentTimeMillis() + (SCROLL_24_TIME * 3600000)));
htmltext = "32599-scroll24.htm";
}
else
{
htmltext = "32599-s24-no.htm";
}
}
}
}
else if (event.equalsIgnoreCase("buy_scroll_1"))
{
if (st.getQuestItemsCount(Inventory.ADENA_ID) > SCROLL_1_PRICE)
{
st.takeItems(Inventory.ADENA_ID, SCROLL_1_PRICE);
st.giveItems(MASTER_YOGI_SCROLL, 1);
htmltext = "32599-scroll-ok.htm";
}
else
{
htmltext = "32599-s1-no.htm";
}
}
else if (event.equalsIgnoreCase("buy_scroll_10"))
{
if (st.getQuestItemsCount(Inventory.ADENA_ID) > SCROLL_10_PRICE)
{
st.takeItems(Inventory.ADENA_ID, SCROLL_10_PRICE);
st.giveItems(MASTER_YOGI_SCROLL, 10);
htmltext = "32599-scroll-ok.htm";
}
else
{
htmltext = "32599-s10-no.htm";
}
}
else if (event.equalsIgnoreCase("receive_reward"))
{
if ((st.getItemEquipped(Inventory.PAPERDOLL_RHAND) == MASTER_YOGI_STAFF) && (st.getEnchantLevel(MASTER_YOGI_STAFF) > 3))
{
switch (st.getEnchantLevel(MASTER_YOGI_STAFF))
{
case 4:
st.giveItems(6406, 1); // Firework
break;
case 5:
st.giveItems(6406, 2); // Firework
st.giveItems(6407, 1); // Large Firework
break;
case 6:
st.giveItems(6406, 3); // Firework
st.giveItems(6407, 2); // Large Firework
break;
case 7:
st.giveItems(HAT_SHADOW_REWARD[getRandom(3)], 1);
break;
case 8:
st.giveItems(955, 1); // Scroll: Enchant Weapon (D)
break;
case 9:
st.giveItems(955, 1); // Scroll: Enchant Weapon (D)
st.giveItems(956, 1); // Scroll: Enchant Armor (D)
break;
case 10:
st.giveItems(951, 1); // Scroll: Enchant Weapon (C)
break;
case 11:
st.giveItems(951, 1); // Scroll: Enchant Weapon (C)
st.giveItems(952, 1); // Scroll: Enchant Armor (C)
break;
case 12:
st.giveItems(948, 1); // Scroll: Enchant Armor (B)
break;
case 13:
st.giveItems(729, 1); // Scroll: Enchant Weapon (A)
break;
case 14:
st.giveItems(HAT_EVENT_REWARD[getRandom(3)], 1);
break;
case 15:
st.giveItems(13992, 1); // Grade S Accessory Chest (Event)
break;
case 16:
st.giveItems(8762, 1); // Top-Grade Life Stone: level 76
break;
case 17:
st.giveItems(959, 1); // Scroll: Enchant Weapon (S)
break;
case 18:
st.giveItems(13991, 1); // Grade S Armor Chest (Event)
break;
case 19:
st.giveItems(13990, 1); // Grade S Weapon Chest (Event)
break;
case 20:
st.giveItems(CRYSTAL_REWARD[getRandom(3)], 1); // Red/Blue/Green Soul Crystal - Stage 14
break;
case 21:
st.giveItems(8762, 1); // Top-Grade Life Stone: level 76
st.giveItems(8752, 1); // High-Grade Life Stone: level 76
st.giveItems(CRYSTAL_REWARD[getRandom(3)], 1); // Red/Blue/Green Soul Crystal - Stage 14
break;
case 22:
st.giveItems(13989, 1); // S80 Grade Armor Chest (Event)
break;
case 23:
st.giveItems(13988, 1); // S80 Grade Weapon Chest (Event)
default:
if (st.getEnchantLevel(MASTER_YOGI_STAFF) > 23)
{
st.giveItems(13988, 1); // S80 Grade Weapon Chest (Event)
}
break;
}
st.takeItems(MASTER_YOGI_STAFF, 1);
htmltext = "32599-rewardok.htm";
}
else
{
htmltext = "32599-rewardnostaff.htm";
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (player.getQuestState(getName()) == null)
{
newQuestState(player);
}
return npc.getId() + ".htm";
}
public static void main(String[] args)
{
new MasterOfEnchanting();
}
}

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<event name="Master of Enchanting" active="27 02 2010-28 02 2010" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/eventConfig.xsd">
<droplist>
<add item="13540" min="1" max="1" chance="1%" /> <!-- Master Yogi's Scroll: Enchant Weapon -->
</droplist>
<spawnlist>
<add npc="32599" x="16111" y="142850" z="-2707" heading="16000" />
<add npc="32599" x="17275" y="145000" z="-3037" heading="25000" />
<add npc="32599" x="83037" y="149324" z="-3470" heading="44000" />
<add npc="32599" x="82145" y="148609" z="-3468" heading="0" />
<add npc="32599" x="81755" y="146487" z="-3534" heading="32768" />
<add npc="32599" x="-81031" y="150038" z="-3045" heading="0" />
<add npc="32599" x="-83156" y="150994" z="-3130" heading="0" />
<add npc="32599" x="-13727" y="122117" z="-2990" heading="16384" />
<add npc="32599" x="-14129" y="123869" z="-3118" heading="40959" />
<add npc="32599" x="-84411" y="244813" z="-3730" heading="57343" />
<add npc="32599" x="-84023" y="243051" z="-3730" heading="4096" />
<add npc="32599" x="46908" y="50856" z="-2997" heading="8192" />
<add npc="32599" x="45538" y="48357" z="-3061" heading="18000" />
<add npc="32599" x="9929" y="16324" z="-4576" heading="62999" />
<add npc="32599" x="11546" y="17599" z="-4586" heading="46900" />
<add npc="32599" x="81987" y="53723" z="-1497" heading="0" />
<add npc="32599" x="81083" y="56118" z="-1562" heading="32768" />
<add npc="32599" x="147200" y="25614" z="-2014" heading="16384" />
<add npc="32599" x="148557" y="26806" z="-2206" heading="32768" />
<add npc="32599" x="117356" y="76708" z="-2695" heading="49151" />
<add npc="32599" x="115887" y="76382" z="-2714" heading="0" />
<add npc="32599" x="-117239" y="46842" z="367" heading="49151" />
<add npc="32599" x="-119494" y="44882" z="367" heading="24576" />
<add npc="32599" x="111004" y="218928" z="-3544" heading="16384" />
<add npc="32599" x="108426" y="221876" z="-3600" heading="49151" />
<add npc="32599" x="-45278" y="-112766" z="-241" heading="0" />
<add npc="32599" x="-45372" y="-114104" z="-241" heading="16384" />
<add npc="32599" x="115096" y="-178370" z="-891" heading="0" />
<add npc="32599" x="116199" y="-182694" z="-1506" heading="0" />
<add npc="32599" x="86865" y="-142915" z="-1341" heading="26000" />
<add npc="32599" x="85584" y="-142490" z="-1343" heading="0" />
<add npc="32599" x="147421" y="-55435" z="-2736" heading="49151" />
<add npc="32599" x="148206" y="-55786" z="-2782" heading="61439" />
<add npc="32599" x="43165" y="-48461" z="-797" heading="17000" />
<add npc="32599" x="43966" y="-47709" z="-798" heading="49999" />
</spawnlist>
<messages>
<add type="onEnd" text="Master of Enchantig: event end!" />
<add type="onEnter" text="Master of enchanting: Event ongoing! Visit Master Yogi!" />
</messages>
</event>