Kingdom Ablaze
Sponsor
i could so use some help, i have been trying to make it so you can unlock each option in my script. can anyone show me the easiest way yo go about this? here is the script if that helpsuses the sdk)<----not required i just wanted to practice using it.
Code:
#==============================================================================
# ** Travel Script
#==============================================================================
# Plague180
# Version 1.4
# 30.12.08
#==============================================================================
# The Plague180 Travel script allows you to call $Scene_Travel.new to let the
# user travel from one place to another with out haveing to walk.
#
#==============================================================================
#Please Credit Plague180 Productions
#
#If you find any errors with this code PLEASE let me know at: plague180@yahoo.com
#Also please email me for features you think i should add.
#
#Known issues: You will have to do some minor mods to any cms you use this with.
#However I have included a simple fix for the default system:(Scene_Menu(optional)
#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log("Travel Script", "Plague180", 1.4, "30.12.08")
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state("Travel Script") == true
#==============================================================================
# ** Scene_Travel
#------------------------------------------------------------------------------
# This class performs Travel screen processing.
#==============================================================================
#-----------------------Start Edits Here---------------------------------------
#number of options you would like to use(dont include exit as a option)
#Please dont use 0 as a option ether (more in guide)
Number_Of_Options = 15
EXIT = "Exit" #what you want it to say for exit
#-------------------------------Option 1---------------------------------------
Travel_1_name = "Grasslands" #name of the first option
Travel_1_Map = 1 #number of the map you want to travel too
Travel_1_Map_X = 9 #X coordinate you want the player to move too
Travel_1_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_1_Map_Face = 2
#----------------------------Option 2---------------------------------------
Travel_2_name = "Woods" #name of the first option
Travel_2_Map = 2 #number of the map you want to travel too
Travel_2_Map_X = 9 #X coordinate you want the player to move too
Travel_2_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_2_Map_Face = 2
#-------------------------------Option 3---------------------------------------
Travel_3_name = "Forest" #name of the first option
Travel_3_Map = 3 #number of the map you want to travel too
Travel_3_Map_X = 9 #X coordinate you want the player to move too
Travel_3_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_3_Map_Face = 2
#-------------------------------Option 4---------------------------------------
Travel_4_name = "Mountain" #name of the first option
Travel_4_Map = 4 #number of the map you want to travel too
Travel_4_Map_X = 9 #X coordinate you want the player to move too
Travel_4_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_4_Map_Face = 2
#-------------------------------Option 5---------------------------------------
Travel_5_name = "Beach" #name of the first option
Travel_5_Map = 5 #number of the map you want to travel too
Travel_5_Map_X = 9 #X coordinate you want the player to move too
Travel_5_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_5_Map_Face = 2
#-------------------------------Option 6---------------------------------------
Travel_6_name = "user adds more"#name of the first option
Travel_6_Map = 5 #number of the map you want to travel too
Travel_6_Map_X = 9 #X coordinate you want the player to move too
Travel_6_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_6_Map_Face = 2
#-------------------------------Option 7---------------------------------------
Travel_7_name = "user adds more"#name of the first option
Travel_7_Map = 5 #number of the map you want to travel too
Travel_7_Map_X = 9 #X coordinate you want the player to move too
Travel_7_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_7_Map_Face = 2
#-------------------------------Option 8---------------------------------------
Travel_8_name = "user adds more"#name of the first option
Travel_8_Map = 5 #number of the map you want to travel too
Travel_8_Map_X = 9 #X coordinate you want the player to move too
Travel_8_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_8_Map_Face = 2
#-------------------------------Option 9---------------------------------------
Travel_9_name = "user adds more"#name of the first option
Travel_9_Map = 5 #number of the map you want to travel too
Travel_9_Map_X = 9 #X coordinate you want the player to move too
Travel_9_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_9_Map_Face = 2
#-------------------------------Option 10---------------------------------------
Travel_10_name = "user adds more"#name of the first option
Travel_10_Map = 5 #number of the map you want to travel too
Travel_10_Map_X = 9 #X coordinate you want the player to move too
Travel_10_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_10_Map_Face = 2
#-------------------------------Option 11---------------------------------------
Travel_11_name = "user adds more" #name of the first option
Travel_11_Map = 5 #number of the map you want to travel too
Travel_11_Map_X = 9 #X coordinate you want the player to move too
Travel_11_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_11_Map_Face = 2
#-------------------------------Option 12---------------------------------------
Travel_12_name = "user adds more"#name of the first option
Travel_12_Map = 5 #number of the map you want to travel too
Travel_12_Map_X = 9 #X coordinate you want the player to move too
Travel_12_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_12_Map_Face = 2
#-------------------------------Option 13---------------------------------------
Travel_13_name = "user adds more"#name of the first option
Travel_13_Map = 5 #number of the map you want to travel too
Travel_13_Map_X = 9 #X coordinate you want the player to move too
Travel_13_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_13_Map_Face = 2
#-------------------------------Option 14---------------------------------------
Travel_14_name = "user adds more"#name of the first option
Travel_14_Map = 5 #number of the map you want to travel too
Travel_14_Map_X = 9 #X coordinate you want the player to move too
Travel_14_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_14_Map_Face = 2
#-------------------------------Option 15---------------------------------------
Travel_15_name = "user adds more"#name of the first option
Travel_15_Map = 5 #number of the map you want to travel too
Travel_15_Map_X = 9 #X coordinate you want the player to move too
Travel_15_Map_Y = 7 #Y coordinate you want the player to move too
#direction you want the player to face(2=down,4=left,6=right,8=up)
Travel_15_Map_Face = 2
#-----------------------End Of Edits--------------------------------------------
#-------------------------------------------------------------------------------
class Scene_Travel
Number_Of_Options = Number_Of_Options + 1
def initialize(menu_index = 0)
@menu_index = menu_index #Setup Menu index
end
def main
# Make command window
@commands = []
s1 = Travel_1_name
s2 = Travel_2_name
s3 = Travel_3_name
s4 = Travel_4_name
s5 = Travel_5_name
s6 = Travel_6_name
s7 = Travel_7_name
s8 = Travel_8_name
s9 = Travel_9_name
s10 = Travel_10_name
s11 = Travel_11_name
s12 = Travel_12_name
s13 = Travel_13_name
s14 = Travel_14_name
s15 = Travel_15_name
s16 = EXIT
#These if statments create the menu options based on Number_Of_Options
if Number_Of_Options == 1
$scene = Scene_Menu.new
end
if Number_Of_Options == 2
@commands.push(s1, s16).flatten!
end
if Number_Of_Options == 3
@commands.push(s1, s2, s16).flatten!
end
if Number_Of_Options == 4
@commands.push(s1, s2, s3, s16).flatten!
end
if Number_Of_Options == 5
@commands.push(s1, s2, s3, s4, s16).flatten!
end
if Number_Of_Options == 6
@commands.push(s1, s2, s3, s4, s5, s16).flatten!
end
if Number_Of_Options == 7
@commands.push(s1, s2, s3, s4, s5, s6, s16).flatten!
end
if Number_Of_Options == 8
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s16).flatten!
end
if Number_Of_Options == 9
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s8, s16).flatten!
end
if Number_Of_Options == 10
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s8, s9, s16).flatten!
end
if Number_Of_Options == 11
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s8, s9, s10, s16).flatten!
end
if Number_Of_Options == 12
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s8, s9, s10, s11, s16).flatten!
end
if Number_Of_Options == 13
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s8, s9, s10, s11, s12, s16).flatten!
end
if Number_Of_Options == 14
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s8, s9, s10, s11, s12, s13, s16).flatten!
end
if Number_Of_Options == 15
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s8, s9, s10, s11, s12, s13, s14, s16).flatten!
end
if Number_Of_Options == 16
@commands.push(s1, s2, s3, s4, s5, s6, s7 ,s8, s9, s10, s11, s12, s13, s14, s15, s16).flatten!
end
@command_window = Window_Command.new(200, @commands)
@command_window.index = @menu_index
@command_window.height = 295
@command_window.x = 220
@command_window.y = 85
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame Update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of window
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update command window
@command_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(0)
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0
command_one
when 1
command_two
when 2
command_three
when 3
command_four
when 4
command_five
when 5
command_six
when 6
command_seven
when 7
command_eight
when 8
command_nine
when 9
command_ten
when 10
command_eleven
when 11
command_twelve
when 12
command_thirteen
when 13
command_fourten
when 14
command_fifteen
when 15
command_cancel
end
return
end
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 1] Command
#--------------------------------------------------------------------------
def command_one
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_1_Map
$game_temp.player_new_x = Travel_1_Map_X
$game_temp.player_new_y = Travel_1_Map_Y
$game_temp.player_new_direction = Travel_1_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 2] Command
#--------------------------------------------------------------------------
def command_two
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_2_Map
$game_temp.player_new_x = Travel_2_Map_X
$game_temp.player_new_y = Travel_2_Map_Y
$game_temp.player_new_direction = Travel_2_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 3] Command
#--------------------------------------------------------------------------
def command_three
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_3_Map
$game_temp.player_new_x = Travel_3_Map_X
$game_temp.player_new_y = Travel_3_Map_Y
$game_temp.player_new_direction = Travel_3_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 4] Command
#--------------------------------------------------------------------------
def command_four
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_4_Map
$game_temp.player_new_x = Travel_4_Map_X
$game_temp.player_new_y = Travel_4_Map_Y
$game_temp.player_new_direction = Travel_4_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 5] Command
#--------------------------------------------------------------------------
def command_five
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_5_Map
$game_temp.player_new_x = Travel_5_Map_X
$game_temp.player_new_y = Travel_5_Map_Y
$game_temp.player_new_direction = Travel_5_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 6] Command
#--------------------------------------------------------------------------
def command_six
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_6_Map
$game_temp.player_new_x = Travel_6_Map_X
$game_temp.player_new_y = Travel_6_Map_Y
$game_temp.player_new_direction = Travel_6_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 7] Command
#--------------------------------------------------------------------------
def command_seven
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_7_Map
$game_temp.player_new_x = Travel_7_Map_X
$game_temp.player_new_y = Travel_7_Map_Y
$game_temp.player_new_direction = Travel_7_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 8] Command
#--------------------------------------------------------------------------
def command_eight
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_8_Map
$game_temp.player_new_x = Travel_8_Map_X
$game_temp.player_new_y = Travel_8_Map_Y
$game_temp.player_new_direction = Travel_8_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 9] Command
#--------------------------------------------------------------------------
def command_nine
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_9_Map
$game_temp.player_new_x = Travel_9_Map_X
$game_temp.player_new_y = Travel_9_Map_Y
$game_temp.player_new_direction = Travel_9_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 10] Command
#--------------------------------------------------------------------------
def command_ten
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_10_Map
$game_temp.player_new_x = Travel_10_Map_X
$game_temp.player_new_y = Travel_10_Map_Y
$game_temp.player_new_direction = Travel_10_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 11] Command
#--------------------------------------------------------------------------
def command_eleven
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_11_Map
$game_temp.player_new_x = Travel_11_Map_X
$game_temp.player_new_y = Travel_11_Map_Y
$game_temp.player_new_direction = Travel_11_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 12] Command
#--------------------------------------------------------------------------
def command_twelve
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_12_Map
$game_temp.player_new_x = Travel_12_Map_X
$game_temp.player_new_y = Travel_12_Map_Y
$game_temp.player_new_direction = Travel_12_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 13] Command
#--------------------------------------------------------------------------
def command_thirteen
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_13_Map
$game_temp.player_new_x = Travel_13_Map_X
$game_temp.player_new_y = Travel_13_Map_Y
$game_temp.player_new_direction = Travel_13_Map_Face
$game_map.autoplay
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 14] Command
#--------------------------------------------------------------------------
def command_fourteen
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_14_Map
$game_temp.player_new_x = Travel_14_Map_X
$game_temp.player_new_y = Travel_14_Map_Y
$game_temp.player_new_direction = Travel_14_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 15] Command
#--------------------------------------------------------------------------
def command_fifteen
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Set transferring player flag
$game_temp.player_transferring = true
# appointment method is [direct appointment]
# Set player move destination
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$game_temp.player_new_map_id = Travel_15_Map
$game_temp.player_new_x = Travel_15_Map_X
$game_temp.player_new_y = Travel_15_Map_Y
$game_temp.player_new_direction = Travel_15_Map_Face
$game_map.autoplay
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Process When Choosing [Option 16] Command
#--------------------------------------------------------------------------
def command_cancel
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to EXIT_TO option
$scene = Scene_Map.new
end
end #scene travel
#------------------------------------------------------------------------------
# * End SDK Enable Test (Test for SDK log of Scene_Tavel)
#------------------------------------------------------------------------------
end