Skip to content

loc

The loc namespace provides functions for controlling the current run.

loc.Leave()

Returns: nothing

Abandons the current run, as if the player had pressed the Leave button manually.

stonescript
// Auto-leave when inventory is full
?item.GetTreasureCount() >= item.GetTreasureLimit()
  loc.Leave()

loc.Pause()

Returns: nothing

Pauses the current run, as if the player had pressed the Pause button manually.

stonescript
// Auto-pause on low HP
?hp < 3
  loc.Pause()

See also

Stonescript is part of Stone Story RPG.