11package net .swofty .type .hub .npcs ;
22
3+ import net .kyori .adventure .text .format .NamedTextColor ;
34import net .minestom .server .coordinate .Pos ;
5+ import net .swofty .commons .skyblock .item .ItemType ;
46import net .swofty .type .generic .entity .npc .HypixelNPC ;
7+ import net .swofty .type .generic .entity .npc .NPCOption ;
58import net .swofty .type .generic .entity .npc .configuration .HumanConfiguration ;
69import net .swofty .type .generic .user .HypixelPlayer ;
10+ import net .swofty .type .skyblockgeneric .gui .inventories .GUIClaimReward ;
711import net .swofty .type .skyblockgeneric .mission .MissionData ;
812import net .swofty .type .skyblockgeneric .mission .missions .lumber .MissionBreakOaklog ;
913import net .swofty .type .skyblockgeneric .mission .missions .lumber .MissionTalkToLumberjack ;
@@ -20,17 +24,17 @@ public NPCLumberJack() {
2024 super (new HumanConfiguration () {
2125 @ Override
2226 public String [] holograms (HypixelPlayer player ) {
23- return new String []{"Lumber Jack" , "§e§lCLICK" };
27+ return new String []{"§aLumber Jack" , "§e§lCLICK" };
2428 }
2529
2630 @ Override
2731 public String signature (HypixelPlayer player ) {
28- return "kyxxya3FqBJo6onG3bC1BjsjrF4uWTDd7Qitz14iNFwvZOn6FsW1A7dkNiZmiR1nVBfex7b4XHYAb6f3jXx8wIEvoDzSjzVLkCkzbQ9aMTTlDSAvkZ/fqtgMJbbXnppUSETmbWm7fdPjr4P5J30+Mz5vb66kNYu8QXsWqQ36YxI6sS2P77+vLdq+n1l389Npw1uMBpMLPjXaTsjAMrq1U6bDbTj7YwYqtURh0hxJm6v3q9d+oXD989fvYu04DYtEiW6H3VDjtvoEAb+m3H9tlDt74SNVXlIJ0lGa6RNpidBhKgSS38F0P5nMo1XbHJ/FcrWP+UZ6D4rT5TuW0T1J7n+5q+/LMMOR2hofFHgdqmTD85tTOmTmKKtIBPW9yreEKNZg7Ah/s3jStnVosp6A9qkpTcmdneRJwL+ZvHcpCbZpJq9Ii/NV+cBNrL49ylVCDZnRN4I7xENYfAq/Xe241cs2bEErrpu9uDH7dXSnhwQn4PdtMN6ZZrr4IJS2sjAyPjcuN/A006gs3Cu+9Cb4MViRCdIgOZDsIV/C0yDqr3+/SgKa+GRp7qIiphIMgRXC03GDSd/btYea1g8qJhhnkAL5MStubm/rdPaEf8wBc3y8Kc4pdEemo5kHQ8SPGvrk+xI8sGWKmlf/bZkyXKw9Wdhg/npeptxjNb2rUuaIDvk =" ;
32+ return "cxEDP/ZmKhHdhmmHUgbqSxSgoD8w/wQk3IysGKDggfZUR3tsd1BFqpwsE37pv1LUsUkHr+mF0R6aAC0ZWQzT5kMT1546s5JAyRPFNa4P9iScE+aWlPCK1iqw2tMDqD73hYRtlSKuDRlxjbKXbHBltAsZYF1KEHh7uy+WJn+kUTuZI9Z96AUDkZlx/zxNO7Biq4pxZyilU6f2UId58fAkJYbMOYzxwCCOP+4NsH4vZazZ5YRwjpBnxrgI6epBe4KczoEqQZOo5lCEYrDMeBBjtcO9ktRnR+ddhTkPwZFHMqJaONOaeUWPar4/G977gwDwOkC0y5yw1hCABU66OiY1OsmshE9s5r8MOHYVFdwacp8M1f6xMmydmkl/VB8tCDsUMQIFlXHfF1YyNJ6UZTOhxyqI2ntDfVxcN5EMEC4c0lsycp8k5wg41aTlksvzwSQ1H+QkRByo1xG7WIZNr90mkJzwUG7Ggr3q+DZZeo8gQKMRTYIa5EBtiSTugMPcv4pw3xqv23E2kB5PvmumHGg4jh0VwE7CgFPD3f3SIZsT6bCKxrQ1pq1XQlAKsJbu341l2j01UkPG1GThjTGBTwnwV+vZUA+hG/2c/wyfbfqquJBH5PqaM7ZvzvyGEVMmh8wU663dBNkXQHoW3/Y/yg1eLPxwm9aSDffWMJVaGfXFuq4 =" ;
2933 }
3034
3135 @ Override
3236 public String texture (HypixelPlayer player ) {
33- return "ewogICJ0aW1lc3RhbXAiIDogMTU5MTQ2MzM5MzU5MywKICAicHJvZmlsZUlkIiA6ICJmMjljOTIyMmVjNmY0NjExOTc3YWNkMmFjYzExNDAxOCIsCiAgInByb2ZpbGVOYW1lIiA6ICJJSVJleWRlbklJIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2NkMGFiZGQ5ZjZlZTdkODM3MGQyNjIxMDljYjg1M2JhY2QzZjQzZjhjZTQyNDExNjRkMDhlM2QyYTU2ODNlMzIiCiAgICB9CiAgfQp9 " ;
37+ return "eyJ0aW1lc3RhbXAiOjE1NTA2Nzg1MjAzNzMsInByb2ZpbGVJZCI6ImEyZjgzNDU5NWM4OTRhMjdhZGQzMDQ5NzE2Y2E5MTBjIiwicHJvZmlsZU5hbWUiOiJiUHVuY2giLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzY4MjUwMzBlNzc1MmZhZjdmODE2YWMyYTIwYjExNDMyYWY0YjJjZGU0OTMyZGMwZTkyMDgzMWU2MjE4MDhlZTgifX19 " ;
3438 }
3539
3640 @ Override
@@ -53,40 +57,73 @@ public void onClick(NPCInteractEvent e) {
5357
5458 if (data .isCurrentlyActive (MissionTalkToLumberjack .class )) {
5559 setDialogue (player , "initial-hello" ).thenRun (() -> {
56- data .endMission (MissionTalkToLumberjack .class );
60+ NPCOption .sendOption (player , "lumber_jack" , List .of (
61+ new NPCOption .Option (
62+ "r_2_1" ,
63+ NamedTextColor .GREEN ,
64+ false ,
65+ "Sure" ,
66+ (p ) -> {
67+ setDialogue (p , "option-accept" ).thenRun (() -> {
68+ data .endMission (MissionTalkToLumberjack .class );
69+ });
70+ }
71+ ),
72+ new NPCOption .Option (
73+ "r_2_2" ,
74+ NamedTextColor .RED ,
75+ false ,
76+ "Nah, I'm good" ,
77+ (p ) -> {
78+ setDialogue (player , "option-nah" );
79+ }
80+ )
81+ ));
5782 });
5883 return ;
5984 }
6085 if (!data .hasCompleted (MissionBreakOaklog .class )) {
61- player . sendMessage ( "Bring me some Logs. You can chop them down in this Forest! " );
86+ sendNPCMessage ( player , "Please collect and then bring to me §a20 Oak Logs§f! You can get 'em from the §bForest §fjust off the trail. " );
6287 return ;
6388 }
6489 if (!data .hasCompleted (MissionTalkToLumberjackAgain .class )) {
6590 setDialogue (player , "spoke-again" ).thenRun (() -> {
66- data .endMission (MissionTalkToLumberjackAgain .class );
91+ new GUIClaimReward (ItemType .PROMISING_AXE , () -> {
92+ data .endMission (MissionTalkToLumberjackAgain .class );
93+ }).open (player );
6794 });
6895 return ;
6996 }
70-
7197 }
7298
7399 @ Override
74100 public DialogueSet [] dialogues (HypixelPlayer player ) {
75101 return List .of (
76- DialogueSet .builder ()
77- .key ("initial-hello" ).lines (new String []{
78- "Timber!" ,
79- "My woodcutting assistant has fallen quite ill! Do you think you could take over for him?" ,
80- "I just need you to chop down some Logs. If you do, I'll even give you his old axe as a reward!" ,
81- "I just need you to chop down some Logs. If you do, I'll even give you his old axe as a reward!"
82- }).build (),
83- DialogueSet .builder ()
84- .key ("spoke-again" ).lines (new String []{
85- "Thank you! Take this §aSweet Axe§f, it's so sweet that it drops apples from logs sometimes!" ,
86- "You've got the knack for wood. Could you get some Birch Planks from §aBirch Park§f?" ,
87- "My associate will be there waiting for you. He will reward you in §6Coins if you're up to the task!" ,
88- "However, this time I will reforge any item for the low price of Coal §8x10!"
89- }).build ()
90- ).stream ().toArray (DialogueSet []::new );
102+ DialogueSet .builder ()
103+ .key ("initial-hello" ).lines (new String []{
104+ "Timber!" ,
105+ "My woodcutting assistant has fallen quite ill! Do you think you could take over for him?" ,
106+ "I just need you to chop down some Logs. If you do, I'll even give you his old axe as a reward!" ,
107+ "Do you think you could take over for him?"
108+ }).build (),
109+ DialogueSet .builder ().key ("option-nah" ).lines (new String []{
110+ "Oh okay... maybe come back later!"
111+ }).build (),
112+ DialogueSet .builder ().key ("option-accept" ).lines (new String []{
113+ "Cheers!, Let me tell ya a little about what we're going to be doing." ,
114+ "We will be §aForaging§f! As one of SkyBlock's core skills, Foraging involves cutting down lots of different types of trees!" ,
115+ "As you do this, you'll unlock various crafts and useful stat boots that will help in other areas of your adventure." ,
116+ "Here, let me unlock the §aForaging skill for you, and then you can get started!" ,
117+ "To get you started, please bring me §a20 Oak Logs§f! You can break the trees just off the trail to get 'em" ,
118+ "§fUse your fists for now - I'll give you my previous assistant's axe if you can prove your worth!"
119+ }).build (),
120+ DialogueSet .builder ()
121+ .key ("spoke-again" ).lines (new String []{
122+ "Nice job! In return for those logs, I'll give ya this §aPromising Axe§f." ,
123+ "It's far less painful than using your fists to punch trees, I'll tell ya that much!" ,
124+ "If you feel like Foraging is the thin for you, continue down the path and head towards §aThe Park§f." ,
125+ "My friend §eCharlie §fcan be found there. I'm sure he'll have some work for you!" ,
126+ }).build ()
127+ ).toArray (DialogueSet []::new );
91128 }
92129}
0 commit comments