RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
NieveDialogue.java
1package com.osroyale.content.dialogue.impl;
2
3import com.osroyale.content.skill.impl.slayer.SlayerOfferings;
4import com.osroyale.game.world.entity.mob.player.Player;
5import com.osroyale.content.dialogue.Dialogue;
6import com.osroyale.content.dialogue.DialogueFactory;
7import com.osroyale.content.dialogue.Expression;
8import com.osroyale.content.skill.impl.slayer.SlayerTab;
9
29
30public class NieveDialogue extends Dialogue {
31
32
33 @Override
34 public void sendDialogues(DialogueFactory factory) {
35 Player player = factory.getPlayer();
36
37 factory.sendNpcChat(6797, Expression.HAPPY, "Hello adventurer, how may I help you?").sendOption("Offer slayer items", () -> sell(factory), "Open slayer manager", () -> factory.onAction(() -> player.slayer.open(SlayerTab.MAIN)), "Nevermind", () -> factory.onAction(player.interfaceManager::close));
38 factory.execute();
39 }
40
41 private void sell(DialogueFactory factory) {
42 factory.sendOption("What do I get for my offerings?", () -> {
43 factory.sendNpcChat(6797, "You will get slayer experience and points!");
44 }, "What items can be offered?", () -> {
45 factory.sendStatement("Ensouled heads", "Ancient shards & Dark Totem pieces");
46 }, "Offer all items", () -> {
47 factory.onAction(() -> SlayerOfferings.offer(factory.getPlayer()));
48 }, "Nevermind", factory::clear);
49 }
50
51}
final DialogueFactory sendStatement(String... lines)
final DialogueFactory sendOption(String option1, Runnable action1, String option2, Runnable action2)
final DialogueFactory onAction(Runnable action)
final DialogueFactory sendNpcChat(int id, String... lines)