Sends a player a dialogue.
14 {
15 Player player = factory.getPlayer();
16
17 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>)", () -> {
18 factory.onAction(() -> {
19 player.house.purchase();
20 });
21
22 }, "I want to change my house location", () -> {
23
24 factory.onAction(() -> {
25 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)", () -> {
26 factory.onAction(() -> {
27 player.house.location(BuildableMap.SMALL_CAVE);
28 });
29
30 }, "Throne room (15,000,000gp)", () -> {
31 factory.onAction(() -> {
32 player.house.location(BuildableMap.THRONE_ROOM);
33 });
34 }).execute();
35 });
36
37 }, "Nevermind", () -> {
38 factory.onAction(() -> {
39 player.interfaceManager.close();
40 });
41
42 }).execute();
43 }