mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 16:51:37 +00:00
Adding support for mining skill
This commit is contained in:
committed by
Gary Tierney
parent
cf0e3331e0
commit
e61f4ef95a
@@ -0,0 +1,14 @@
|
|||||||
|
name = "Mining Skill"
|
||||||
|
package = "org.apollo.game.plugin.skills.mining"
|
||||||
|
authors = [
|
||||||
|
"Graham",
|
||||||
|
"Mikey`",
|
||||||
|
"WH:II:DOW",
|
||||||
|
"Requa",
|
||||||
|
"Clifton",
|
||||||
|
"tlf30"
|
||||||
|
]
|
||||||
|
|
||||||
|
[config]
|
||||||
|
srcDir = "src/"
|
||||||
|
testDir = "test/"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
data class Gem(id: Int, chance: Int)
|
||||||
|
|
||||||
|
val GEMS = Array(
|
||||||
|
Gem(1623, 0), // uncut sapphire
|
||||||
|
Gem(1605, 0), // uncut emerald
|
||||||
|
Gem(1619, 0), // uncut ruby
|
||||||
|
Gem(1617, 0) // uncut diamond
|
||||||
|
)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import org.apollo.game.action.DistancedAction
|
||||||
|
import org.apollo.game.model.entity.EquipmentConstants
|
||||||
|
import org.apollo.game.model.entity.Skill
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Thanks to Mikey` <http://www.rune-server.org/members/mikey%60/> for helping
|
||||||
|
to find some of the item/object IDs, minimum levels and experiences.
|
||||||
|
Thanks to Clifton <http://www.rune-server.org/members/clifton/> for helping
|
||||||
|
to find some of the expired object IDs.
|
||||||
|
*/
|
||||||
|
|
||||||
|
data class Ore(id: Int, objects: Map<Int, Int>, level: Int, exp: Float, respawn: Int)
|
||||||
|
|
||||||
|
val ORE_OBJECTS = Array(
|
||||||
|
Ore(434, CLAY_OBJECTS, 1, 5, 3), // clay
|
||||||
|
Ore(436, COPPER_OBJECTS, 1, 17.5, 6), // copper
|
||||||
|
Ore(438, TIN_OBJECTS, 1, 17.5, 6), // tin
|
||||||
|
Ore(440, IRON_OBJECTS, 15, 35, 16), // iron
|
||||||
|
Ore(453, COAL_OBJECTS, 30, 50, 100), // coal
|
||||||
|
Ore(444, GOLD_OBJECTS, 40, 65, 200), // gold
|
||||||
|
Ore(442, SILVER_OBJECTS, 20, 40, 200), // silver
|
||||||
|
Ore(447, MITHRIL_OBJECTS, 55, 80, 400), // mithril
|
||||||
|
Ore(449, ADAMANT_OBJECTS, 70, 95, 800), // adamant
|
||||||
|
Ore(451, RUNITE_OBJECTS, 85, 125, 2500) // runite
|
||||||
|
)
|
||||||
|
|
||||||
|
val ORES = asMap()
|
||||||
|
val EXPIRED_ORES = asMap()
|
||||||
|
|
||||||
|
for (ore in ORE_OBJECTS) {
|
||||||
|
for (key in ore.objects.keys) {
|
||||||
|
ORES.put(key, ore)
|
||||||
|
EXPIRED_ORES.put(ore.objects.(get), true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val CLAY_OBJECTS = mapOf(
|
||||||
|
2180 to 450,
|
||||||
|
2109 to 451,
|
||||||
|
14904 to 14896,
|
||||||
|
14905 to 14897
|
||||||
|
)
|
||||||
|
|
||||||
|
val COPPER_OBJECTS = mapOf(
|
||||||
|
11960 to 11555,
|
||||||
|
11961 to 11556,
|
||||||
|
11962 to 11557,
|
||||||
|
11936 to 11552,
|
||||||
|
11937 to 11553,
|
||||||
|
11938 to 11554,
|
||||||
|
2090 to 450,
|
||||||
|
2091 to 451,
|
||||||
|
14906 to 14898,
|
||||||
|
14907 to 14899,
|
||||||
|
14856 to 14832,
|
||||||
|
14857 to 14833,
|
||||||
|
14858 to 14834
|
||||||
|
)
|
||||||
|
|
||||||
|
val TIN_OBJECTS = mapOf(
|
||||||
|
11597 to 11555,
|
||||||
|
11958 to 11556,
|
||||||
|
11959 to 11557,
|
||||||
|
11933 to 11552,
|
||||||
|
11934 to 11553,
|
||||||
|
11935 to 11554,
|
||||||
|
2094 to 450,
|
||||||
|
2095 to 451,
|
||||||
|
14092 to 14894,
|
||||||
|
14903 to 14895
|
||||||
|
)
|
||||||
|
|
||||||
|
val IRON_OBJECTS = mapOf(
|
||||||
|
11954 to 11555,
|
||||||
|
11955 to 11556,
|
||||||
|
11956 to 11557,
|
||||||
|
2092 to 450,
|
||||||
|
2093 to 451,
|
||||||
|
14900 to 14892,
|
||||||
|
14901 to 14893,
|
||||||
|
14913 to 14915,
|
||||||
|
14914 to 14916
|
||||||
|
)
|
||||||
|
|
||||||
|
val COAL_OBJECTS = mapOf(
|
||||||
|
11963 to 11555,
|
||||||
|
11964 to 11556,
|
||||||
|
11965 to 11557,
|
||||||
|
11930 to 11552,
|
||||||
|
11931 to 11553,
|
||||||
|
11932 to 11554,
|
||||||
|
2096 to 450,
|
||||||
|
2097 to 451,
|
||||||
|
14850 to 14832,
|
||||||
|
14851 to 14833,
|
||||||
|
14852 to 14834
|
||||||
|
)
|
||||||
|
|
||||||
|
val SILVER_OBJECTS = mapOf (
|
||||||
|
11948 to 11555,
|
||||||
|
11949 to 11556,
|
||||||
|
11950 to 11557,
|
||||||
|
2100 to 450,
|
||||||
|
2101 to 451
|
||||||
|
)
|
||||||
|
|
||||||
|
val GOLD_OBJECTS = mapOf(
|
||||||
|
11951 to 11555,
|
||||||
|
11952 to 11556,
|
||||||
|
11953 to 11557,
|
||||||
|
2098 to 450,
|
||||||
|
2099 to 451
|
||||||
|
)
|
||||||
|
|
||||||
|
val MITHRIL_OBJECTS = mapOf(
|
||||||
|
11945 to 11555,
|
||||||
|
11946 to 11556,
|
||||||
|
11947 to 11557,
|
||||||
|
11942 to 11552,
|
||||||
|
11943 to 11553,
|
||||||
|
11944 to 11554,
|
||||||
|
2102 to 450,
|
||||||
|
2103 to 451,
|
||||||
|
14853 to 14832,
|
||||||
|
14854 to 14833,
|
||||||
|
14855 to 14834
|
||||||
|
)
|
||||||
|
|
||||||
|
val ADAMANT_OBJECTS = mapOf(
|
||||||
|
11939 to 11552,
|
||||||
|
11940 to 11553,
|
||||||
|
11941 to 11554,
|
||||||
|
2104 to 450,
|
||||||
|
2105 to 451,
|
||||||
|
14862 to 14832,
|
||||||
|
14863 to 14833,
|
||||||
|
14864 to 14834
|
||||||
|
)
|
||||||
|
|
||||||
|
val RUNITE_OBJECTS = mapOf(
|
||||||
|
2106 to 450,
|
||||||
|
2107 to 451,
|
||||||
|
14859 to 14832,
|
||||||
|
14860 to 14833,
|
||||||
|
14861 to 14834
|
||||||
|
)
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import org.apollo.game.model.Animation;
|
||||||
|
|
||||||
|
data class Pickaxe(id: Int, level: Int, animation: Animation, pulses: Int)
|
||||||
|
|
||||||
|
val PICKAXES = Array(
|
||||||
|
Pickaxe(1265, 1, 625, 8), // bronze
|
||||||
|
Pickaxe(1267, 1, 626, 7), // iron
|
||||||
|
Pickaxe(1269, 1, 627, 6), // steel
|
||||||
|
Pickaxe(1273, 21, 629, 5), // mithril
|
||||||
|
Pickaxe(1271, 31, 628, 4), // adamant
|
||||||
|
Pickaxe(1275, 41, 624, 3) // rune
|
||||||
|
)
|
||||||
|
|
||||||
|
val PICKAXE_IDS: IntArray = intArrayOf(
|
||||||
|
1275, // rune
|
||||||
|
1271 // adamant
|
||||||
|
1273, // mithril
|
||||||
|
1269, // steel
|
||||||
|
1267, // iron
|
||||||
|
1265, // bronze
|
||||||
|
)
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fun respawn_pulses(base: Int, players: Int) {
|
||||||
|
return base - players * base / (world.playerRepository.size() * 2);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user