Proper Chef Monkey event.

This commit is contained in:
MobiusDev 2018-03-11 14:01:25 +00:00
parent bff6913595
commit 85ef7a5c95
20 changed files with 40 additions and 199 deletions

View File

@ -0,0 +1,9 @@
<html><body>Event Manager Chef Monkey:<br>
One morning, I opened my eyes and found myself a genius chef! I am Chef Monkey.<br>
I have come to the Aden Continent to bring happiness to all through my food! Even the monsters have eaten my food! They drop bananas when they die!<br>
The fish love the bait I make! They can't get enough! You can use my super bait to catch a special Tuna fish!<br>
Oh, that will be a great fishing! Especially if you have a delicious Banana Cocktail with you. Alleviate your tiredness with fishing!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3429201">"I want to buy Monkey Bait."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3429202">"I want to exchange Tuna fish."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3429203">"I heard you've succeeded in making awesome cocktail... Can I get one?"</button>
</body></html>

View File

@ -16,89 +16,31 @@
*/
package events.ChefMonkeyEvent;
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMenuSelect;
import com.l2jmobius.gameserver.model.quest.LongTimeEvent;
/**
* Chef Monkey Event<br>
* http://www.lineage2.com/en/news/events/chef-monkey-event-2016.php
* @author ChaosPaladin
* Chef Monkey Event
* @URL https://eu.4gameforum.com/threads/603119/
* @author Mobius
*/
public final class ChefMonkeyEvent extends LongTimeEvent
{
// NPCs
private static final int EV_CHEF_MONKEY = 34292;
// NPC
private static final int CHEF_MONKEY = 34292;
private ChefMonkeyEvent()
{
addStartNpc(EV_CHEF_MONKEY);
addFirstTalkId(EV_CHEF_MONKEY);
addTalkId(EV_CHEF_MONKEY);
addStartNpc(CHEF_MONKEY);
addFirstTalkId(CHEF_MONKEY);
addTalkId(CHEF_MONKEY);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "ev_chef_monkey001.htm";
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "ev_chef_monkey001.htm":
case "ev_chef_monkey002.htm":
case "ev_chef_monkey003.htm":
case "ev_chef_monkey004.htm":
case "ev_chef_monkey005.htm":
{
htmltext = event;
break;
}
}
return htmltext;
}
@RegisterEvent(EventType.ON_NPC_MENU_SELECT)
@RegisterType(ListenerRegisterType.NPC)
@Id(EV_CHEF_MONKEY)
public final void OnNpcMenuSelect(OnNpcMenuSelect event)
{
final L2PcInstance player = event.getTalker();
final L2Npc npc = event.getNpc();
final int ask = event.getAsk();
final int reply = event.getReply();
if (ask == -303)
{
if (reply == 2209)
{
// I want to buy Monkey Bait
MultisellData.getInstance().separateAndSend(2209, player, npc, false);
}
else if (reply == 2212)
{
// I want to exchange Tuna fish
MultisellData.getInstance().separateAndSend(2212, player, npc, false);
}
else if (reply == 3043)
{
// buy buff cocktail
MultisellData.getInstance().separateAndSend(3043, player, npc, false);
}
}
return "34292-01.htm";
}
public static void main(String[] args)

View File

@ -18,7 +18,7 @@
<add npc="34292" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
</spawnlist>
<messages>
<add type="onEnter" text="Chef Monkey Event will run!" />
<add type="onEnd" text="Chef Monkey Event will end!" />
<add type="onEnter" text="Chef Monkey Event active!" />
<add type="onEnd" text="Chef Monkey Event ends!" />
</messages>
</event>

View File

@ -1,7 +0,0 @@
<html><body>Event Manager Chef Monkey:<br>
So you'd like to know about the Monkey Bait, hmm? It's a type of bait that I've cooked up, and the fish love it! They can't get enough!<br>
Fishing with the <font color="LEVEL">Monkey Bait</font>, you'll be able to <font color="LEVEL">fish faster than before</font>! You'll also <font color="LEVEL">get more XP</font>.<br>
Sometimes, you'll get lucky and catch a <font color="LEVEL">Chef Monkey's Treasure Chest</font>. I lost it when the fish swarmed around me! But if you manage to fish the Treasure Chest around using my bait, it's yours! I don't have much need for it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey005.htm">"Tell me about Chef Monkeys' Banana Herb."</button>
<Button ALIGN=LEFT ICON="Return" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey001.htm">Back</button>
</body></html>

View File

@ -1,7 +0,0 @@
<html><body>Event Manager Chef Monkey:<br>
The Seed Talisman Manager in the Town of Aden also likes my cooking!<br>
He asked me to make him a month's worth, so I did.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey003.htm">"Tell me about the Monkey Bait."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey005.htm">"Tell me about Chef Monkeys' Banana Herb."</button>
<Button ALIGN=LEFT ICON="Return" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey001.htm">Back</button>
</body></html>

View File

@ -1,8 +0,0 @@
<html><body>Event Manager Chef Monkey:<br>
You'd like to hear about Chef Monkey's Banana Herb, eh? Haha, it's quite something!<br>
When I first arrive on the Aden continent, I didn't know anything, so I ended up cooking for the monsters! They loved it. When the monsters who had eaten my food died, they dropped Banana Herbs. It was strange.<br>
<font color="LEVEL">Chef Monkey's Banana Herb</font> increases <font color="LEVEL">P. Atk., M. Atk, P. Def., and M. Def. by 50% for 5 minutes, and increases XP and SP gained by 10%</font>!<br>
I've cooked for a lot of monsters! Go out and hunt them!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey003.htm">"Tell me about the Monkey Bait."</button>
<Button ALIGN=LEFT ICON="Return" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey001.htm">Back</button>
</body></html>

View File

@ -0,0 +1,9 @@
<html><body>Event Manager Chef Monkey:<br>
One morning, I opened my eyes and found myself a genius chef! I am Chef Monkey.<br>
I have come to the Aden Continent to bring happiness to all through my food! Even the monsters have eaten my food! They drop bananas when they die!<br>
The fish love the bait I make! They can't get enough! You can use my super bait to catch a special Tuna fish!<br>
Oh, that will be a great fishing! Especially if you have a delicious Banana Cocktail with you. Alleviate your tiredness with fishing!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3429201">"I want to buy Monkey Bait."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 3429202">"I want to exchange Tuna fish."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Multisell 3429203">"I heard you've succeeded in making awesome cocktail... Can I get one?"</button>
</body></html>

View File

@ -16,89 +16,31 @@
*/
package events.ChefMonkeyEvent;
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.npc.OnNpcMenuSelect;
import com.l2jmobius.gameserver.model.quest.LongTimeEvent;
/**
* Chef Monkey Event<br>
* http://www.lineage2.com/en/news/events/chef-monkey-event-2016.php
* @author ChaosPaladin
* Chef Monkey Event
* @URL https://eu.4gameforum.com/threads/603119/
* @author Mobius
*/
public final class ChefMonkeyEvent extends LongTimeEvent
{
// NPCs
private static final int EV_CHEF_MONKEY = 34292;
// NPC
private static final int CHEF_MONKEY = 34292;
private ChefMonkeyEvent()
{
addStartNpc(EV_CHEF_MONKEY);
addFirstTalkId(EV_CHEF_MONKEY);
addTalkId(EV_CHEF_MONKEY);
addStartNpc(CHEF_MONKEY);
addFirstTalkId(CHEF_MONKEY);
addTalkId(CHEF_MONKEY);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "ev_chef_monkey001.htm";
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "ev_chef_monkey001.htm":
case "ev_chef_monkey002.htm":
case "ev_chef_monkey003.htm":
case "ev_chef_monkey004.htm":
case "ev_chef_monkey005.htm":
{
htmltext = event;
break;
}
}
return htmltext;
}
@RegisterEvent(EventType.ON_NPC_MENU_SELECT)
@RegisterType(ListenerRegisterType.NPC)
@Id(EV_CHEF_MONKEY)
public final void OnNpcMenuSelect(OnNpcMenuSelect event)
{
final L2PcInstance player = event.getTalker();
final L2Npc npc = event.getNpc();
final int ask = event.getAsk();
final int reply = event.getReply();
if (ask == -303)
{
if (reply == 2209)
{
// I want to buy Monkey Bait
MultisellData.getInstance().separateAndSend(2209, player, npc, false);
}
else if (reply == 2212)
{
// I want to exchange Tuna fish
MultisellData.getInstance().separateAndSend(2212, player, npc, false);
}
else if (reply == 3043)
{
// buy buff cocktail
MultisellData.getInstance().separateAndSend(3043, player, npc, false);
}
}
return "34292-01.htm";
}
public static void main(String[] args)

View File

@ -18,7 +18,7 @@
<add npc="34292" x="117380" y="76684" z="-2672" heading="40961" /> <!-- Hunters Village -->
</spawnlist>
<messages>
<add type="onEnter" text="Chef Monkey Event will run!" />
<add type="onEnd" text="Chef Monkey Event will end!" />
<add type="onEnter" text="Chef Monkey Event active!" />
<add type="onEnd" text="Chef Monkey Event ends!" />
</messages>
</event>

View File

@ -1,10 +0,0 @@
<html><body>Event Manager Chef Monkey:<br>
One morning, I opened my eyes and found myself a genius chef! I am Chef Monkey.<br>
I have come to the Aden Continent to bring happiness to all through my food! Even the monsters have eaten my food! They drop bananas when they die!<br>
The fish love the bait I make! They cant get enough! You can use my super bait to catch a special Tuna fish!<br>
Oh, that will be a great fishing! Especially if you have a delicious Banana Cocktail with you. Alleviate your tiredness with fishing!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h menu_select?ask=-303&reply=2212">"I want to buy Monkey Bait."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h menu_select?ask=-303&reply=2209">"I want to exchange Tuna fish."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h menu_select?ask=-303&reply=3043">"I heard you've succeeded in making awesome cocktail... Can I get one?."</button>
</body></html>
View

View File

@ -1,7 +0,0 @@
<html><body>Event Manager Chef Monkey:<br>
Do you need it explained to you again?<br>
I , Chef Monkey, am a genius chef! Everybody is after my food: the monsters, the fish, even the Seed Talisman Manager!<br>
Theyll appreciate my cooking on the Aden Continent as well. Thats why Ive gone and prepared some Monkey Bait. The fish love it!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey003.htm">"Tell me about the Monkey Bait."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey005.htm">"Tell me about Chef Monkeys Banana Herb."</button>
</body></html>

View File

@ -1,7 +0,0 @@
<html><body>Event Manager Chef Monkey:<br>
So you'd like to know about the Monkey Bait, hmm? It's a type of bait that I've cooked up, and the fish love it! They can't get enough!<br>
Fishing with the <font color="LEVEL">Monkey Bait</font>, you'll be able to <font color="LEVEL">fish faster than before</font>! You'll also <font color="LEVEL">get more XP</font>.<br>
Sometimes, you'll get lucky and catch a <font color="LEVEL">Chef Monkey's Treasure Chest</font>. I lost it when the fish swarmed around me! But if you manage to fish the Treasure Chest around using my bait, it's yours! I don't have much need for it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey005.htm">"Tell me about Chef Monkeys' Banana Herb."</button>
<Button ALIGN=LEFT ICON="Return" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey001.htm">Back</button>
</body></html>

View File

@ -1,7 +0,0 @@
<html><body>Event Manager Chef Monkey:<br>
The Seed Talisman Manager in the Town of Aden also likes my cooking!<br>
He asked me to make him a month's worth, so I did.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey003.htm">"Tell me about the Monkey Bait."</button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey005.htm">"Tell me about Chef Monkeys' Banana Herb."</button>
<Button ALIGN=LEFT ICON="Return" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey001.htm">Back</button>
</body></html>

View File

@ -1,8 +0,0 @@
<html><body>Event Manager Chef Monkey:<br>
You'd like to hear about Chef Monkey's Banana Herb, eh? Haha, it's quite something!<br>
When I first arrive on the Aden continent, I didn't know anything, so I ended up cooking for the monsters! They loved it. When the monsters who had eaten my food died, they dropped Banana Herbs. It was strange.<br>
<font color="LEVEL">Chef Monkey's Banana Herb</font> increases <font color="LEVEL">P. Atk., M. Atk, P. Def., and M. Def. by 50% for 5 minutes, and increases XP and SP gained by 10%</font>!<br>
I've cooked for a lot of monsters! Go out and hunt them!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey003.htm">"Tell me about the Monkey Bait."</button>
<Button ALIGN=LEFT ICON="Return" action="bypass -h Quest ChefMonkeyEvent ev_chef_monkey001.htm">Back</button>
</body></html>