Repository reorganisation

Unified kotlin and java into just src/main
Unified the rs09 and core packages
Took all content out of the core package, and placed it into the new content package
Reorganised all source code relating to content to be easier to find and explore
This commit is contained in:
Ceikry
2023-01-26 13:59:28 +00:00
committed by Ryan
parent e4b799c44a
commit a100affda2
3156 changed files with 24205 additions and 30585 deletions
@@ -0,0 +1,38 @@
package content.global.skill.magic
import content.global.skill.magic.spellconsts.Modern
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.game.world.update.flag.context.Animation
import org.rs09.consts.Items
import core.game.interaction.InteractionListener
import core.game.interaction.IntType
class SpellTablets : InteractionListener {
val B2P_TABLET = Items.BONES_TO_PEACHES_8015
val B2B_TABLET = Items.BONES_TO_BANANAS_8014
override fun defineListeners() {
on(B2B_TABLET, IntType.ITEM, "break"){ player, node ->
breakTablet(player)
SpellListeners.run(Modern.BONES_TO_BANANAS,SpellListener.NONE,"modern",player)
player.inventory.remove(Item(node.id))
return@on true
}
on(B2P_TABLET, IntType.ITEM, "break"){ player, node ->
breakTablet(player)
SpellListeners.run(Modern.BONES_TO_PEACHES,SpellListener.NONE,"modern",player)
player.inventory.remove(Item(node.id))
return@on true
}
}
fun breakTablet(player: Player){
player.audioManager.send(979)
player.animator.forceAnimation(Animation(4069))
player.lock(5)
player.setAttribute("tablet-spell",true)
}
}