Teleportation Items
Authors: MRoeDesigns
Version: 1.2
Type: Custom Item System
Key Term: Custom Item System
IntroductionThis script allows the player to use a certain item to be teleported to any given location. You can use script calls within events or other scripts to change the location of the teleport at any point in time.
Features
- Allows players to be teleported using an item.
ScreenshotsN/A
DemoN/A
Script
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Teleportation Items by MRoeDesigns
# Version: 1.2
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Details ::
#
# This script is used to create items that players can use to
# be teleported back to certain areas.
#
# Instructions ::
#
# Change the item number on line 50 to match the item number you want to use.
#
# Starting at line 57, the variables control where the player is teleported
# to. To add more locations, simply add more "when X" options.
#
# Make sure the Item runs a common event in the database. In the common
# event, simply put the script line "TItem.Teleport"
#
# Script Calls ::
#
# TItem.SetLocation(ID)
# - Sets the location ID for the item
#
# TItem.Location?
# - Returns the players location ID
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
class TItem
def self.SetLocation(id)
@LocationID = id
end
def self.Location?
return @LocationID
end
def self.Teleport
# Change the Item Number here to reflect your teleport item
if $game_party.item_number(34) == 1
case TItem.Location?
when 0
# These values reflect where the player will be teleported to.
$game_temp.player_transferring = true
$game_temp.player_new_map_id = 01
$game_temp.player_new_x = 8
$game_temp.player_new_y = 8
$game_temp.player_new_direction = 0
$scene = Scene_Map.new
$game_map.autoplay
return true
when 1
$game_temp.player_transferring = true
$game_temp.player_new_map_id = 02
$game_temp.player_new_x = 5
$game_temp.player_new_y = 5
$game_temp.player_new_direction = 0
$scene = Scene_Map.new
$game_map.autoplay
return true
end
end
end
end
InstructionsIn the script.
CompatibilityWorking on the RMX-OS controller, not yet compatible.
Credits and Thanks
- edwardthefma for the Town Scrolls script
Author's NotesFree to use as long as credit is given.
This is my first script, so there's bound to be bugs. Let me know if you run into any, or if you have a question about something.