mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Bats now only drop bat wings during Rag and Bone Man quest
This commit is contained in:
parent
6856d75d88
commit
6cb4f118ea
3 changed files with 29 additions and 7 deletions
|
|
@ -11511,12 +11511,6 @@
|
||||||
"weight": "100.0",
|
"weight": "100.0",
|
||||||
"id": "530",
|
"id": "530",
|
||||||
"maxAmount": "1"
|
"maxAmount": "1"
|
||||||
},
|
|
||||||
{
|
|
||||||
"minAmount": "1",
|
|
||||||
"weight": "25.0",
|
|
||||||
"id": "7833",
|
|
||||||
"maxAmount": "1"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package content.region.misthalin.silvarea.quest.ragandboneman
|
||||||
|
|
||||||
|
import core.api.isQuestInProgress
|
||||||
|
import core.game.node.entity.Entity
|
||||||
|
import core.game.node.entity.npc.NPC
|
||||||
|
import core.game.node.entity.npc.NPCBehavior
|
||||||
|
import core.game.node.entity.player.Player
|
||||||
|
import core.game.node.item.Item
|
||||||
|
import core.tools.RandomFunction
|
||||||
|
import org.rs09.consts.Items
|
||||||
|
import org.rs09.consts.NPCs
|
||||||
|
|
||||||
|
class BatBehavior : NPCBehavior(*batIds) {
|
||||||
|
companion object {
|
||||||
|
private val batIds = intArrayOf(
|
||||||
|
NPCs.BAT_412
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDropTableRolled(self: NPC, killer: Entity, drops: ArrayList<Item>) {
|
||||||
|
super.onDropTableRolled(self, killer, drops)
|
||||||
|
// Drops the Bat Wing during Rag and Bone Man quest
|
||||||
|
if (killer is Player && isQuestInProgress(killer, RagAndBoneMan.questName, 1, 99)) {
|
||||||
|
if(RandomFunction.roll(4)) {
|
||||||
|
drops.add(Item(Items.BAT_WING_7833));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,6 @@ import core.api.isQuestInProgress
|
||||||
import core.game.node.entity.Entity
|
import core.game.node.entity.Entity
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.npc.NPCBehavior
|
import core.game.node.entity.npc.NPCBehavior
|
||||||
import core.game.node.entity.npc.drop.DropFrequency
|
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue