Char selector
Brasil G4mes :: Scripts :: Scripts RGSS1
Página 1 de 1
Char selector
SCRIPT:
Portugal_Anime - Por ter postado o Pack de Scripts online
- Spoiler:
- Código:
#==============================================================================
# Window Vlad_CharacterSelection
#==============================================================================
# para chamar o cript use: $scene = Scene_VladCharSelect.new
# é OBRIGATÓRIO que você configure para o jogo começar com o personagerm 1 do database
Classes = 5 # número de classes disponíveis (máximo 5)
Char01_char = "001-Fighter01" # gráfico da classe 1
Char01_id = 3 # ID do personagem 1 no database
Char_class_name01 = "guerreiro" # nome da classe 1
Char02_char = "002-Fighter02" # gráfico da classe 2
Char02_id = 4 # ID do personagem 2 no database
Char_class_name02 = "wizard" # nome da classe 2
Char03_char = "003-Fighter03" # gráfico da classe 3
Char03_id = 4 # ID do personagem 3 no database
Char_class_name03 = "paladino" # nome da classe 3
Char04_char = "004-Fighter04" # gráfico da classe 4
Char04_id = 5 # ID do personagem 4 no database
Char_class_name04 = "vampiro" # nome da classe 4
Char05_char = "005-Fighter05" # gráfico da classe 5
Char05_id = 6 # ID do personagem 5 no database
Char_class_name05 = "elfo" # nome da classe 5
#==============================================================================
class Window_VladCharSelect1 < Window_Base
def initialize
super(176, 208, 64, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
bitmap = RPG::Cache.character(char01_char, 0)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(0, 6, bitmap, src_rect)
if mouse_over?(self) and Input.pressed?(Input::Mouse_Left) == true
$game_system.se_play($data_system.decision_se)
start_class01
end
end
def mouse_over?(window)
if $mouse.x > window.x and $mouse.x < window.x + window.width and
$mouse.y > window.y and $mouse.y < window.y + window.height
return true
end
return false
end
def char01_char
return Char01_char
end
def start_class01
$game_party.add_actor(Char01_id)
$game_party.remove_actor(1)
$scene = Scene_Map.new
end
def Char01_id
return Char01_id
end
end
#------------------------------------------------------------------------------
class Window_VladCharName1 < Window_Base
def initialize
super(160, 160, 96, 48)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
self.contents.draw_text(0,-6,72,24,Char_class_name01)
end
def Char_class_name01
return Char_class_name01
end
end
#==============================================================================
class Window_VladCharSelect2 < Window_Base
def initialize
super(400, 208, 64, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
bitmap = RPG::Cache.character(char02_char, 0)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(0, 6, bitmap, src_rect)
if mouse_over?(self) and Input.pressed?(Input::Mouse_Left) == true
$game_system.se_play($data_system.decision_se)
start_class02
end
end
def mouse_over?(window)
if $mouse.x > window.x and $mouse.x < window.x + window.width and
$mouse.y > window.y and $mouse.y < window.y + window.height
return true
end
return false
end
def char02_char
return Char02_char
end
def start_class02
$game_party.add_actor(Char02_id)
$game_party.remove_actor(1)
$scene = Scene_Map.new
end
def Char02_id
return Char02_id
end
end
#------------------------------------------------------------------------------
class Window_VladCharName2 < Window_Base
def initialize
super(384, 160, 96, 48)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
self.contents.draw_text(0,-6,72,24,Char_class_name02)
end
def Char_class_name02
return Char_class_name02
end
end
#==============================================================================
class Window_VladCharSelect3 < Window_Base
def initialize
super(288, 208, 64, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
bitmap = RPG::Cache.character(char03_char, 0)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(0, 6, bitmap, src_rect)
if mouse_over?(self) and Input.pressed?(Input::Mouse_Left) == true
$game_system.se_play($data_system.decision_se)
start_class03
end
end
def mouse_over?(window)
if $mouse.x > window.x and $mouse.x < window.x + window.width and
$mouse.y > window.y and $mouse.y < window.y + window.height
return true
end
return false
end
def char03_char
return Char03_char
end
def start_class03
$game_party.add_actor(Char03_id)
$game_party.remove_actor(1)
$scene = Scene_Map.new
end
def Char03_id
return Char03_id
end
end
#------------------------------------------------------------------------------
class Window_VladCharName3 < Window_Base
def initialize
super(272, 160, 96, 48)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
self.contents.draw_text(0,-6,72,24,Char_class_name03)
end
def Char_class_name03
return Char_class_name03
end
end
#==============================================================================
class Window_VladCharSelect4 < Window_Base
def initialize
super(288, 48, 64, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
bitmap = RPG::Cache.character(char04_char, 0)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(0, 6, bitmap, src_rect)
if mouse_over?(self) and Input.pressed?(Input::Mouse_Left) == true
$game_system.se_play($data_system.decision_se)
start_class04
end
end
def mouse_over?(window)
if $mouse.x > window.x and $mouse.x < window.x + window.width and
$mouse.y > window.y and $mouse.y < window.y + window.height
return true
end
return false
end
def char04_char
return Char04_char
end
def start_class04
$game_party.add_actor(Char04_id)
$game_party.remove_actor(1)
$scene = Scene_Map.new
end
def Char04_id
return Char04_id
end
end
#------------------------------------------------------------------------------
class Window_VladCharName4 < Window_Base
def initialize
super(272, 0, 96, 48)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
self.contents.draw_text(0,-6,72,24,Char_class_name04)
end
def Char_class_name04
return Char_class_name04
end
end
#==============================================================================
class Window_VladCharSelect5 < Window_Base
def initialize
super(288, 368, 64, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
bitmap = RPG::Cache.character(char05_char, 0)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(0, 6, bitmap, src_rect)
if mouse_over?(self) and Input.pressed?(Input::Mouse_Left) == true
$game_system.se_play($data_system.decision_se)
start_class05
end
end
def mouse_over?(window)
if $mouse.x > window.x and $mouse.x < window.x + window.width and
$mouse.y > window.y and $mouse.y < window.y + window.height
return true
end
return false
end
def char05_char
return Char05_char
end
def start_class05
$game_party.add_actor(Char05_id)
$game_party.remove_actor(1)
$scene = Scene_Map.new
end
def Char05_id
return Char05_id
end
end
#------------------------------------------------------------------------------
class Window_VladCharName5 < Window_Base
def initialize
super(272, 320, 96, 48)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 255
update
end
def update
self.contents.clear
self.contents.draw_text(0,-6,72,24,Char_class_name05)
end
def Char_class_name05
return Char_class_name05
end
end
#==============================================================================
class Scene_VladCharSelect
def main
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
if Classes == 1
@Window_VladCharSelect1 = Window_VladCharSelect1.new
@Window_VladCharName1 = Window_VladCharName1.new
elsif Classes == 2
@Window_VladCharSelect1 = Window_VladCharSelect1.new
@Window_VladCharSelect2 = Window_VladCharSelect2.new
@Window_VladCharName1 = Window_VladCharName1.new
@Window_VladCharName2 = Window_VladCharName2.new
elsif Classes == 3
@Window_VladCharSelect1 = Window_VladCharSelect1.new
@Window_VladCharSelect2 = Window_VladCharSelect2.new
@Window_VladCharSelect3 = Window_VladCharSelect3.new
@Window_VladCharName1 = Window_VladCharName1.new
@Window_VladCharName2 = Window_VladCharName2.new
@Window_VladCharName3 = Window_VladCharName3.new
elsif Classes == 4
@Window_VladCharSelect1 = Window_VladCharSelect1.new
@Window_VladCharSelect2 = Window_VladCharSelect2.new
@Window_VladCharSelect3 = Window_VladCharSelect3.new
@Window_VladCharSelect4 = Window_VladCharSelect4.new
@Window_VladCharName1 = Window_VladCharName1.new
@Window_VladCharName2 = Window_VladCharName2.new
@Window_VladCharName3 = Window_VladCharName3.new
@Window_VladCharName4 = Window_VladCharName4.new
elsif Classes == 5
@Window_VladCharSelect1 = Window_VladCharSelect1.new
@Window_VladCharSelect2 = Window_VladCharSelect2.new
@Window_VladCharSelect3 = Window_VladCharSelect3.new
@Window_VladCharSelect4 = Window_VladCharSelect4.new
@Window_VladCharSelect5 = Window_VladCharSelect5.new
@Window_VladCharName1 = Window_VladCharName1.new
@Window_VladCharName2 = Window_VladCharName2.new
@Window_VladCharName3 = Window_VladCharName3.new
@Window_VladCharName4 = Window_VladCharName4.new
@Window_VladCharName5 = Window_VladCharName5.new
end
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@sprite.dispose
if Classes == 1
@Window_VladCharSelect1.dispose
@Window_VladCharName1.dispose
elsif Classes == 2
@Window_VladCharSelect1.dispose
@Window_VladCharSelect2.dispose
@Window_VladCharName1.dispose
@Window_VladCharName2.dispose
elsif Classes == 3
@Window_VladCharSelect1.dispose
@Window_VladCharSelect2.dispose
@Window_VladCharSelect3.dispose
@Window_VladCharName1.dispose
@Window_VladCharName2.dispose
@Window_VladCharName3.dispose
elsif Classes == 4
@Window_VladCharSelect1.dispose
@Window_VladCharSelect2.dispose
@Window_VladCharSelect3.dispose
@Window_VladCharSelect4.dispose
@Window_VladCharName1.dispose
@Window_VladCharName2.dispose
@Window_VladCharName3.dispose
@Window_VladCharName4.dispose
elsif Classes == 5
@Window_VladCharSelect1.dispose
@Window_VladCharSelect2.dispose
@Window_VladCharSelect3.dispose
@Window_VladCharSelect4.dispose
@Window_VladCharSelect5.dispose
@Window_VladCharName1.dispose
@Window_VladCharName2.dispose
@Window_VladCharName3.dispose
@Window_VladCharName4.dispose
@Window_VladCharName5.dispose
end
end
def update
$mouse.update
if Classes == 1
@Window_VladCharSelect1.update
@Window_VladCharName1.update
elsif Classes == 2
@Window_VladCharSelect1.update
@Window_VladCharSelect2.update
@Window_VladCharName1.update
@Window_VladCharName2.update
elsif Classes == 3
@Window_VladCharSelect1.update
@Window_VladCharSelect2.update
@Window_VladCharSelect3.update
@Window_VladCharName1.update
@Window_VladCharName2.update
@Window_VladCharName3.update
elsif Classes == 4
@Window_VladCharSelect1.update
@Window_VladCharSelect2.update
@Window_VladCharSelect3.update
@Window_VladCharSelect4.update
@Window_VladCharName1.update
@Window_VladCharName2.update
@Window_VladCharName3.update
@Window_VladCharName4.update
elsif Classes == 5
@Window_VladCharSelect1.update
@Window_VladCharSelect2.update
@Window_VladCharSelect3.update
@Window_VladCharSelect5.update
@Window_VladCharName1.update
@Window_VladCharName2.update
@Window_VladCharName3.update
@Window_VladCharName4.update
@Window_VladCharName5.update
end
end
def Classes
return Classes
end
end
Portugal_Anime - Por ter postado o Pack de Scripts online
Brasil G4mes :: Scripts :: Scripts RGSS1
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos