Addition of Goldberg's Room instance.

Contributed by robikbobik.
This commit is contained in:
MobiusDevelopment 2019-11-26 19:04:03 +00:00
parent 880d04e0c6
commit a7a9736216
6 changed files with 340 additions and 25 deletions

View File

@ -0,0 +1,9 @@
<html>
<body>
Sora:<br>
I came across a room by chance. There was a terrifying Steward holding the key, managing that place.<br>
Inside that toom, there was the ancient Pirate Captain Golberg. Just like the legend, he was super big and scary. It will be hard to deal with him by yourself.<br>
If you got the <font color=LEVEL>Golberg's Room Key</font> from the <font color=LEVEL>Steward</font>, I will send you there.<br>
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest GolbergRoom ENTER">"I want to go to Golberg's Room"</button>
</body>
</html>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<instance id="207" maxWorlds="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
<time duration="20" empty="0" />
<locations>
<enter type="FIXED">
<location x="11712" y="-84973" z="-10965" />
</enter>
<exit type="ORIGIN" />
</locations>
<conditions>
<condition type="Party" />
<condition type="PartyLeader" />
<condition type="GroupMin">
<param name="limit" value="18" /> <!-- The Kamael update -->
</condition>
<condition type="GroupMax">
<param name="limit" value="100" />
</condition>
<condition type="Level">
<param name="min" value="78" />
<param name="max" value="85" />
</condition>
<condition type="Distance" />
</conditions>
<spawnlist>
<group>
<npc id="18359" x="11700" y="-87948" z="-10948" heading="16383" /> <!-- Golberg -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,250 @@
/*
* This file is part of the L2J Mobius project.
*
* 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
*/
package instances.GolbergRoom;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.instancezone.Instance;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
/**
* @author RobikBobik
* @NOTE: Party instance retail like work.
* @TODO: Find what all drops from GOLBERG_TREASURE_CHEST
* @TODO: Golberg skills
*/
public class GolbergRoom extends AbstractInstance
{
// NPCs
private static final int SORA = 34091;
private static final int GOLBERG = 18359;
private static final int GOLBERG_TREASURE_CHEST = 18357;
// Items
private static final int GOLBERG_KEY_ROOM = 91636;
// Misc
private static final int TEMPLATE_ID = 207;
private MonsterInstance _golberg;
private int _treasureCounter;
public GolbergRoom()
{
super(TEMPLATE_ID);
addStartNpc(SORA);
addKillId(GOLBERG, GOLBERG_TREASURE_CHEST);
addInstanceLeaveId(TEMPLATE_ID);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
switch (event)
{
case "ENTER":
{
final Party party = player.getParty();
if (party == null)
{
return "no_party.htm";
}
if (!hasQuestItems(player, GOLBERG_KEY_ROOM))
{
return "no_item.htm";
}
takeItems(player, GOLBERG_KEY_ROOM, 1);
enterInstance(player, npc, TEMPLATE_ID);
final Instance world = player.getInstanceWorld();
if (world != null)
{
for (PlayerInstance member : party.getMembers())
{
if (member == player)
{
continue;
}
member.teleToLocation(player, 10, world);
}
_golberg = (MonsterInstance) player.getInstanceWorld().getNpc(18359);
startQuestTimer("GOLBERG_MOVE", 5000, _golberg, player);
}
break;
}
case "GOLBERG_MOVE":
{
final Instance world = player.getInstanceWorld();
if (world != null)
{
player.sendPacket(new ExShowScreenMessage("Rats have become kings while I've been dormant.", 5000));
startQuestTimer("NEXT_TEXT", 7000, _golberg, player);
}
npc.moveToLocation(11711, -86508, -10928, 0);
break;
}
case "NEXT_TEXT":
{
final Instance world = player.getInstanceWorld();
if (world != null)
{
player.sendPacket(new ExShowScreenMessage("Zaken or whatever is going wild all over the southern sea.", 5000));
startQuestTimer("NEXT_TEXT_2", 7000, _golberg, player);
}
break;
}
case "NEXT_TEXT_2":
{
final Instance world = player.getInstanceWorld();
if (world != null)
{
player.sendPacket(new ExShowScreenMessage("Who dare enter my place? Zaken sent you?", 5000));
}
break;
}
case "SPAWN_TRESURE":
{
if (player.isGM())
{
if (_treasureCounter <= 27)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
}
else if (player.getParty() != null)
{
switch (player.getParty().getMemberCount())
{
case 2:
{
if (_treasureCounter <= 1)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
break;
}
case 3:
{
if (_treasureCounter <= 2)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
break;
}
case 4:
{
if (_treasureCounter <= 4)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
break;
}
case 5:
{
if (_treasureCounter <= 7)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
break;
}
case 6:
{
if (_treasureCounter <= 10)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
break;
}
case 7:
{
if (_treasureCounter <= 13)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
break;
}
case 8:
{
if (_treasureCounter <= 16)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
break;
}
case 9:
{
if (_treasureCounter <= 27)
{
addSpawn(GOLBERG_TREASURE_CHEST, 11708 + getRandom(-1000, 1000), -86505 + getRandom(-1000, 1000), -10928, 0, true, -1, true, player.getInstanceId());
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
_treasureCounter++;
}
break;
}
}
}
break;
}
}
return null;
}
@Override
public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
{
switch (npc.getId())
{
case GOLBERG:
{
startQuestTimer("SPAWN_TRESURE", 1000, npc, player);
final Instance world = npc.getInstanceWorld();
if (world != null)
{
world.finishInstance();
}
break;
}
case GOLBERG_TREASURE_CHEST:
{
break;
}
}
return super.onKill(npc, player, isSummon);
}
public static void main(String[] args)
{
new GolbergRoom();
}
}

View File

@ -0,0 +1,6 @@
<html>
<body>
Sora:<br>
Ahh, so sorry. I cannot to teleport in to room of Golberg. You need to have <font color=LEVEL>Golberg Room Key</font>.<br>
</body>
</html>

View File

@ -0,0 +1,6 @@
<html>
<body>
Sora:<br>
You cannot face the legendary Pirate GOlberg by yourself. You will need <font color=LEVEL>at least 2 people.</font>.<br>
</body>
</html>

View File

@ -1051,24 +1051,27 @@
<height normal="12" />
</collision>
</npc>
<npc id="18357" level="85" type="Npc" name="Goldberg's Treasure Chest">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<npc id="18357" level="80" type="Monster" name="Goldberg's Treasure Chest">
<race>ETC</race>
<sex>FEMALE</sex>
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
<vitals hp="8446" hpRegen="10.5" mp="2355" mpRegen="3.6" />
<sex>MALE</sex>
<acquire exp="0" sp="0" />
<stats str="40" int="21" dex="30" wit="20" con="43" men="10">
<vitals hp="6076.8" hpRegen="8.5" mp="2794.785" mpRegen="3" />
<attack physical="970.5375485" magical="662.7513291" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="341.375" magical="249.80341" />
<speed>
<walk ground="60" />
<run ground="120" />
<walk ground="80" />
<run ground="150" />
</speed>
<attack physical="1950.2231755595" magical="1331.5869440987" critical="4" attackSpeed="253" range="40" />
<defence physical="405.85106382979" magical="297.0297029703" />
</stats>
<status attackable="false" />
<status attackable="true" />
<collision>
<radius normal="5" />
<height normal="12" />
<radius normal="8.5" />
<height normal="8.5" />
</collision>
<skillList>
<skill id="4416" level="2" /> <!-- Magical Creatures -->
</skillList>
</npc>
<npc id="18358" level="85" type="Npc" name="Goldberg's Steward">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
@ -1089,24 +1092,35 @@
<height normal="12" />
</collision>
</npc>
<npc id="18359" level="85" type="Npc" name="Goldberg" title="Ancient Pirate Captain">
<!-- AUTO GENERATED NPC TODO: FIX IT -->
<race>ETC</race>
<sex>FEMALE</sex>
<stats str="88" int="79" dex="55" wit="78" con="82" men="78">
<vitals hp="8446" hpRegen="10.5" mp="2355" mpRegen="3.6" />
<npc id="18359" level="83" type="Monster" name="Goldberg" title="Ancient Pirate Captain">
<race>UNDEAD</race>
<sex>MALE</sex>
<acquire exp="3556791" sp="96034" />
<stats str="40" int="21" dex="30" wit="20" con="43" men="10">
<vitals hp="19837.487603306" hpRegen="8.5" mp="3554.208" mpRegen="3" />
<attack physical="1099.423617" magical="750.7638096" random="30" critical="4.75" accuracy="4.75" attackSpeed="250" type="SWORD" range="40" distance="80" width="120" />
<defence physical="353.86144" magical="258.94045" />
<speed>
<walk ground="60" />
<run ground="120" />
<walk ground="40" />
<run ground="175" />
</speed>
<attack physical="1950.2231755595" magical="1331.5869440987" critical="4" attackSpeed="253" range="40" />
<defence physical="405.85106382979" magical="297.0297029703" />
</stats>
<status attackable="false" />
<status attackable="true" />
<collision>
<radius normal="5" />
<height normal="12" />
<radius normal="50" />
<height normal="87" />
</collision>
<skillList>
<skill id="4416" level="1" /> <!-- Undead -->
<skill id="4408" level="20" /> <!-- HP Increase (12x) -->
<skill id="4410" level="16" /> <!-- Very Strong P. Atk. -->
<skill id="4411" level="13" /> <!-- Slightly Strong M. Atk. -->
<skill id="4412" level="18" /> <!-- Extremely Strong P. Def. -->
<skill id="4413" level="15" /> <!-- Strong M. Def. -->
<skill id="4085" level="1" /> <!-- Critical Damage -->
<skill id="4086" level="1" /> <!-- Critical Chance -->
<skill id="4458" level="1" /> <!-- Spear Vulnerability -->
</skillList>
</npc>
<npc id="18360" level="85" type="Npc" name="Sayha's Dor">
<!-- AUTO GENERATED NPC TODO: FIX IT -->