diff --git a/Server/data/configs/ground_spawns.json b/Server/data/configs/ground_spawns.json index 1ce4a3224..cce817f41 100644 --- a/Server/data/configs/ground_spawns.json +++ b/Server/data/configs/ground_spawns.json @@ -287,6 +287,10 @@ "item_id": "1523", "loc_data": "{1,2614,9570,0,5898270}" }, + { + "item_id": "1550", + "loc_data": "{1,2714,3478,0,5898270}" + }, { "item_id": "1573", "loc_data": "{1,2740,3637,0,5898270}-{1,2736,3638,0,5898270}-{1,2735,3636,0,5898270}-{1,2743,3636,0,5898270}-{1,2739,3634,0,5898270}-{1,2743,3640,0,5898270}-{1,2741,3639,0,5898270}-{1,2736,3641,0,5898270}-{1,2738,3641,0,5898270}-{1,2734,3640,0,5898270}-{1,2738,3636,0,5898270}" diff --git a/Server/data/configs/npc_configs.json b/Server/data/configs/npc_configs.json index 05efb5979..7b1584114 100644 --- a/Server/data/configs/npc_configs.json +++ b/Server/data/configs/npc_configs.json @@ -80064,26 +80064,6 @@ "range_level": "1", "attack_level": "1" }, - { - "agg_radius": "64", - "examine": "Roar! A dragon!", - "melee_animation": "80", - "attack_speed": "4", - "magic_level": "70", - "respawn_delay": "35", - "defence_animation": "89", - "death_animation": "4642", - "name": "Elvarg", - "defence_level": "70", - "safespot": null, - "lifepoints": "80", - "strength_level": "70", - "id": "742", - "aggressive": "true", - "bonuses": "0,0,0,0,0,20,40,40,30,20,0,0,0,0,0", - "range_level": "1", - "attack_level": "70" - }, { "examine": "A badly-behaved goblin.", "slayer_task": "38", @@ -144603,26 +144583,6 @@ "range_level": "1", "attack_level": "1" }, - { - "agg_radius": "64", - "examine": "Roar! A dragon!", - "melee_animation": "80", - "attack_speed": "4", - "magic_level": "70", - "respawn_delay": "35", - "defence_animation": "89", - "death_animation": "4642", - "name": "Elvarg", - "defence_level": "70", - "safespot": null, - "lifepoints": "80", - "strength_level": "70", - "id": "742", - "aggressive": "true", - "bonuses": "0,0,0,0,0,20,40,40,30,20,0,0,0,0,0", - "range_level": "1", - "attack_level": "70" - }, { "examine": "A badly-behaved goblin.", "slayer_task": "38", @@ -209969,26 +209929,6 @@ "range_level": "1", "attack_level": "1" }, - { - "agg_radius": "64", - "examine": "Roar! A dragon!", - "melee_animation": "80", - "attack_speed": "4", - "magic_level": "70", - "respawn_delay": "35", - "defence_animation": "89", - "death_animation": "4642", - "name": "Elvarg", - "defence_level": "70", - "safespot": null, - "lifepoints": "80", - "strength_level": "70", - "id": "742", - "aggressive": "true", - "bonuses": "0,0,0,0,0,20,40,40,30,20,0,0,0,0,0", - "range_level": "1", - "attack_level": "70" - }, { "examine": "A badly-behaved goblin.", "slayer_task": "38", diff --git a/Server/src/main/kotlin/rs09/game/node/entity/skill/farming/LeprechaunNoter.kt b/Server/src/main/kotlin/rs09/game/node/entity/skill/farming/LeprechaunNoter.kt index a6c74763a..c7862fdb4 100644 --- a/Server/src/main/kotlin/rs09/game/node/entity/skill/farming/LeprechaunNoter.kt +++ b/Server/src/main/kotlin/rs09/game/node/entity/skill/farming/LeprechaunNoter.kt @@ -1,36 +1,39 @@ -package rs09.game.node.entity.skill.farming - -import core.game.content.dialogue.FacialExpression -import core.game.node.item.Item -import core.plugin.Initializable -import org.rs09.consts.NPCs -import rs09.game.interaction.InteractionListener - -class LeprechaunNoter : InteractionListener() { - - val CROPS = Plantable.values().map{ it.harvestItem }.toIntArray() - val LEPRECHAUNS = intArrayOf(NPCs.TOOL_LEPRECHAUN_3021,NPCs.GOTH_LEPRECHAUN_8000,NPCs.TOOL_LEPRECHAUN_4965) - - override fun defineListeners() { - onUseWith(NPC,CROPS,*LEPRECHAUNS){player, used, with -> - val usedItem = used.asItem() - val npc = with.asNpc() - val expr = when(npc.id){ - 3021 -> FacialExpression.OLD_NORMAL - else -> FacialExpression.FRIENDLY - } - - if(usedItem.noteChange != usedItem.id){ - val amt = player.inventory.getAmount(usedItem.id) - if(player.inventory.remove(Item(usedItem.id,amt))){ - player.inventory.add(Item(usedItem.noteChange,amt)) - } - player.dialogueInterpreter.sendDialogues(npc.id,expr,"There ya go.") - } else { - player.dialogueInterpreter.sendDialogues(npc.id,expr,"But that's already a note!") - } - - return@onUseWith true - } - } +package rs09.game.node.entity.skill.farming + +import api.ContentAPI +import core.game.content.dialogue.DialoguePlugin +import core.game.content.dialogue.FacialExpression +import core.game.node.item.Item +import core.plugin.Initializable +import org.rs09.consts.NPCs +import rs09.game.interaction.InteractionListener + +class LeprechaunNoter : InteractionListener() { + + val CROPS = Plantable.values().map{ it.harvestItem }.toIntArray() + val LEPRECHAUNS = intArrayOf(NPCs.TOOL_LEPRECHAUN_3021,NPCs.GOTH_LEPRECHAUN_8000,NPCs.TOOL_LEPRECHAUN_4965,NPCs.TECLYN_2861) + + override fun defineListeners() { + onUseWith(NPC,CROPS,*LEPRECHAUNS){player, used, with -> + val usedItem = used.asItem() + val npc = with.asNpc() + val expr = when(npc.id){ + 3021 -> FacialExpression.OLD_NORMAL + else -> FacialExpression.FRIENDLY + } + + if(usedItem.noteChange != usedItem.id){ + val amt = player.inventory.getAmount(usedItem.id) + if(player.inventory.remove(Item(usedItem.id,amt))){ + player.inventory.add(Item(usedItem.noteChange,amt)) + } + ContentAPI.sendItemDialogue(player,usedItem.id,"The leprechaun exchanges your items for banknotes.") + } else { + // Unsure why the line below no longer functions, despite only changing the line above to be more correct. Using your note(NOT CROP) on the leprechaun no longer functions because of this. - Crash + player.dialogueInterpreter.sendDialogues(npc.id,expr,"That IS a banknote!") + } + + return@onUseWith true + } + } } \ No newline at end of file