-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce7519b
commit 50654ee
Showing
4 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "Anvil's Echoes", | ||
"description": "The local blacksmith has lost his hammer and needs your help.|Seriously, he was just using it and now it's gone. I'm sure he'll be offering you a very nice reward for it if you help him out. Just go talk to him, he should be located somewhere in Mudwich, like right in the centre or something.", | ||
"rewards": ["Blacksmith's Boots", "420 Smithing experience", "Access to the Smithing skill"], | ||
"stages": { | ||
"0": { | ||
"task": "talk", | ||
"npc": "blacksmith", | ||
"text": [ | ||
"Dear adventurer, I have a huge problem.", | ||
"My ancestral hammer has been stolen by a thief.", | ||
"Without it I cannot produce some of my finest work.", | ||
"I'm now stuck having to use this old hammer.", | ||
"Listen, if you help me out I will give you something cool.", | ||
"How about some smithing boots? They will help you smith faster.", | ||
"It's definitely not some voodoo magic, I promise.", | ||
"I last seen it when I was trying to smith on the beach.", | ||
"I looked away for a second and it was gone.", | ||
"I think you should start there and see if you can find any clues." | ||
], | ||
"completedText": ["Please, go check out the beach for any clues."] | ||
}, | ||
"1": { | ||
"task": "talk", | ||
"npc": "blacksmith", | ||
"hasItemText": [ | ||
"Oh! My wonderful hammer!", | ||
"I can finally get back to break- I mean smithing.", | ||
"Here, take these smithing boots as a reward.", | ||
"You can also use my anvil to smith anything you want.", | ||
"I'm sure you'll find it useful." | ||
], | ||
"skill": "smithing", | ||
"experience": 420, | ||
"itemRewards": [ | ||
{ | ||
"key": "smithingboots", | ||
"count": 1 | ||
} | ||
], | ||
"popup": { | ||
"title": "Quest completed!", | ||
"text": "@green@You've been awarded @crimson@3000 Smithing experience@green@ and @crimson@Smithing Gloves@green@.", | ||
"colour": "#33cc33" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/server/src/game/entity/character/player/quest/impl/anvilsechoes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Quest from '../quest'; | ||
import Data from '../../../../../../../data/quests/anvilsechoes.json'; | ||
|
||
import type { ProcessedDoor } from '@kaetram/common/types/map'; | ||
import type Player from '../../player'; | ||
|
||
export default class AnvilsEchoes extends Quest { | ||
public constructor(key: string) { | ||
super(key, Data); | ||
} | ||
|
||
/** | ||
* Override for when the player goes through the door. We want to trigger an NPC | ||
* dialogue when the player attempts to go through the door but hasn't finished | ||
* the quest yet. | ||
* @param door The door the player is going through. | ||
* @param player The player going through the door. | ||
*/ | ||
|
||
protected override handleDoor(door: ProcessedDoor, player: Player): void { | ||
if (this.stage < door.stage) { | ||
let npc = player.world.entities.getNPCByKey(door.npc); | ||
|
||
npc?.talk(player, [`Hey, don't go in there, it's dangerous!`]); | ||
|
||
return; | ||
} | ||
|
||
super.handleDoor(door, player); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters