2004Scape / Server

Lost City's from-scratch game server
MIT License
81 stars 53 forks source link

feat(engine): wandering npcs now teleport if stuck for 5 min #996

Closed tannerdino closed 3 weeks ago

tannerdino commented 3 weeks ago

Osrs is 500 ticks + some change; it's not usually exactly 500 ticks. I think they probably only teleport on the 1/8 chance to wander. Last wander also resets on defaultMode, so you can keep an npc stuck by splashing and logging on an alt every few minutes. For these reasons we cannot reuse lastMovement.

Added startLevel just incase an npc gets teleported and trapped on a level different than their respawn.

https://github.com/user-attachments/assets/9acc0b19-e6b0-4ce8-bdc6-10061f0f9d80