Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,18 @@ public void afterInitialize(MinecraftServer server) {
if (shouldRenderTraps(p)) {
return true;
}
if (p.getMissionData().isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) {
return finalIndex == 1;
}
if (p.getMissionData().isCurrentlyActive(MissionHelpMolbert.class)) {
return finalIndex == 1;
}
if(!p.getMissionData().isCurrentlyActive(MissionPlaceTraps.class)) {
return false;
}

MissionData.ActiveMission activeMission = p.getMissionData().getMission(MissionPlaceTraps.class).getKey();
List<Integer> placedTraps = (List<Integer>) activeMission.getCustomData().getOrDefault("placedTraps", new ArrayList<Integer>());
Logger.info("Placed traps for player {}: {}", p.getUsername(), placedTraps);
return !placedTraps.contains(finalIndex);
});
entities.add(text);
Expand Down Expand Up @@ -140,6 +145,9 @@ public void afterInitialize(MinecraftServer server) {
if (player.getMissionData().isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) {
return finalIndex == 1;
}
if (player.getMissionData().isCurrentlyActive(MissionHelpMolbert.class)) {
return finalIndex == 1;
}
if(!player.getMissionData().isCurrentlyActive(MissionPlaceTraps.class)) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.swofty.type.thepark.events;

import net.minestom.server.entity.Entity;
import net.swofty.type.generic.entity.npc.HypixelNPC;
import net.swofty.type.generic.event.EventNodes;
import net.swofty.type.generic.event.HypixelEvent;
Expand All @@ -9,12 +10,12 @@
import net.swofty.type.skyblockgeneric.mission.missions.thepark.birchpark.MissionTravelToThePark;
import net.swofty.type.skyblockgeneric.mission.missions.thepark.darkthicket.MissionFindTheCampfire;
import net.swofty.type.skyblockgeneric.mission.missions.thepark.darkthicket.MissionTravelToTheDarkThicket;
import net.swofty.type.skyblockgeneric.mission.missions.thepark.jungle.MissionTalkToMolbert;
import net.swofty.type.skyblockgeneric.mission.missions.thepark.jungle.MissionTalkToMolbertAgainAgainAgain;
import net.swofty.type.skyblockgeneric.mission.missions.thepark.savanna.MissionTravelToTheSavannaWoodland;
import net.swofty.type.skyblockgeneric.mission.missions.thepark.spruce.MissionTravelToTheSpruceWoods;
import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer;
import net.swofty.type.thepark.TypeTheParkLoader;
import net.swofty.type.thepark.npcs.NPCWorkerXavier;
import org.tinylog.Logger;

public class ActionContinueParkMission implements HypixelEventClass {

Expand Down Expand Up @@ -60,6 +61,11 @@ public void run(PlayerRegionChangeEvent event) {
});
}
}
case JUNGLE_ISLAND -> {
if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) {
TypeTheParkLoader.entities.forEach(Entity::updateViewableRule);
}
}
case null, default -> {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public void onClick(NPCInteractEvent event) {
if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) {
TypeTheParkLoader.entities.forEach(Entity::updateViewableRule);
setDialogue(player, "stuck").thenRun(() -> {
data.endMission(MissionTalkToMolbertAgainAgainAgain.class);
NPCOption.sendOption(player, "molbert", false, List.of(
new NPCOption.Option(
"help",
Expand All @@ -153,11 +154,10 @@ public void onClick(NPCInteractEvent event) {
"HELP MOLBERT",
(p) -> {
data.endMission(MissionHelpMolbert.class);
TypeTheParkLoader.entities.forEach(Entity::updateViewableRule);
}
)
));
if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class))
data.endMission(MissionTalkToMolbertAgainAgainAgain.class);
});
return;
}
Expand Down Expand Up @@ -231,7 +231,7 @@ protected DialogueSet[] dialogues(HypixelPlayer player) {
"...and then I ate the §6carrot §fbecause I was almost starving in there!"
}).build(),
DialogueSet.builder().key("option-iknow").lines(new String[]{
cOf, fine you caught me. But §cplease don't tell the others§f, they wouldn't want to be my friends anymore if they knew the truth.",
fOk, fine you caught me. But §cplease don't tell the others§f, they wouldn't want to be my friends anymore if they knew the truth.",
"Here, take this §acompensation §ffor all the trouble I made you go through.",
"I hope you forgive me after this and we can still be §6friends§f."
}).build(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public NPCRomero() {
super(new HumanConfiguration() {
@Override
public String[] holograms(HypixelPlayer player) {
return new String[]{};
return new String[]{" "};
}

@Override
Expand Down