Fixed a bug that prevented progression in tutorial island

Fixed a bug that caused woodcutting to take slightly longer
Fixed a bug that caused the woodcutting axe message to print more often than it should
Fixed a bug that caused fishing to not print its fishing attempt message
Fixed a bug that caused fishing to take slightly longer
Fixed a bug that would cause nechryaels to lose interest in the player when their minions attacked
Made sure the grand exchange tests always clean up the GEDB
This commit is contained in:
Ceikry
2023-03-16 03:27:30 +00:00
committed by Ryan
parent c3cfecb5fa
commit 8b62e42323
7 changed files with 52 additions and 12 deletions
+10
View File
@@ -2368,6 +2368,16 @@ fun isStunned(entity: Entity) : Boolean {
return entity.clocks[Clocks.STUN] >= getWorldTicks()
}
fun setCurrentScriptState(entity: Entity, state: Int) {
val script = entity.scripts.getActiveScript()
if (script == null) {
log(ContentAPI::class.java, Log.WARN, "Tried to set a script state when no script was being ran!")
if (GameWorld.settings?.isDevMode != true) return
throw IllegalStateException("Script execution mistake - check stack trace and above warning log!")
}
script.state = state - 1 //set it to 1 below the state so that on next execution the state is at the expected value.
}
/**
* Modifies prayer points by value
* @param player the player to modify prayer points