|
Runescape Wiki:
While chopping a tree with the infernal axe in the inventory or equipped, there is a 1/3 chance that the logs will be burnt as they are chopped, giving half of the Firemaking experience that would usually be gained by burning them the normal way. For example, redwood logs that are burnt by the infernal axe (which does not require level 90 Firemaking) will grant 175 Firemaking experience rather than the 350 experience that is granted by burning it normally.
Example:
Update TreeType.kt
Code:enum class TreeType(val level: Int, val xp: Double, val firemakingXp: Double, val log: Int, val depleteChance: Int, val respawnTime: IntRange) { TREE(level = 1, xp = 25.0, firemakingXp = 20.0, log = Items.LOGS, depleteChance = 0, respawnTime = 15..25), ACHEY(level = 1, xp = 25.0, firemakingXp = 20.0, log = Items.ACHEY_TREE_LOGS, depleteChance = 0, respawnTime = 15..25), OAK(level = 15, xp = 37.5, firemakingXp = 34.75, log = Items.OAK_LOGS, depleteChance = 0, respawnTime = 15..25), WILLOW(level = 30, xp = 67.5, firemakingXp = 45.0, log = Items.WILLOW_LOGS, depleteChance = 8, respawnTime = 22..68), TEAK(level = 35, xp = 85.0, firemakingXp = 52.5, log = Items.TEAK_LOGS, depleteChance = 8, respawnTime = 22..68), MAPLE(level = 45, xp = 100.0, firemakingXp = 62.5, log = Items.MAPLE_LOGS, depleteChance = 8, respawnTime = 22..68), HOLLOW(level = 45, xp = 82.0, firemakingXp = 67.5, log = Items.BARK, depleteChance = 8, respawnTime = 22..68), MAHOGANY(level = 50, xp = 125.0, firemakingXp = 78.75, log = Items.MAHOGANY_LOGS, depleteChance = 8, respawnTime = 22..68), YEW(level = 60, xp = 175.0, firemakingXp = 101.25, log = Items.YEW_LOGS, depleteChance = 8, respawnTime = 22..68), MAGIC(level = 75, xp = 250.0, firemakingXp = 151.9, log = Items.MAGIC_LOGS, depleteChance = 8, respawnTime = 22..68), REDWOOD(level = 90, xp = 380.0, firemakingXp = 175.0, log = Items.REDWOOD_LOGS, depleteChance = 11, respawnTime = 50..100), }
Update Woodcutting.kt, under:
Code:p.addXp(Skills.WOODCUTTING, tree.xp)
Add:
Code:val chanceOfBurningLogOnCut = (1..3).random() if (axe.item == Items.INFERNAL_AXE && chanceOfBurningLogOnCut == 3) { p.inventory.remove(tree.log) p.addXp(Skills.FIREMAKING, tree.firemakingXp) }
This can probably be improved as well, I did not add degrading on the axe, or special attack yet! Feel free to post your improvements in the replies.
Last edited by Mr Bill; 08-18-2019 at 03:41 AM.
Thanks Bill!
as said above you should just check before adding the item like this
findand replace withCode:p.inventory.add(tree.log)
Code:val chanceOfBurningLogOnCut = (1..3).random() if (axe.item == Items.INFERNAL_AXE && chanceOfBurningLogOnCut == 3) { p.addXp(Skills.FIREMAKING, tree.firemakingXp) //TODO : add infernal axe degradation + burning gfx } else { p.inventory.add(tree.log) }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |