RPG-Maker Quartier

Hier dreht sich alles um die RPG-Maker-Reihe von ASCII/Enterbrain. Der RPG-Maker ist ein Tool, mit dem du dir dein eigenes kleines Rollenspiel erstellen kannst. Du findest hier alles, was du dazu brauchst. Aber natürlich umfasst die Community noch mehr!
Aktuelle Zeit: Di Mär 03, 2020 3:00

Alle Zeiten sind UTC + 1 Stunde



Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast



Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Autor Nachricht
Offline
Sayjaman
Sayjaman
Benutzeravatar
Beiträge: 51
 Betreff des Beitrags: Quests und class changer
BeitragVerfasst: So Jul 03, 2011 10:02 
Hi Leute,
hab mir mal den RMXP Skript explorer geholt und wollte diese beiden skripts einfügen
1:
#//////////////////////////////////////////Questlog 2.0/////////////////////////////////////////////
#~~~~~~~~~~~~~~~~~~~~by Caesar~~~~~~~~~~~~~~~~~~~~
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#_________________________________________________

class Scene_Questlog
def main
@window_header = Window_Questlog_Header.new
@window_titles = Window_Questlog_Titles.new
description = ""
picture = ""
if $game_system.questlog.count > 0
description = $game_system.questlog.quests[0].description
picture = $game_system.questlog.quests[0].picture
end
@window_description = Window_Questlog_Description.new(
description, picture)
@index = @window_titles.index
@spriteset = Spriteset_Map.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@window_header.dispose
@window_titles.dispose
@window_description.dispose
@spriteset.dispose
end
#--------------------------------------------------------------------------
def update
@window_titles.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if @index != @window_titles.index
@index = @window_titles.index
@window_description.description = $game_system.questlog.quests[
@window_titles.index].description
@window_description.picture = $game_system.questlog.quests[
@window_titles.index].picture
@window_description.refresh
end
end
end
#=============
class Quest
attr_reader :title
attr_reader :description
attr_reader :icon
attr_reader :picture
attr_accessor :enabled
def initialize(title, description, icon="", picture="")
@title = title
@description = description
@icon = icon
@picture = picture
@enabled = true
end
end
#============
class Questlog
attr_reader :quests
def initialize
@quests = []
end
#-----------
def add(quest, description="", icon="", picture="")
return add(Quest.new(quest, description, icon, picture)) unless
quest.is_a?(Quest)
i = index(quest.title)
return @quests[i] = quest if i != nil
#@quests.push(quest) # Quest wird unten eingefügt
@quests.unshift(quest) # Quest wird oben eingefügt
end
#-----------
def remove(title)
@quests.delete_if{ |quest| quest.title == title}
end
#-----------
def enable(title)
set_enabled(title, true)
end
#-----------
def disable(title)
set_enabled(title, false)
end
#-----------
def set_enabled(title, enabled)
@quests.each do |quest|
quest.enabled = enabled if quest.title == title
end
end
#-----------
def count
return @quests.length
end
#------------
def index(title)
for i in 0..@quests.length-1
return i if @quests[i].title == title
end
return nil
end
#------------
def Questlog.add(title, description="", icon="", picture="")
$game_system.questlog.add(title, description, icon, picture) *<------------------------------------------------------------------------hier ist der Fehler*
end
#------------
def Questlog.remove(title)
$game_system.questlog.remove(title)
end
#------------
def Questlog.enable(title)
$game_system.questlog.enable(title)
end
#------------
def Questlog.disable(title)
$game_system.questlog.disable(title)
end
#------------
def Questlog.set_enabled(title)
$game_system.questlog.set_enabled(title)
end
end
#=============
class Window_Questlog_Description < Window_Base
attr_accessor :description
attr_accessor :picture
def initialize(description, picture)
super(275, 92, 300, 360)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
@description = description
@picture = picture
refresh
end
#-----------
def refresh
self.contents.clear
if (@picture != nil) && (not @picture == "")
bitmap = RPG::Cache.picture(@picture)
rect = bitmap.rect
self.contents.blt(width/2-rect.width/2-16, 0, bitmap, rect, 255)
self.contents.draw_formatted_text(
4, rect.height, 270, 328-rect.height, @description)
else
self.contents.draw_formatted_text(4, 0, 270, 328, @description)
end
end
end
#=============
class Window_Questlog_Titles < Window_Selectable
def initialize
super(65, 92, 210, 360)
@item_max = $game_system.questlog.count
self.contents = Bitmap.new(width-32, @item_max > 0 ? @item_max*32 : 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
self.index = 0
@column_max = 1
refresh
end
#-------------
def refresh
self.contents.clear
for i in 0...$game_system.questlog.count
quest = $game_system.questlog.quests[i]
y = i*32
self.contents.font.color = quest.enabled ? normal_color : disabled_color
if (quest.icon != nil) && (not quest.icon == "")
bitmap = RPG::Cache.icon(quest.icon)
opacity = quest.enabled ? 255 : 128
self.contents.blt(4, y+4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_formatted_text(29, y, 150, 32, quest.title)
else
self.contents.draw_formatted_text(4, y, 150, 32, quest.title)
end
end
end
end
#===========
class Window_Questlog_Header < Window_Base
def initialize
super(65, 28, 510, 64)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = 26
refresh
end
#------------
def refresh
self.contents.clear
self.contents.draw_text(self.contents.rect, "Questlog", 1)
end
end
#===========
class Scene_Map
def call_questlog
$game_temp.questlog_calling = false
$game_player.straighten
$scene = Scene_Questlog.new
end
end
#===========
class Game_System
attr_reader :questlog
alias init initialize
def initialize
init
@questlog = Questlog.new
end
end
#===========
class Game_Temp
attr_accessor :questlog_calling
alias init initialize
def initialize
init
@questlog_calling = false
end
end
#==============
class Bitmap
def draw_shadow_text(x, y, width, height, str, align=0)
color = font.color.dup
font.color = Color.new(192, 192, 192, 156)
draw_text(x+2, y+2, width, height, str, align)
font.color = color
draw_text(x, y, width, height, str, align)
end
#----------------
def draw_formatted_text(x, y, width, height, str, align=0)
str = str.dup
color = font.color.dup
bold = font.bold
italic = font.italic
size = font.size
name = font.name.dup
#::::::::::
shadow = false
underlined = false
str.gsub!(/<br>/) {"\n"}
str.gsub!(/\\\\/) {"\00"}
str.gsub!(/<b>/) {"\01"}
str.gsub!(/<\/b>/) {"\02"}
str.gsub!(/<i>/) {"\03"}
str.gsub!(/<\/i>/) {"\04"}
str.gsub!(/<color=(#?[0-9a-z]+)>/) {"\05[#{$1}]"}
str.gsub!(/<\/color>/) {"\06"}
str.gsub!(/<shadow>/) {"\16"}
str.gsub!(/<\/shadow>/) {"\17"}
str.gsub!(/<small>/) {"\20"}
str.gsub!(/<\/small>/) {"\21"}
str.gsub!(/<big>/) {"\23"}
str.gsub!(/<\/big>/) {"\21"}
str.gsub!(/<size=([0-9]+)>/) {"\24[#{$1}]"}
str.gsub!(/<\/size>/) {"\21"}
str.gsub!(/<font=([A-Za-z0-9\s]+)>/) {"\25[#{$1}]"}
str.gsub!(/<\/font>/) {"\26"}
str.gsub!(/<u>/) {"\27"}
str.gsub!(/<\/u>/) {"\30"}
ix = 0
iy = 0
while ((c = str.slice!(/./m)) != nil)
if c == "\00" # \\
c = "\\"
end
if c == "\01" # <b>
font.bold = true
end
if c == "\02" #</b>
font.bold = false
end
if c == "\03" # <i>
font.italic = true
end
if c == "\04" # </i>
font.italic = false
end
if c == "\05" # <color=xxx>
str.sub!(/\[(#?[0-9a-z]+)\]/, "")
if $1[0] == 35
col = Color.decode($1)
elsif $1.to_i != 0
col = Window_Base.text_color($1.to_i)
else
col = Color.get($1)
end
font.color = col
end
if c == "\06" # </color>
font.color = color
end
if c == "\16" # <shadow>
shadow = true
end
if c == "\17" # </shadow>
shadow = false
end
if c == "\20" # <small>
font.size -= 5
font.size = 1 if font.size < 1
end
if c == "\21" # </small> </big> </size>
font.size = size
end
if c == "\23" # <big>
font.size += 5
end
if c == "\24" # <size=xx>
str.sub!(/\[([0-9]+)\]/, "")
font.size = $1.to_i
font.size = 1 if font.size < 1
end
if c == "\25" # <font=xxx>
str.sub!(/\[([A-Za-z0-9\s]+)\]/, "")
font.name = $1 if Font.exist?($1)
end
if c == "\26" # </font>
font.name = name
end
if c == "\27" # <u>
underlined = true
end
if c == "\30" # </u>
underlined = false
end
if c == "\n"
iy += 32
ix = 0
end
#:::::::::
if shadow
draw_shadow_text(x+ix+4, y+iy, 40, 32, c)
else
draw_text(x+ix+4, y+iy, 40, 32, c)
end
w = text_size(c).width
if underlined
fill_rect(x+ix+4, y+iy+text_size("T").height+3, w, 2, font.color)
end
ix += w
end
#::::::::::
font.color = color
font.bold = bold
font.italic = italic
font.size = size
font.name = name
end
end
#==============
class Color
def Color.get(string)
return Color.white if string == "white"
return Color.black if string == "black"
return Color.red if string == "red"
return Color.green if string == "green"
return Color.blue if string == "blue"
return Color.yellow if string == "yellow"
return Color.cyan if string == "cyan"
return Color.magenta if string == "magenta"
return Color.light_gray if string == "light_gray"
return Color.gray if string == "gray"
return Color.dark_gray if string == "dark_gray"
return Color.pink if string == "pink"
return Color.orange if string == "orange"
return Color.white
end
#------------
def Color.decode(hex)
return Color.decode(hex[1..hex.length]) if hex[0] == 35
hex.downcase!
red = hex[0..1].hex
green = hex[2..3].hex
blue = hex[4..5].hex
alpha = hex.length == 8 ? hex[6..7].hex : 255
return Color.new(red, green, blue, alpha)
end
#------------
def Color.white(alpha=255)
return Color.new(255, 255, 255, alpha)
end
#-----------
def Color.black(alpha=255)
return Color.new(0, 0, 0, alpha)
end
#----------
def Color.red(alpha=255)
return Color.new(255, 0, 0, alpha)
end
#----------
def Color.green(alpha=255)
return Color.new(0, 255, 0, alpha)
end
#---------
def Color.blue(alpha=255)
return Color.new(0, 0, 255, alpha)
end
#----------
def Color.yellow(alpha=255)
return Color.new(255, 255, 0, alpha)
end
#----------
def Color.cyan(alpha=255)
return Color.new(0, 255, 255, alpha)
end
#----------
def Color.magenta(alpha=255)
return Color.new(255, 255, 0, alpha)
end
#----------
def Color.light_gray(alpha=255)
return Color.new(192, 192, 192, alpha)
end
#-----------
def Color.gray(alpha=255)
return Color.new(128, 128, 128, alpha)
end
#-----------
def Color.dark_gray(alpha=255)
return Color.new(64, 64, 64, alpha)
end
#-----------
def Color.pink(alpha=255)
return Color.new(255, 175, 175, alpha)
end
#-----------
def Color.orange(alpha=255)
return Color.new(255, 200, 0, alpha)
end
end
#=====================
class Window_Base < Window
def Window_Base.text_color(n)
case n
when 0
return Color.new(255, 255, 255, 255)
when 1
return Color.new(128, 128, 255, 255)
when 2
return Color.new(255, 128, 128, 255)
when 3
return Color.new(128, 255, 128, 255)
when 4
return Color.new(128, 255, 255, 255)
when 5
return Color.new(255, 128, 255, 255)
when 6
return Color.new(255, 255, 128, 255)
when 7
return Color.new(192, 192, 192, 255)
else
return Color.white
end
end
end




















---------------------------------------------------------------







ACHTUNG

Scene_;ap hiermit ersetzen



















class Scene_Map
def main
@spriteset = Spriteset_Map.new
@message_window = Window_Message.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@spriteset.dispose
@message_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
#---------------
def update
loop do
$game_map.update
$game_system.map_interpreter.update
$game_player.update
$game_system.update
$game_screen.update
unless $game_temp.player_transferring
break
end
transfer_player
if $game_temp.transition_processing
break
end
end
@spriteset.update
@message_window.update
if $game_temp.gameover
$scene = Scene_Gameover.new
return
end
if $game_temp.to_title
$scene = Scene_Title.new
return
end
if $game_temp.transition_processing
$game_temp.transition_processing = false
if $game_temp.transition_name == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$game_temp.transition_name)
end
end
if $game_temp.message_window_showing
return
end
if $game_player.encounter_count == 0 and $game_map.encounter_list != []
unless $game_system.map_interpreter.running? or
$game_system.encounter_disabled
n = rand($game_map.encounter_list.size)
troop_id = $game_map.encounter_list[n]
if $data_troops[troop_id] != nil
$game_temp.battle_calling = true
$game_temp.battle_troop_id = troop_id
$game_temp.battle_can_escape = true
$game_temp.battle_can_lose = false
$game_temp.battle_proc = nil
end
end
end
if Input.trigger?(Input::B)
unless $game_system.map_interpreter.running? or
$game_system.menu_disabled
$game_temp.menu_calling = true
$game_temp.menu_beep = true
end
end
if $DEBUG and Input.press?(Input::F9)
$game_temp.debug_calling = true
end

#~~~~~~~~~~~~~~~~~~~
if Input.trigger?(Input::F5)
$game_temp.questlog_calling = true
end
#~~~~~~~~~~~~~~~~~~~

unless $game_player.moving?
if $game_temp.battle_calling
call_battle
elsif $game_temp.shop_calling
call_shop
elsif $game_temp.name_calling
call_name
elsif $game_temp.menu_calling
call_menu
elsif $game_temp.save_calling
call_save
elsif $game_temp.debug_calling
call_debug
#~~~~~~~~~~~~~~~~~
elsif $game_temp.questlog_calling
call_questlog
#~~~~~~~~~~~~~~~~~
end
end
end
#--------------------
def call_battle
$game_temp.battle_calling = false
$game_temp.menu_calling = false
$game_temp.menu_beep = false
$game_player.make_encounter_count
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.bgm_stop
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
$game_player.straighten
$scene = Scene_Battle.new
end
#---------------
def call_shop
$game_temp.shop_calling = false
$game_player.straighten
$scene = Scene_Shop.new
end
#----------------
def call_name
$game_temp.name_calling = false
$game_player.straighten
$scene = Scene_Name.new
end
#---------------
def call_menu
$game_temp.menu_calling = false
if $game_temp.menu_beep
$game_system.se_play($data_system.decision_se)
$game_temp.menu_beep = false
end
$game_player.straighten
$scene = Scene_Menu.new
end
#------------------
def call_save
$game_player.straighten
$scene = Scene_Save.new
end
#-----------------
def call_debug
$game_temp.debug_calling = false
$game_system.se_play($data_system.decision_se)
$game_player.straighten
$scene = Scene_Debug.new
end
#--------------------
def transfer_player
$game_temp.player_transferring = false
if $game_map.map_id != $game_temp.player_new_map_id
$game_map.setup($game_temp.player_new_map_id)
end
$game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
case $game_temp.player_new_direction
when 2
$game_player.turn_down
when 4
$game_player.turn_left
when 6
$game_player.turn_right
when 8
$game_player.turn_up
end
$game_player.straighten
$game_map.update
@spriteset.dispose
@spriteset = Spriteset_Map.new
if $game_temp.transition_processing
$game_temp.transition_processing = false
Graphics.transition(20)
end
$game_map.autoplay
Graphics.frame_reset
Input.update
end
end


2:
#==============================================================================
# Party & Class Changing System
#--------------------------------------------------------------------------
# Created By SephirothSpawn (11.27.05)
# Last Updated: 11.28.05
#==============================================================================

#==============================================================================
# Class Scene Title
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Alias' New Game Method
#--------------------------------------------------------------------------
alias new_game command_new_game
#--------------------------------------------------------------------------
# * Adds Base Stats For Enemies
#--------------------------------------------------------------------------
def command_new_game
# Sets Class Requirements
for i in 1...$data_classes.size
$data_classes[i].set_reqirements
end
# Sets Characters Sex
for i in 1...$data_actors.size
$data_actors[i].set_sex
end
new_game
end
end

#==============================================================================
# ** Module RPG
#==============================================================================
module RPG
#===========================================================================
# ** Class Actor
#===========================================================================
class Actor
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :sex
#--------------------------------------------------------------------------
# * Set Sex
#--------------------------------------------------------------------------
def set_sex
if @name.include?('(')
@sex = @name.slice!(@name.index('(')..@name.index(')')) == '(M)' ? 1 : 2
else
@sex = 1
end
end
end
#===========================================================================
# ** Class Class
#===========================================================================
class Class
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :level_requirements
attr_accessor :sex_requirements
#--------------------------------------------------------------------------
# * Set Requirements
#--------------------------------------------------------------------------
def set_reqirements
# Sets Level Requirements
@level_requirements = @name.include?('{') ?
eval (@name.slice!(@name.index('{')..@name.index('}'))) : {}
# Sets Sex Requirements
if @name.include?('(')
sex = @name.slice!(@name.index('(')..@name.index(')'))
@sex_requirements = sex == '(M)' ? 1 : 2
else
@sex_requirements = 0
end
end
end
end

#==============================================================================
# ** Class Window_Base
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# * Draw Item Name
# item : item
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw text width
# align : text align
#--------------------------------------------------------------------------
def draw_item_name(item, x, y, width = 212, align = 0, type = 0)
if item == nil
case type
when 0 # Weapon
bitmap = RPG::Cache.icon("001-Weapon01")
when 1 # Shield
bitmap = RPG::Cache.icon("009-Shield01")
when 2 # Helmet
bitmap = RPG::Cache.icon("010-Head01")
when 3 # Armor
bitmap = RPG::Cache.icon("014-Body02")
when 4 # Accessory
bitmap = RPG::Cache.icon("016-Accessory01")
end
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), disabled_color.alpha)
self.contents.font.color = disabled_color
self.contents.draw_text(x + 28, y, width - 28, 32, "Nothing Equipped", align)
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y, width - 28, 32, item.name, align)
end
#--------------------------------------------------------------------------
# * Draw Sprite
#--------------------------------------------------------------------------
def draw_sprite(x, y, name, hue, pose, frame, actor_contents = true)
bitmap = RPG::Cache.character(name, hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
# Facing Direction
case pose
when 0 ;a = 0 # Down
when 1 ;a = ch # Left
when 2 ;a = ch * 3 # Up
when 3 ;a = ch * 2 # Right
end
# Current Animation Slide
case frame
when 0 ;b = 0
when 1 ;b = cw
when 2 ;b = cw * 2
when 3 ;b = cw * 3
end
# Bitmap Rectange
src_rect = Rect.new(b, a, cw, ch)
# Draws Bitmap
if actor_contents
@sprite_contents.bitmap.blt(x - cw / 2, y - ch, bitmap, src_rect)
else
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
#--------------------------------------------------------------------------
# Draw Bar
# Credit Near Fantastica for Orginal Script
#--------------------------------------------------------------------------
def draw_bar(x, y, min, max, width = 152, height = 20)
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
bar_color = Color.new(0, 0, 200, 255)
for i in 0..(width * min / max)
r = bar_color.red * (width - i) / width + 0 * i / width
g = bar_color.green * (width - i) / width + 0 * i / width
b = bar_color.blue * (width - i) / width + 0 * i / width
a = bar_color.alpha * (width - i) / width + 255 * i / width
self.contents.fill_rect(x + i, y, 1 , height, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# * Alias Update
#--------------------------------------------------------------------------
alias sprite_update update
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
sprite_update
unless @sprite_contents == nil
@sprite_contents.x = self.x + self.ox + 16
@sprite_contents.y = self.y + self.oy + 16
end
end
#--------------------------------------------------------------------------
# * Alias Dispose
#--------------------------------------------------------------------------
alias sprite_dispose dispose
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
sprite_dispose
unless @sprite_contents == nil
@sprite_contents.dispose
@sprite_contents.dispose
end
end
end

#==============================================================================
# ** Window_Selectable
#==============================================================================
class Window_Selectable < Window_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :cursor_height
#--------------------------------------------------------------------------
# * Alias Initialization
#--------------------------------------------------------------------------
alias custom_int initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
custom_int(x, y, width, height)
@cursor_height = 32
end
#--------------------------------------------------------------------------
# * Get Top Row
#--------------------------------------------------------------------------
def top_row
# Divide y-coordinate of window contents transfer origin by 1 row
# height of @cursor_height
return self.oy / @cursor_height
end
#--------------------------------------------------------------------------
# * Set Top Row
# row : row shown on top
#--------------------------------------------------------------------------
def top_row=(row)
# If row is less than 0, change it to 0
if row < 0
row = 0
end
# If row exceeds row_max - 1, change it to row_max - 1
if row > row_max - 1
row = row_max - 1
end
# Multiply 1 row height by 32 for y-coordinate of window contents
# transfer origin
self.oy = row * @cursor_height
end
#--------------------------------------------------------------------------
# * Get Number of Rows Displayable on 1 Page
#--------------------------------------------------------------------------
def page_row_max
# Subtract a frame height of 32 from the window height, and divide it by
# 1 row height of @cursor_height
return (self.height - 32) / @cursor_height
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect
# If cursor position is less than 0
if @index < 0
self.cursor_rect.empty
return
end
# Get current row
row = @index / @column_max
# If current row is before top row
if row < self.top_row
# Scroll so that current row becomes top row
self.top_row = row
end
# If current row is more to back than back row
if row > self.top_row + (self.page_row_max - 1)
# Scroll so that current row becomes back row
self.top_row = row - (self.page_row_max - 1)
end
# Calculate cursor width
cursor_width = self.width / @column_max - 32
# Calculate cursor coordinates
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * @cursor_height - self.oy
if self.active == true
# Update cursor rectangle
self.cursor_rect.set(x, y, cursor_width, @cursor_height)
end
end
end

#==============================================================================
# ** Window_Command
#==============================================================================
class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# * Unisable Item
# index : item number
#--------------------------------------------------------------------------
def undisable_item(index)
draw_item(index, normal_color)
end
end

#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :class_levels
attr_accessor :class_exp
attr_accessor :class_skills
attr_accessor :sex
#--------------------------------------------------------------------------
# * Alias Setup
#--------------------------------------------------------------------------
alias class_setup setup
#--------------------------------------------------------------------------
# * Setup
#--------------------------------------------------------------------------
def setup(actor_id)
class_setup(actor_id)
@class_levels, @class_exp, @class_skills = [nil], [nil], [nil]
for i in 0...$data_classes.size
@class_levels.push(1)
@class_exp.push(0)
@class_skills.push([])
end
@sex = $data_actors[actor_id].sex
end
#--------------------------------------------------------------------------
# * Switch Class
#--------------------------------------------------------------------------
def switch_class(class_id)
# Updates Class Arrays
@class_levels[@class_id ] = @level
@class_exp[@class_id] = @exp
@class_skills[@class_id] = @skills
# Loads New Class ID
@class_id = class_id
# Loads Class Level & Exp Count
@level = @class_levels[class_id]
@exp = @class_exp[class_id]
@skills = @class_skills[class_id]
end
#--------------------------------------------------------------------------
# * Update Levels & Exp
#--------------------------------------------------------------------------
def update_classes
# Updates Class Arrays
@class_levels[@class_id ] = @level
@class_exp[@class_id] = @exp
@class_skills[@class_id] = @skills
end
end

#==============================================================================
# ** Class Game_Party
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :reserve_actors
#--------------------------------------------------------------------------
# * Alias Initialization
#--------------------------------------------------------------------------
alias reserve_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
reserve_initialize
@reserve_actors = []
end
#--------------------------------------------------------------------------
# * Add an Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
def add_actor(actor_id)
# Get actor
actor = $game_actors[actor_id]
# If the party has less than 4 members and this actor is not in the party
if @actors.size < 4 and not @actors.include?(actor)
# Add actor
@actors.push(actor)
# Refresh player
$game_player.refresh
elsif @actors.size >= 4 and not @actors.include?(actor) and not @reserve_actors.include?(actor)
# Add actor
@reserve_actors.push(actor)
# Refresh player
$game_player.refresh
end
end
#--------------------------------------------------------------------------
# * Move To Reserve
# actor_id : actor ID
#--------------------------------------------------------------------------
def move_to_reserve(actor_id)
# Get actor
actor = $game_actors[actor_id]
if @actors.include?(actor)
@actors.delete(actor)
@reserve_actors.push(actor)
end
# Refresh player
$game_player.refresh
end
#--------------------------------------------------------------------------
# * Move To Party
# actor_id : actor ID
#--------------------------------------------------------------------------
def move_to_party(actor_id)
# Get actor
actor = $game_actors[actor_id]
if @reserve_actors.include?(actor)
@reserve_actors.delete(actor)
@actors.push(actor)
end
# Refresh player
$game_player.refresh
end
end

#==============================================================================
# ** Window_Member_Sprites
#==============================================================================
class Window_Member_Sprites < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x = 0, y = 384, width = 160)
super(x, y, width, 96)
self.z = 500
# Creates Contents
self.contents = Bitmap.new(width - 32, height - 32)
@sprite_contents = Sprite.new
@sprite_contents.bitmap = Bitmap.new(width - 32, height - 32)
@sprite_contents.z = 505
self.contents.font.size = 10
# Animation Varaibles
@pose, @frame = 0, 0
# Updates Window
update
end
#--------------------------------------------------------------------------
# * Refresh
# actors : $game_party.actors or $game_party.reserve_actors
#--------------------------------------------------------------------------
def refresh(actors)
# Clears Contents
contents.clear
@sprite_contents.bitmap.clear
# Stores Actors
@actors = actors.dup
# Adds Blank Actors
max = @actors == $game_party.actors ? 3 : 14
@actors.push(nil) until @actors.size > max
# Draw Sprites
draw_sprites
# Draws Info
draw_info
end
#--------------------------------------------------------------------------
# Draw Sprites
#--------------------------------------------------------------------------
def draw_sprites
@sprite_contents.bitmap.clear
for i in 0...@actors.size
actor = @actors[i]
if actor == nil
draw_sprite(i * 32 + 16, 64, "Empty", 0, @pose, @frame)
else
draw_sprite(i * 32 + 16, 64, actor.character_name, actor.character_hue , @pose, @frame)
end
end
end
#--------------------------------------------------------------------------
# Draw Information
#--------------------------------------------------------------------------
def draw_info
contents.clear
for i in 0...@actors.size
actor = @actors[i]
if actor == nil
contents.font.color = disabled_color
contents.draw_text(i * 32, 0, 32, 12, "Empty", 1)
else
contents.font.color = normal_color
contents.draw_text(i * 32, 0, 32, 12, actor.name, 1)
end
end
end
#--------------------------------------------------------------------------
# Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
draw_sprites
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect(index)
self.cursor_rect.set(index * 32, 0, 32, 64)
end
#--------------------------------------------------------------------------
# Update Pose
# direction : 0 - Left 1 - Right
#--------------------------------------------------------------------------
def update_pose(direction)
if direction == 0
@pose == 0 ? @pose = 3 : @pose -= 1
else
@pose == 3 ? @pose = 0 : @pose += 1
end
draw_sprites
end
end

#==============================================================================
# ** Window_Party_Changing
#==============================================================================
class Window_Party_Changing < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 288)
# Sets Cursor Height
self.cursor_height = 64
# Sets Index
self.index = 0
# Animated Sprite Counters
@pose, @frame = 0, 0
# Sets Up Window Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Sprite Contents
@sprite_contents = Sprite.new
@sprite_contents.bitmap = Bitmap.new(width - 32, height - 32)
@sprite_contents.z = 500
# Updates Window
update
end
#--------------------------------------------------------------------------
# * Refresh
# actors : $game_party.actors or $game_party.reserve_actors
#--------------------------------------------------------------------------
def refresh(actors)
# Clears Contents
contents.clear
@sprite_contents.bitmap.clear
# Duplicates Actors
@actors = actors.dup
# Checks Actors List
max = @actors == $game_party.actors ? 3 : 0
@actors.push(nil) until @actors.size > max
# Sets Up Item Max
@item_max = @actors.size
# Draw Sprites
draw_sprites
# Draws Info
draw_info
end
#--------------------------------------------------------------------------
# Draws Sprites
#--------------------------------------------------------------------------
def draw_sprites
@sprite_contents.bitmap.clear
# Draws actors
for i in 0...@actors.size
actor = @actors[i]
y = i * 64 + 8
if actor == nil
draw_sprite(20, y + 48, "Empty", 0, @pose, @frame)
else
draw_sprite(20, y + 48, actor.character_name, actor.character_hue , @pose, @frame)
end
end
end
#--------------------------------------------------------------------------
# Draws Information
#--------------------------------------------------------------------------
def draw_info
contents.clear
# Draws actors
for i in 0...@actors.size
actor = @actors[i]
y = i * 64 + 8
if actor == nil
contents.font.size = 40
contents.font.color = disabled_color
contents.draw_text(60, y - 8, contents.width, 64, "Empty Position")
else
contents.font.size = 22
# Draws Name
contents.font.color = normal_color
contents.draw_text(60, y, 90, 24, actor.name)
# Draws Class
contents.draw_text(60, y + 24, 90, 24, $data_classes[actor.class_id].name)
# Draws Level
contents.font.color = system_color
contents.draw_text(160, y, 100, 24, "Level")
contents.font.color = normal_color
contents.draw_text(160, y, 100, 24, actor.level.to_s, 2)
# Draws State
state = make_battler_state_text(actor, 112, true)
contents.font.color = actor.hp == 0 ? knockout_color : normal_color
contents.draw_text(160, y + 24, 100, 24, state)
# Draws Experience
contents.font.color = system_color
contents.draw_text(274, y, 160, 24, "Exp")
contents.font.color = normal_color
contents.draw_text(274, y, 160, 24, actor.exp.to_s, 2)
# Draws Next Level Bar
draw_bar(270, y + 26, actor.exp, actor.next_exp_s.to_i, 168)
# Draws Next Level
contents.font.color = system_color
contents.draw_text(274, y + 24, 160, 24, "Next Level")
contents.font.color = normal_color
contents.draw_text(274, y + 24, 160, 24, actor.next_rest_exp_s.to_s, 2)
# Draw HP Bar
draw_bar(446, y + 2, actor.hp, actor.maxhp)
# Draw MP Bar
draw_bar(446, y + 26, actor.sp, actor.maxsp)
# Draws HP
contents.font.size = 22
contents.font.color = system_color
contents.draw_text(452, y, 160, 24, $data_system.words.hp)
contents.font.size = 16
contents.font.color = actor.hp == 0 ? knockout_color : normal_color
contents.draw_text(452, y, 140, 24, "#{actor.hp} / #{actor.maxhp}", 2)
# Draws SP
contents.font.size = 22
contents.font.color = system_color
contents.draw_text(452, y + 24, 160, 24, $data_system.words.sp)
contents.font.size = 16
contents.font.color = actor.sp == 0 ? knockout_color : normal_color
contents.draw_text(452, y + 24, 140, 24, "#{actor.sp} / #{actor.maxsp}", 2)
end
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
draw_sprites
end
#--------------------------------------------------------------------------
# * Update Pose
# direction : 0 - Left 1 - Right
#--------------------------------------------------------------------------
def update_pose(direction)
if direction == 0
@pose == 0 ? @pose = 3 : @pose -= 1
else
@pose == 3 ? @pose = 0 : @pose += 1
end
draw_sprites
end
end

#==============================================================================
# ** Window Class Changing
#==============================================================================
class Window_Class_Changing < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 64, 160, 320)
# Sets Cursor Height
self.cursor_height = 72
# Sets Index
self.index = 0
# Animated Sprite Counters
@pose, @frame = 0, 0
# Window Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Refreshes Window Contents
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Clears Contents
contents.clear
# Duplicates Actors
@actors = $game_party.actors.dup
# Checks Actors List
@actors.push(nil) until @actors.size > 3
# Sets Up Item Max
@item_max = @actors.size
# Draw Actors Info
contents.clear
for i in 0...@item_max
actor = @actors[i]
y = i * 72
# Draws Animated Sprite
if actor == nil
draw_sprite(20, y + 66, "Empty", 0, @pose, @frame, false)
contents.font.color = disabled_color
contents.draw_text(32, y + 2, contents.width - 40, 24, "", 2)
contents.draw_text(32, y + 24, contents.width - 40, 24, "Empty", 2)
contents.draw_text(32, y + 46, contents.width - 40, 24, "", 2)
else
draw_sprite(20, y + 66, actor.character_name, actor.character_hue , @pose, @frame, false)
contents.font.color = normal_color
# Draws Name
contents.draw_text(32, y + 2, contents.width - 40, 24, actor.name, 2)
# Draws Class
contents.draw_text(32, y + 24, contents.width - 40, 24, $data_classes[actor.class_id].name, 2)
# Draws Level
contents.draw_text(32, y + 46, contents.width - 40, 24, "Level: #{actor.level}", 2)
end
end
end
# Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
refresh
end
#--------------------------------------------------------------------------
# Update Pose
# direction : 0 - Left 1 - Right
#--------------------------------------------------------------------------
def update_pose(direction)
if direction == 0
@pose == 0 ? @pose = 3 : @pose -= 1
else
@pose == 3 ? @pose = 0 : @pose += 1
end
refresh
end
end

#==============================================================================
# ** Window Character Status
#==============================================================================
class Window_Character_Status < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize
super(160, 64, 480, 416)
# Animation Varaibles
@pose, @frame = 0, 0
# Window Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Refreshes Contents
refresh($game_party.actors[0])
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(actor)
# Clears Contents
contents.clear
# Stores Actor
@actor = actor
if actor == nil
draw_sprite(contents.width / 2, contents.height / 2, "Empty", 0, @pose, @frame, false)
# Draws Empty Text
contents.font.size = 48
contents.font.color = system_color
contents.font.color.alpha = disabled_color.alpha
contents.draw_text(0, contents.height / 2, contents.width, 48, "Empty Position", 1)
else
draw_sprite(40, 80, actor.character_name, actor.character_hue , @pose, @frame, false)
contents.font.size = 22
contents.font.color = normal_color
# Draws Name
contents.draw_text(-8, 4, 96, 24, actor.name, 1)
# Draws State
state = make_battler_state_text(actor, 112, true)
contents.font.color = actor.hp == 0 ? knockout_color : normal_color
contents.draw_text(96, 8, 96, 24, state, 1)
# Draws Class
contents.font.color = system_color
contents.draw_text(96, 32, 96, 24, actor.class_name, 1)
# Draws Level
contents.font.color = system_color
contents.draw_text(96, 56, 96, 24, "Level :")
contents.font.color = normal_color
contents.draw_text(96, 56, 96, 24, actor.level.to_s, 2)
# Draws Experience
contents.font.color = system_color
contents.draw_text(224, 8, 224, 24, "Experience :")
contents.font.color = normal_color
contents.draw_text(216, 8, 224, 24, actor.exp_s, 2)
# Next Level Experience
contents.font.color = system_color
contents.draw_text(224, 32, 224, 24, "Next Level :")
contents.font.color = normal_color
contents.draw_text(216, 32, 224, 24, actor.next_rest_exp_s, 2)
# Draws Next Level Bar
draw_bar(224, 58, actor.exp, actor.next_exp_s.to_i, 216)
# Draws HP Bar
draw_bar(32, 126, actor.hp, actor.maxhp, 228, 24)
# Draws HP
contents.font.color = system_color
contents.draw_text(40, 126, 224, 24, "HP")
contents.font.color = normal_color
contents.draw_text(32, 126, 224, 24, "#{actor.hp} / #{actor.maxhp}", 2)
# Draws SP Bar
draw_bar(32, 158, actor.sp, actor.maxsp, 228, 24)
# Draws SP
contents.font.color = system_color
contents.draw_text(40, 158, 224, 24, "SP")
contents.font.color = normal_color
contents.draw_text(32, 158, 224, 24, "#{actor.sp} / #{actor.maxsp}", 2)
# Draws Equiped Items
draw_item_name($data_weapons[actor.weapon_id], 36, 190, 224, 2, 0)
draw_item_name($data_armors[actor.armor1_id], 36, 222, 224, 2, 1)
draw_item_name($data_armors[actor.armor2_id], 36, 254, 224, 2, 2)
draw_item_name($data_armors[actor.armor3_id], 36, 286, 224, 2, 3)
draw_item_name($data_armors[actor.armor4_id], 36, 318, 224, 2, 4)
# Draws Stats
stat_names = [$data_system.words.str, $data_system.words.dex, $data_system.words.agi,
$data_system.words.int, $data_system.words.atk, $data_system.words.pdef, $data_system.words.mdef, "Evasion"]
stats = [actor.str, actor.dex, actor.agi, actor.int, actor.atk, actor.pdef, actor.mdef, actor.eva]
for i in 0...stats.size
contents.font.color = system_color
contents.draw_text(278, 108 + i * 32, 170, 24, stat_names[i])
contents.font.color = normal_color
contents.draw_text(270, 108 + i * 32, 170, 24, stats[i].to_s, 2)
end
end
end
#--------------------------------------------------------------------------
# Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
refresh(@actor)
end
#--------------------------------------------------------------------------
# Update Pose
# direction : 0 - Left 1 - Right
#--------------------------------------------------------------------------
def update_pose(direction)
if direction == 0
@pose == 0 ? @pose = 3 : @pose -= 1
else
@pose == 3 ? @pose = 0 : @pose += 1
end
refresh(@actor)
end
end

#==============================================================================
# ** Window_Class_Status
#==============================================================================
class Window_Class_Status < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(160, 64, 480, 416)
# Creates Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Animation Varaibles
@pose, @frame = 0, 0
# Refreshes Contents
refresh($game_party.actors[0], $data_classes[1])
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(actor, current_class)
# Clears Contents
contents.clear
# Requirements Met (For Return)
@requirements_met = true
# Stores Variables for Refreshing
@actor = actor
@current_class = current_class
# Draws Actors Info
contents.font.size = 22
contents.font.color = normal_color
# Draws Name of Actor
contents.draw_text(0, 4, contents.width / 3, 24, actor.name, 1)
# Draws Actor Sprite
draw_sprite(contents.width / 6, 82, actor.character_name, actor.character_hue , @pose, @frame, false)
# Current Class
contents.font.color = system_color
contents.draw_text(contents.width / 3 + 4, 4, contents.width / 3, 24, actor.class_name, 1)
# Current Level
contents.draw_text(contents.width / 3 + 4, 30, contents.width / 3, 24, "Level :")
contents.font.color = normal_color
contents.draw_text(contents.width / 3 - 4, 30, contents.width / 3, 24, actor.level.to_s, 2)
# Current Experience
contents.font.color = system_color
contents.draw_text(contents.width / 3 + 4, 56, contents.width / 3, 24, "Experience :")
contents.font.color = normal_color
contents.draw_text(contents.width / 3 - 4, 56, contents.width / 3, 24, actor.exp_s, 2)
# Checks to Make Sure Current Class isn't Nil
if current_class == nil
contents.font.size = 32
contents.font.color = system_color
contents.draw_text(0, contents.width / 2 - 18, contents.width, 36, "Return to Actors", 1)
else
contents.font.size = 22
contents.font.color = normal_color
# Next Class
contents.font.color = system_color
contents.draw_text(contents.width / 3 * 2 + 4 , 4, contents.width / 3, 26, current_class.name, 1)
# Next Level
contents.draw_text(contents.width / 3 * 2 + 4, 30, contents.width / 3, 26, "Level :")
contents.font.color = normal_color
contents.draw_text(contents.width / 3 * 2 - 4, 30, contents.width / 3, 26, actor.class_levels[current_class.id].to_s, 2)
# Next Experience
contents.font.color = system_color
contents.draw_text(contents.width / 3 * 2 + 4, 56, contents.width / 3, 26, "Experience :")
contents.font.color = normal_color
contents.draw_text(contents.width / 3 * 2 - 4, 56, contents.width / 3, 26, actor.class_exp[current_class.id].to_s, 2)
pos = current_class.position == 0 ? "Front Row" : current_class.position == 1 ? "Middle Row" : "Back Row"
contents.draw_text(0, 96, contents.width, 24, "#{current_class.name}: #{pos}", 1)
contents.font.color = system_color
# Draws Class Requirements
contents.draw_text(0, 120, contents.width, 24, "Requirements", 1)
contents.draw_text(4, 144, contents.width, 24, "Sex Requirement:")
# Sex Requirements
contents.font.color = normal_color
sex_req = current_class.sex_requirements
if sex_req == 0 or sex_req == actor.sex
contents.font.color = normal_color
else
contents.font.color = disabled_color
end
contents.draw_text(32, 168, contents.width, 24, sex_req == 0 ? "None" : sex_req == 1 ? "Male" : "Female")
contents.draw_text(- 8, 168, contents.width, 24, actor.sex == 1 ? "Male" : "Female", 2)
# Checks if Requirements met
@requirements_met = false unless sex_req == 0 or sex_req == actor.sex
# Class Level Requirements
contents.font.color = system_color
contents.draw_text(4, 192, contents.width, 24, "Class Requirement:")
contents.draw_text(32, 216, contents.width, 24, "Class")
contents.draw_text(160, 216, contents.width, 24, "Req. Level")
contents.draw_text(-8, 216, contents.width, 24, "Current Level", 2)
contents.font.color = normal_color
# Class Requirement Arrays
classes, level_reqs, levels = [], [], []
current_class.level_requirements.each_key { |key|
classes.push($data_classes[key].name)
level_reqs.push(current_class.level_requirements[key])
levels.push(actor.class_levels[$data_classes[key].id]) }
for i in 0...classes.size
if levels[i] >= level_reqs[i]
contents.font.color = normal_color
else
contents.font.color = disabled_color
@requirements_met = false
end
contents.draw_text(32, 240 + i * 24, contents.width, 24, classes[i])
contents.draw_text(160, 240 + i * 24, contents.width, 24, level_reqs[i].to_s)
contents.draw_text(-8, 240 + i * 24, contents.width, 24, levels[i].to_s, 2)
end
end
end
#--------------------------------------------------------------------------
# Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
refresh(@actor, @current_class)
end
#--------------------------------------------------------------------------
# Check Requirements
#--------------------------------------------------------------------------
def check
return @requirements_met
end
end

#==============================================================================
# ** Scene Party Changer
#==============================================================================
class Scene_Party_Changer
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Current Phase
@phase = 0
# Frame Update (For Sprite Animations)
@update_frame = 0
# Help Window
@help_window = Window_Help.new
@help_window.set_text("Select Member To Transfer to Reserves", 1)
@help_window.z = 9999
# Active Party Window
@active_actors_window = Window_Party_Changing.new
@active_actors_window.refresh($game_party.actors)
@active_actors_window.y = 64
# Reserve Party Window
@reserver_actors_window = Window_Party_Changing.new
@reserver_actors_window.refresh($game_party.reserve_actors)
@reserver_actors_window.y = 352
@reserver_actors_window.active = false
# Active Party Sprites
@active_actors_sprites = Window_Member_Sprites.new
@active_actors_sprites.refresh($game_party.actors)
@active_actors_sprites.update_cursor_rect(0)
# Reserve Party Sprites
@reserve_actors_sprites = Window_Member_Sprites.new(160, 384, 480)
@reserve_actors_sprites.refresh($game_party.reserve_actors)
@reserve_actors_sprites.update_cursor_rect(0)
# Scene Objects
@objects = [@help_window, @active_actors_window, @reserver_actors_window,
@active_actors_sprites, @reserve_actors_sprites]
Graphics.transition
# Main loop
while $scene == self
# Update game screen
Graphics.update
# Update input information
Input.update
# Objects Update
@objects.each {|x| x.update}
# Animated Sprites Update
@update_frame += 1
if @update_frame == 10
@update_frame = 0
@objects.each {|x| x.frame_update unless x == @help_window}
end
# Updates Poses
if Input.trigger?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@objects.each {|x| x.update_pose(0) unless x == @help_window}
elsif Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@objects.each {|x| x.update_pose(1) unless x == @help_window}
end
# Frame update
@phase == 0 ? active_update : reserve_update
end
# Prepare for transition
Graphics.freeze
# Disposes Objects
@objects.each {|x| x.dispose}
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def active_update
# Slides Windows
@active_actors_window.y += 8 if @active_actors_window.y < 64
@reserver_actors_window.y += 8 if @reserver_actors_window.y < 352
# Updates Cursor Rectangles
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@active_actors_sprites.update_cursor_rect(@active_actors_window.index)
# Exits Scene
elsif Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
# Selects Party Spot to Switch Spot With
elsif Input.trigger?(Input::C)
actor = $game_party.actors[@active_actors_window.index]
if $game_party.reserve_actors.size == 0
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text("No Reserve Actors to Switch With", 1)
else
$game_system.se_play($data_system.decision_se)
@active_actors_window.active = false
@reserver_actors_window.active = true
text = actor == nil ?
"Select Member to Add to Party" : "Select Member to Switch Spots with #{actor.name}"
@help_window.set_text(text, 1)
@phase = 1
end
end
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def reserve_update
# Slides Windows
@active_actors_window.y -= 8 if @active_actors_window.y > -192
@reserver_actors_window.y -= 8 if @reserver_actors_window.y > 96
# Updates Cursor Rectangles
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@reserve_actors_sprites.update_cursor_rect(@reserver_actors_window.index)
# Returns to Main Phase
elsif Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@help_window.set_text("Select Member To Transfer to Reserves", 1)
@active_actors_window.active = true
@reserver_actors_window.active = false
@phase = 0
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
active_member = $game_party.actors[@active_actors_window.index]
reserve_member = $game_party.reserve_actors[@reserver_actors_window.index]
$game_party.move_to_reserve(active_member.id) unless active_member == nil
$game_party.move_to_party(reserve_member.id)
[@active_actors_window, @active_actors_sprites].each {|x| x.refresh($game_party.actors)}
[@reserver_actors_window, @reserve_actors_sprites].each {|x| x.refresh($game_party.reserve_actors)}
@active_actors_window.active = true
@reserver_actors_window.active = false
@phase = 0
end
end
end

#==============================================================================
# ** Scene Class Changer
#==============================================================================
class Scene_Class_Changer
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Updates Actors Class Arrays
for actor in $game_party.actors
actor.update_classes
end
# Frame Update (For Sprite Animations)
@update_frame = 0
# Help Window
@help_window = Window_Help.new
@help_window.set_text("Select Actor to Change Class", 1)
# Actors Window
@actors_window = Window_Class_Changing.new
# Class Window
commands = ["Back"]
for job in $data_classes
commands.push(job.name) unless job == nil
end
@class_window = Window_Command.new(160, commands)
@class_window.y = 64
@class_window.height = 320
@class_window.active = @class_window.visible = false
# Sprites Window
@sprites_window = Window_Member_Sprites.new
@sprites_window.refresh($game_party.actors)
@sprites_window.frame_update
@sprites_window.update_cursor_rect(0)
# Character Window
@character_status_window = Window_Character_Status.new
# Class Window
@class_status_window = Window_Class_Status.new
@class_status_window.visible = false
# Scene Objects
@objects = [@help_window, @actors_window, @class_window, @sprites_window,
@character_status_window, @class_status_window]
Graphics.transition
# Main loop
while $scene == self
# Update game screen
Graphics.update
# Update input information
Input.update
# Objects Update
@objects.each {|x| x.update}
# Animated Sprites Update
@update_frame += 1
if @update_frame == 5
@update_frame = 0
[@actors_window, @sprites_window, @character_status_window, @class_status_window].each {|x| x.frame_update unless x.visible == false}
end
# Frame update
update
end
# Prepare for transition
Graphics.freeze
# Disposes Objects
@objects.each {|x| x.dispose}
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Sets Disabled and Undisabled Items
if @class_window.active
for i in 1...$data_classes.size
if check_class($game_party.actors[@actors_window.index], $data_classes[i])
@class_window.undisable_item(i)
else
@class_window.disable_item(i)
end
end
end
# Updates Actor Cursor Rectangle
@sprites_window.update_cursor_rect(@actors_window.index)
# ~ Input Processing ~
if Input.trigger?(Input::RIGHT)
for actor in $game_party.actors
actor.exp += 100
end
end
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
if @character_status_window.visible
@character_status_window.refresh($game_party.actors[@actors_window.index])
else
@class_status_window.refresh($game_party.actors[@actors_window.index], $data_classes[@class_window.index])
end
elsif Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
if @actors_window.active
$scene = Scene_Map.new
else
@class_window.index = 0
@actors_window.visible = @actors_window.active = true
@class_window.visible = @class_window.active = false
@character_status_window.visible = true
@class_status_window.visible = false
@character_status_window.refresh($game_party.actors[@actors_window.index])
end
elsif Input.trigger?(Input::C)
if @actors_window.active
if $game_party.actors[@actors_window.index] == nil
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@actors_window.visible = @actors_window.active = false
@class_window.visible = @class_window.active = true
@index = @actors_window.index
@class_status_window.refresh($game_party.actors[@index], $data_classes[@class_window.index])
@character_status_window.visible = false
@class_status_window.visible = true
@help_window.set_text("Select Class to Change #{$game_party.actors[@index].name} To", 1)
end
else
if @class_window.index == 0
$game_system.se_play($data_system.decision_se)
@actors_window.visible = @actors_window.active = true
@class_window.visible = @class_window.active = false
@character_status_window.refresh($game_party.actors[@actors_window.index])
@character_status_window.visible = true
@class_status_window.visible = false
@help_window.set_text("Select Actor to Change Class", 1)
else
if @class_status_window.check
$game_system.se_play($data_system.decision_se)
class_ = $data_classes[@class_window.index]
$game_party.actors[@index].switch_class(class_.id)
@help_window.set_text("#{$game_party.actors[@index].name} Changed to a #{class_.name}", 1)
else
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text("Class Requirements Not Met", 1)
end
end
end
end
end
#--------------------------------------------------------------------------
# * Check Class
#--------------------------------------------------------------------------
def check_class(actor, job)
requirements_met = true
sex_req = job.sex_requirements
requirements_met = false unless sex_req == 0 or sex_req == actor.sex
classes, level_reqs, levels = [], [], []
job.level_requirements.each_key { |key|
classes.push($data_classes[key].name)
level_reqs.push(job.level_requirements[key])
levels.push(actor.class_levels[$data_classes[key].id]) }
for i in 0...classes.size
unless levels[i] >= level_reqs[i]
requirements_met = false
end
end
return requirements_met
end
end


das erste ist ein Questlog
und das zweite der class und job changer.
würde diese Skripts gerne in mein Spiel einbinden
doch wenn ich den Questlog (wie in der Beschreibung des Skript)
mit F5 starten will kommt ein fehler in der Zeile 114
habe schon bemerkt das man etwas bei scene map reinsetzen muss
hatt aber nichts mit dem fehler zu tun da ist ein fehler bei game systems ist
(das was in * steht gehört nich dazu

und beim class und party changer
kommt wenn ich den class changer
$scene = Scene_Class_Changer.new

oda denn party changer
$scene = Scene_Party_Changer.new

hiermit aufrufen will kommt ebenfalls ein Fehler.

bitte um hilfe,
andro.


Nach oben
 Profil  
Mit Zitat antworten  

 Betreff des Beitrags: Re: Quests und class changer
BeitragVerfasst: So Jul 03, 2011 15:08 
hi,

Erstens: Es gibt ein tag für Skripts, damit diese lesbar bleiben.
Ich weigere mich das so durchzugucken.

Und Was willst du eigentlich mit dem Skript-Explorer?
Um Skripte einzufügen musst du die im Skript-Editor direkt über die Main-Seite packen.


Nach oben
  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 

Alle Zeiten sind UTC + 1 Stunde


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de