RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
ConstructionDialogue.java
1package com.osroyale.content.dialogue.impl;
2
3import com.osroyale.game.world.entity.mob.player.Player;
4import com.osroyale.content.dialogue.Dialogue;
5import com.osroyale.content.dialogue.DialogueFactory;
6import com.osroyale.content.dialogue.Expression;
7import com.osroyale.content.skill.impl.construction.BuildableMap;
8
30
31public class ConstructionDialogue extends Dialogue {
32
33 private final int id = 5419;
34
35 @Override
36 public void sendDialogues(DialogueFactory factory) {
37 Player player = factory.getPlayer();
38
39 factory.sendNpcChat(id, Expression.HAPPY, "Hello #name, how may I assist you?").sendOption("I would like to purchase a house (<col=ff0000>1m coins</col>)", () -> {
40 factory.onAction(() -> {
41 player.house.purchase();
42 });
43
44 }, "I want to change my house location", () -> {
45
46 factory.onAction(() -> {
47 factory.sendNpcChat(id, Expression.HAPPY, "Be advised, changing home location will result", "in you <col=ff0000>losing</col> all house object.").sendOption("Small cave (100,000gp)", () -> {
48 factory.onAction(() -> {
49 player.house.location(BuildableMap.SMALL_CAVE);
50 });
51
52 }, "Throne room (15,000,000gp)", () -> {
53 factory.onAction(() -> {
54 player.house.location(BuildableMap.THRONE_ROOM);
55 });
56 }).execute();
57 });
58
59 }, "Nevermind", () -> {
60 factory.onAction(() -> {
61 player.interfaceManager.close();
62 });
63
64 }).execute();
65 }
66}
final DialogueFactory sendOption(String option1, Runnable action1, String option2, Runnable action2)
final DialogueFactory onAction(Runnable action)
final DialogueFactory sendNpcChat(int id, String... lines)