RPG Library ‐ Extra Functions - ThePix/QuestJS GitHub Wiki
The rpg
object has a few useful functions.
rpg.teleport(char, loc)
Use this to teleport the character to a new location. The character will appear to be using a direction called "teleport".
rpg.destroy(obj)
Use this to destroy an item. It will determine if the object is a clone. If so, it will get removed from the game, if not, it will just have the "loc" attribute removed. This ensures your game will save properly.
You should not use this on items that handle location in another way- for example COUNTABLE items.
hasEffect(obj, effect)
Return true if the character has the given effect.