Skip to content

Commit

Permalink
Fixing Errors
Browse files Browse the repository at this point in the history
just fixing some content to make errors got away will fix other later date
  • Loading branch information
pitchblac23 committed Aug 10, 2022
1 parent 09408a7 commit 3b21e89
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 165 deletions.
2 changes: 1 addition & 1 deletion game.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
- class: gg.rsmod.game.service.game.DumpEntityIdService
cache-path: "./data/cache/"
output-path: "./game/plugins/src/main/kotlin/gg/rsmod/plugins/api/cfg/"
dump: true
dump: false

- class: gg.rsmod.game.service.rsa.RsaService

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,27 +69,27 @@ spawn_npc(npc = Npcs.HILL_GIANT, x = 3117, z = 9850, walkRadius = 4)//17sec
spawn_npc(npc = Npcs.HILL_GIANT, x = 3111, z = 9841, walkRadius = 4)//17sec

/**Items*/
spawn_item(Items.BONES, 1, x = 3093, z = 9879)
spawn_item(Items.BONES, 1, x = 3093, z = 9884)
spawn_item(Items.BONES, 1, x = 3098, z = 9886)
spawn_item(Items.BONES, 1, x = 3122, z = 9891)
spawn_item(Items.BONES, 1, x = 3120, z = 9894)
spawn_item(Items.BONES, 1, x = 3119, z = 9894)
spawn_item(Items.BONES, 1, x = 3116, z = 9891)
spawn_item(Items.BONES, 1, x = 3094, z = 9906)
spawn_item(Items.BONES, 1, x = 3097, z = 9901)
spawn_item(Items.BONES, 1, x = 3138, z = 9880)
spawn_item(Items.BONES, 1, x = 3141, z = 9879)
spawn_item(Items.BONES, 1, x = 3142, z = 9880)
spawn_item(Items.BONES, 1, x = 3143, z = 9878)
spawn_item(Items.BONES, 1, x = 3110, z = 9825)
spawn_item(Items.BONES, 1, x = 3109, z = 9823)
spawn_item(Items.BONES, 1, x = 3107, z = 9823)
spawn_item(Items.BONES, 1, x = 3101, z = 9825)
spawn_item(Items.COINS_995, 1, x = 3091, z = 9899)
spawn_item(Items.COINS_995, 1, x = 3088, z = 9899)
spawn_item(Items.COINS_995, 4, x = 3088, z = 9898)
spawn_item(Items.BRONZE_ARROW, 3, x = 3130, z = 9903)
spawn_item(Items.BRONZE_ARROW, 1, x = 3135, z = 9916)
spawn_item(Items.BRASS_NECKLACE, 1, x = 3122, z = 9881)
spawn_item(Items.BRASS_KEY, 1, x = 3131, z = 9862)
spawn_item(item = Items.BONES, amount = 1, x = 3101, z = 9825)
spawn_item(item = Items.BONES, amount = 1, x = 3107, z = 9823)
spawn_item(item = Items.BONES, amount = 1, x = 3109, z = 9823)
spawn_item(item = Items.BONES, amount = 1, x = 3110, z = 9825)
spawn_item(item = Items.BONES, amount = 1, x = 3094, z = 9906)
spawn_item(item = Items.BONES, amount = 1, x = 3097, z = 9901)
spawn_item(item = Items.BONES, amount = 1, x = 3098, z = 9886)
spawn_item(item = Items.BONES, amount = 1, x = 3093, z = 9884)
spawn_item(item = Items.BONES, amount = 1, x = 3093, z = 9879)
spawn_item(item = Items.BONES, amount = 1, x = 3116, z = 9891)
spawn_item(item = Items.BONES, amount = 1, x = 3119, z = 9894)
spawn_item(item = Items.BONES, amount = 1, x = 3120, z = 9894)
spawn_item(item = Items.BONES, amount = 1, x = 3122, z = 9891)
//spawn_item(item = Items.BONES, amount = 1, x = 3143, z = 9878)
//spawn_item(item = Items.BONES, amount = 1, x = 3142, z = 9880)
//spawn_item(item = Items.BONES, amount = 1, x = 3141, z = 9879)
//spawn_item(item = Items.BONES, amount = 1, x = 3138, z = 9880)
spawn_item(item = Items.COINS_995, amount = 1, x = 3091, z = 9899)
spawn_item(item = Items.COINS_995, amount = 1, x = 3088, z = 9899)
spawn_item(item = Items.COINS_995, amount = 4, x = 3088, z = 9898)
spawn_item(item = Items.BRONZE_ARROW, amount = 3, x = 3130, z = 9903)
spawn_item(item = Items.BRONZE_ARROW, amount = 1, x = 3135, z = 9916)
spawn_item(item = Items.BRASS_NECKLACE, amount = 1, x = 3122, z = 9881)
spawn_item(item = Items.BRASS_KEY, amount = 1, x = 3131, z = 9862)
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ spawn_npc(Npcs.MOSS_GIANT_2093, 3166,9883,0,1, Direction.NORTH_WEST)
spawn_npc(Npcs.MOSS_GIANT_2093, 3159,9902,0,1, Direction.NORTH_EAST)

/**Items*/
spawn_item(Items.IRON_AXE, 1, 3162,9888,0,100)
spawn_item(Items.COINS_995, 5, 3169,9880,0,100)
spawn_item(Items.COINS_995, 7, 3173,9881,0,100)
spawn_item(Items.COINS_995, 1, 3173,9897,0,100)
spawn_item(Items.COINS_995, 1, 3274,9870,0,100)
spawn_item(Items.COINS_995, 8, 3167,9897,0,100)
spawn_item(Items.COINS_995, 1, 3274,9870,0,100)
spawn_item(Items.BONES, 1, 3173,9903,0,1)
spawn_item(Items.RED_SPIDERS_EGGS, 1, 3179,9881,0,100)
spawn_item(Items.RED_SPIDERS_EGGS, 1, 3177,9880,0,100)
spawn_item(Items.EARTH_RUNE, 6, 3185,9888,0,100)
spawn_item(Items.KNIFE, 1, 3218,9887,0,55)
spawn_item(Items.MIND_RUNE, 1, 3224,9910,0,100)
spawn_item(Items.BODY_RUNE, 1, 3226,9910,0,100)
spawn_item(Items.BODY_RUNE, 1, 3226,9910,0,100)
//spawn_item(Items.IRON_AXE, 1, 3162,9888,0,100)
//spawn_item(Items.COINS_995, 5, 3169,9880,0,100)
//spawn_item(Items.COINS_995, 7, 3173,9881,0,100)
//spawn_item(Items.COINS_995, 1, 3173,9897,0,100)
//spawn_item(Items.COINS_995, 8, 3167,9897,0,100)
//spawn_item(Items.BONES, 1, 3173,9903,0,1)
//spawn_item(Items.RED_SPIDERS_EGGS, 1, 3179,9881,0,100)
//spawn_item(Items.RED_SPIDERS_EGGS, 1, 3177,9880,0,100)
//spawn_item(Items.EARTH_RUNE, 6, 3185,9888,0,100)

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions game/src/main/kotlin/gg/rsmod/game/model/World.kt
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,6 @@ class World(val gameContext: GameContext, val devContext: DevContext) {
npc.combatDef.bonuses.forEachIndexed { index, bonus -> npc.equipmentBonuses[index] = bonus }
npc.respawns = combatDef.respawnDelay > 0

val dropTableDef = plugins.npcDropTableDefs.getOrDefault(npc.id, null) ?: NpcDropTableDef.DEFAULT
npc.dropTables = dropTableDef

npc.setCurrentHp(npc.combatDef.hitpoints)
combatDef.stats.forEachIndexed { index, level ->
npc.stats.setMaxLevel(index, level)
Expand Down
7 changes: 0 additions & 7 deletions game/src/main/kotlin/gg/rsmod/game/model/queue/QueueTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,6 @@ data class QueueTask(val ctx: Any, val priority: TaskPriority) : Continuation<Un
nextStep = SuspendableStep(WaitCondition(cycles), it)
}

suspend fun wait(cyclesfrom: Int, cyclesto: Int): Unit = suspendCoroutine {
check(cyclesfrom > 0) { "Wait cycles must be greater than 0." }
check(cyclesto > cyclesfrom) { "Wait cycles must be greater than ${cyclesfrom}." }
val cycles = (cyclesfrom..cyclesto).random()
nextStep = SuspendableStep(WaitCondition(cycles), it)
}

/**
* Wait for [predicate] to return true.
*/
Expand Down
33 changes: 0 additions & 33 deletions game/src/main/kotlin/gg/rsmod/game/plugin/PluginRepository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import gg.rsmod.game.model.attr.COMMAND_ARGS_ATTR
import gg.rsmod.game.model.attr.COMMAND_ATTR
import gg.rsmod.game.model.combat.NpcCombatDef
import gg.rsmod.game.model.container.key.*
import gg.rsmod.game.model.droptable.NpcDropTableDef
import gg.rsmod.game.model.entity.*
import gg.rsmod.game.model.droptable.NpcDropTableDef
import gg.rsmod.game.model.priv.Privilege
Expand Down Expand Up @@ -1380,37 +1379,5 @@ class PluginRepository(val world: World) {
return true
}

fun bindOnStartFishing(npc_spot: Int, plugin: Plugin.() -> Unit) {
if(onStartFishingPlugins.containsKey(npc_spot)) {
val error = IllegalStateException("Start fishing listener already bound to a plugin: npc=$npc_spot")
logger.error(error) {}
throw error
}
onStartFishingPlugins[npc_spot] = plugin
pluginCount++
}

fun executeOnStartFishing(p: Player, npc_spot: Int): Boolean {
val plugin = onStartFishingPlugins[npc_spot] ?: return false
p.executePlugin(plugin)
return true
}

fun bindOnCatchFish(npc_spot: Int, plugin: Plugin.() -> Unit) {
if(onCatchFishPlugins.contains(npc_spot)) {
val error = IllegalStateException("Catch fish listener already bound to a plugin: npc=$npc_spot")
logger.error(error) {}
throw error
}
onCatchFishPlugins[npc_spot] = plugin
pluginCount++
}

fun executeOnCatchFish(p: Player, npc_spot: Int): Boolean {
val plugin = onCatchFishPlugins[npc_spot] ?: return false
p.executePlugin(plugin)
return true
}

companion object : KLogging()
}

0 comments on commit 3b21e89

Please sign in to comment.