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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user