|

28-08-2008, 23:56
|
 |
Voltando Sprites para RO.
|
|
Data de Entrada: Mar 2008
Posts: 1,448
Reputação: 137
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Bem... Pode postar três fotos?
1- Do "primeiro" Script, separado.
2- Do "segundo" Script, separado.
3- Dos dois juntos, do jeito que colocou.
Se puder, agradeço.
|

29-08-2008, 09:16
|
|
Novato
|
|
Data de Entrada: Jul 2008
Posts: 20
Reputação: 10
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Ai estão as fotos...
Estão em ordem:
Menu1: Menu Do Landarma
Menu2: Menu do lb_guilherme
Menu3 e Menu3-2: A caca que eu fiz
Obg *--*
|

29-08-2008, 18:14
|
 |
Voltando Sprites para RO.
|
|
Data de Entrada: Mar 2008
Posts: 1,448
Reputação: 137
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Tente usar isto:
Código:
#============================================================================
# Menu Customizado Landarma
# Primeira revisão
#
# Simples modificação por Angel Ivy-chan.
#
#============================================================================
module MenuCommand
# Comandos Padrão
Item = 'Item'
Skill = 'Habilidades'
Equip = 'Equipamento'
Status = 'Status'
Save = 'Salvar'
Load = 'Carregar'
End_Game = 'Sair'
# Comandos Opcionais
Order = 'Ordem'
Party = 'Grupo'
Option = 'Opções'
Quest = 'Aventuras'
System = 'Sistema'
#Outros:
Exibir_Char = true
Exibir_Classe = true
Exibir_Exp = true
Exibir_Status = true
Exibir_Map = true
Exibir_Status_Pos = 2
# 0 = Posição da exp
# 1 = Posição da classe
# 2 = Canto da imagem de face
end
#------------------------------------------------------------------------------
# Game_Map
#------------------------------------------------------------------------------
class Game_Map
#------------------------------------------------------------------------------
# Name
#------------------------------------------------------------------------------
def name
$map_infos[@map_id]
end
end
#
# Beta>
#
class Window_Base < Window
def draw_actor_exp(actor, x, y, t)
s1 = actor.exp_s
s2 = actor.next_rest_exp_s + s1
text = s1.to_s + "/" + s2.to_s
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, WLH, "E")
self.contents.font.color = normal_color
self.contents.draw_text(x + 0, y, t, WLH, text, 2)
end
end
class Window_MenuStatus < Window_Selectable
def initialize(x, y)
super(x, y, 384, 416)
refresh
self.active = false
self.index = -1
end
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 80
y = actor.index * 96
draw_actor_name(actor, x, y)
draw_actor_level(actor, x + 10, y + WLH * 1)
if MenuCommand::Exibir_Status == true
if MenuCommand::Exibir_Status_Pos == 0
draw_actor_state(actor, x, y + WLH * 2)
elsif MenuCommand::Exibir_Status_Pos == 1
draw_actor_state(actor, x + 100, y)
elsif MenuCommand::Exibir_Status_Pos == 2
draw_actor_state(actor, 0, y + 53)
end
end
if MenuCommand::Exibir_Exp == true
draw_actor_exp(actor, x + 10, y + WLH * 2, 70)
end
if MenuCommand::Exibir_Classe == true
draw_actor_class(actor, x + 100, y)
end
if MenuCommand::Exibir_Char == true
draw_actor_graphic(actor, x + 245, y + 68)
draw_actor_hp(actor, x + 100, y + WLH * 1)
draw_actor_mp(actor, x + 100, y + WLH * 2)
else
draw_actor_hp(actor, x + 100, y + WLH * 1, 170)
draw_actor_mp(actor, x + 100, y + WLH * 2, 170)
end
end
end
end
#-------------------------------------------------------------------------------
# Janela de Passos:
#-------------------------------------------------------------------------------
class Window_Steps < Window_Base
def initialize
super(0, 176, 160, 90)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Passos")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
end
end
#==============================================================================
# Scene_Title
#==============================================================================
class Scene_Title
$map_infos = load_data("Data/MapInfos.rvdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end
class Window_MapName < Window_Base
def initialize(x, y)
super(x, y, 160, 96)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Local")
self.contents.font.color = normal_color
self.contents.draw_text(4, WLH, 120, 32, $game_map.name.to_s, 2)
end
end
#==============================================================================
# Scene_Menu
#==============================================================================
class Scene_Menu < Scene_Base
def initialize(menu_index = 0)
@menu_index = menu_index
commands_init
@changer = 0 # Mudar ordem do grupo por Yargovish
@where = 0
@checker = 0
end
def commands_init
@commands = []
s1 = MenuCommand::Item
s2 = MenuCommand::Skill
s3 = MenuCommand::Equip
s4 = MenuCommand::Status
s5 = MenuCommand::Order
s6 = MenuCommand::System
@commands.push(s1, s2, s3, s4, s5, s6).flatten!
@sys_commands = []
o1 = MenuCommand::Option
o2 = MenuCommand::Save
o3 = MenuCommand::Load
o4 = MenuCommand::End_Game
@sys_commands.push(o1, o2, o3, o4).flatten!
end
def start
super
create_menu_background
create_command_window
create_system_window
@gold_window = Window_Gold.new(0, 264)
@status_window = Window_MenuStatus.new(160, 0)
@mapname_window = Window_MapName.new(0, 320)
@steps_window = Window_Steps.new
end
def terminate
super
dispose_menu_background
@command_window.dispose
@sys_command_window.dispose
@gold_window.dispose
@status_window.dispose
@mapname_window.dispose
@steps_window.dispose
end
def update
super
update_menu_background
@command_window.update
@sys_command_window.update
@gold_window.update
@status_window.update
@mapname_window.update
@steps_window.update
if @command_window.active
update_command_selection
elsif @sys_command_window.active
@sys_command_window.z = +500
update_sys_command_selection
elsif @status_window.active
update_actor_selection
end
end
def create_command_window
@command_window = Window_Command.new(160, @commands)
@command_window.index = @menu_index
if $game_party.members.size == 0
@command_window.draw_item(0, false)
@command_window.draw_item(1, false)
@command_window.draw_item(2, false)
@command_window.draw_item(3, false)
end
if $game_party.members.size <= 1
@command_window.draw_item(4, false)
end
end
def create_system_window
@sys_command_window = Window_Command.new(128, @sys_commands)
@sys_command_window.visible = false
@sys_command_window.active = false
@sys_command_window.x = 100
@sys_command_window.y = 130
@sys_command_window.z = 0
check_save_available
check_load_available
end
def check_save_available
if $game_system.save_disabled
@sys_command_window.draw_item(1, false)
end
end
def check_load_available
@load_enabled = (Dir.glob('Save*.rvdata').size > 0)
if !@load_enabled
@sys_command_window.draw_item(2, false)
end
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if disabled_main_command?
Sound.play_buzzer
return
end
main_command_input
end
end
def update_sys_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@command_window.active = true
@sys_command_window.active = false
@sys_command_window.visible = false
@sys_command_window.index = 0
@sys_command_window.z = -500
return
elsif Input.trigger?(Input::C)
if disabled_main_command?
Sound.play_buzzer
return
end
sys_command_input
end
end
def disabled_main_command?
command = @commands[@command_window.index]
sys_command = @sys_commands[@sys_command_window.index]
c = MenuCommand
if $game_party.members.size == 0
if [c::Item, c::Skill, c::Equip, c::Status].include?(command)
return true
end
elsif $game_party.members.size <= 1
if [c::Order].include?(command)
return true
end
end
return true if $game_system.save_disabled and sys_command == c::Save
return true if !@load_enabled && sys_command == c::Load
return false
end
def main_command_input
command = @commands[@command_window.index]
Sound.play_decision
case command
when MenuCommand::Item
command_item
when MenuCommand::Skill, MenuCommand::Equip, MenuCommand::Status
start_actor_selection
when MenuCommand::Order
command_order
when MenuCommand::System
@sys_command_window.active = true
@sys_command_window.visible = true
@command_window.active = false
end
end
def sys_command_input
sys_command = @sys_commands[@sys_command_window.index]
Sound.play_decision
case sys_command
when MenuCommand::Option
command_option
when MenuCommand::Save
command_save
when MenuCommand::Load
command_load
when MenuCommand::End_Game
command_endgame
end
end
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
def update_actor_selection
command = @commands[@command_window.index]
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case command
when MenuCommand::Skill
command_skill
when MenuCommand::Equip
command_equip
when MenuCommand::Status
command_status
end
end
end
def command_item
$scene = Scene_Item.new
end
def command_skill
$scene = Scene_Skill.new(@status_window.index)
end
def command_equip
$scene = Scene_Equip.new(@status_window.index)
end
def command_status
$scene = Scene_Status.new(@status_window.index)
end
def command_order
if @command_window.active
start_actor_selection
@checker = 0
return
end
if @checker == 0
@changer = $game_party.members[@status_window.index]
@where = @status_window.index
@checker = 1
else
$game_party.members[@where] = $game_party.members[@status_window.index]
$game_party.members[@status_window.index] = @changer
@checker = 0
@status_window.refresh
$game_player.refresh
end
end
def command_party
# Muda para a tela de troca de grupo
# Insira sua Scene correspondente aqui
end
def command_option
# Muda para a tela de opções
# Insira sua Scene correspondente aqui
end
def command_quest
# Muda para a tela de aventuras (quests)
# Insira sua Scene correspondente aqui
end
def command_save
# Muda para a tela de salvar
$scene = Scene_File.new(true, false, false)
end
def command_load
# Muda para a tela de carregar
$scene = Scene_File.new(false, false, false)
end
def command_endgame
# Muda para a tela de fim de jogo
$scene = Scene_End.new
end
end
|

29-08-2008, 18:23
|
 |
The Clow Mage
|
|
Data de Entrada: Aug 2008
Posts: 305
Reputação: 14
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
oi
eu tive alguns probelmas com o script AI-Chan new Menu
queria apenas saber se ele é incompativel com outros scripts
tipo o de batalha lateral e o menu oval de batalha
pq quando coloco junto com esse ele da erro
é incompativel ou eu estou fazendo algo errado?
ah e tbm quando copio pro meu projeto não apare o background
fika transparente ao invés de aparecer a imagem
|

29-08-2008, 18:34
|
 |
Voltando Sprites para RO.
|
|
Data de Entrada: Mar 2008
Posts: 1,448
Reputação: 137
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Copie a Scene_Base do Script.
Esta aqui:
Código:
#==============================================================================
# Scene_Base
#------------------------------------------------------------------------------
# Classe superior à todas as classes Scene_.
#==============================================================================
class Scene_Base
#--------------------------------------------------------------------------
# Processo principal
#--------------------------------------------------------------------------
def main
start # Inicia o processo
perform_transition # Executa a transição
post_start # Processo pós-inicialização
Input.update # Atualiza as informações inseridas
loop do
Graphics.update # Atualiza os gráficos
Input.update # Atualiza as informações inseridas
update # Atualização
break if $scene != self # Descontinuação do loop
end
Graphics.update
pre_terminate # Preparação para finalização
Graphics.freeze # Congelamento dos gráficos
terminate # Fim
end
#--------------------------------------------------------------------------
# Inicialização do processo
#--------------------------------------------------------------------------
def start
end
#--------------------------------------------------------------------------
# Execução da transição
#--------------------------------------------------------------------------
def perform_transition
Graphics.transition(10)
end
#--------------------------------------------------------------------------
# Processo pós-inicialização
#--------------------------------------------------------------------------
def post_start
end
#--------------------------------------------------------------------------
# Atualização da tela
#--------------------------------------------------------------------------
def update
end
#--------------------------------------------------------------------------
# Preparação para finalização
#--------------------------------------------------------------------------
def pre_terminate
end
#--------------------------------------------------------------------------
# Fim do processo
#--------------------------------------------------------------------------
def terminate
end
#--------------------------------------------------------------------------
# Preparação do background para uma tela diferente
#--------------------------------------------------------------------------
def snapshot_for_background
$game_temp.background_bitmap.dispose
$game_temp.background_bitmap = Graphics.snap_to_bitmap
$game_temp.background_bitmap.blur
end
#--------------------------------------------------------------------------
# Criação do background do menu
#--------------------------------------------------------------------------
def create_menu_background
@menuback_sprite = Plane.new
@menuback_sprite.bitmap = Cache.menu("Background") #$game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 0)
update_menu_background
end
#--------------------------------------------------------------------------
# Dispose do background do menu
#--------------------------------------------------------------------------
def dispose_menu_background
@menuback_sprite.dispose
end
#--------------------------------------------------------------------------
# Atualização do background do menu
#--------------------------------------------------------------------------
def update_menu_background
@menuback_sprite.ox += 1
end
end
|

29-08-2008, 18:50
|
 |
The Clow Mage
|
|
Data de Entrada: Aug 2008
Posts: 305
Reputação: 14
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Valew angel Ivy
era isso mesmo o meu problema
|

29-08-2008, 20:42
|
 |
Your Soul is Mine
|
|
Data de Entrada: May 2008
Posts: 579
Reputação: 40
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Eu nao sei bem como explicar, mais teria jeito de você adaptar o Ring Menu com o Ant lag...
Ta aqui os dois Scripts.
Ant Lag
Código:
module GameBaker
AntiLagDisable = 0
AntiLagModifierX = 408
AntiLagModifierWidth = 272
AntiLagModifierY = 272
AntiLagModifierHeight = 408
AntiLagAlwaysMove = '&'
end
class Game_CommonEvent
alias gamebaker_antilag_commonrefresh refresh
def refresh
gamebaker_antilag_commonrefresh
gamebaker_antilag_add if @interpreter
gamebaker_antilag_remove if !@interpreter
end
def gamebaker_antilag_remove
return if !$game_map.gb_antilagcommons.include?(@common_event_id)
$game_map.gb_antilagcommons -= [@common_event_id]
end
def gamebaker_antilag_add
return if $game_map.gb_antilagcommons.include?(@common_event_id)
$game_map.gb_antilagcommons += [@common_event_id]
end
end
class Game_Event
def force_move_route(move_route)
super(move_route)
if $game_map.gb_antilagnonmove.include?(@id)
$game_map.gb_antilagnonmove -= [@id]
$game_map.gb_antilagmoveevents += [@id]
end
end
alias gamebaker_antilag_init initialize
def initialize(map_id, event)
gamebaker_antilag_init(map_id, event)
if event.name.include?(GameBaker::AntiLagAlwaysMove)
$game_map.gb_antilagmove += [@id]
end
end
alias gamebaker_antilag_evsetup setup
def setup(new_page)
gamebaker_antilag_evsetup(new_page)
if @trigger == 3 or @trigger == 4
start if @trigger == 3
if !$game_map.gb_antilagprocess.include?(@id)
$game_map.gb_antilagprocess += [@id]
end
elsif $game_map.gb_antilagprocess.include?(@id)
$game_map.gb_antilagprocess -= [@id]
end
if @character_name == "" && @tile_id == 0
if !$game_map.gb_antilagnosprite.include?(@id)
$game_map.gb_antilagnosprite += [@id]
end
elsif $game_map.gb_antilagnosprite.include?(@id)
$game_map.gb_antilagnosprite -= [@id]
end
if @move_type == 0 && !@step_anime &&
!$game_map.gb_antilagnonmove.include?(@id)
$game_map.gb_antilagnonmove += [@id]
elsif $game_map.gb_antilagnonmove.include?(@id)
$game_map.gb_antilagnonmove -= [@id]
end
end
def gamebaker_antilag_interupdate
if @interpreter != nil
unless @interpreter.running?
@interpreter.setup(@list, @event.id)
end
@interpreter.update
end
end
def update
super
end
end
class Game_Map
attr_accessor :gb_antilagcommons, :gb_antilagnonmove, :gb_antilagnosprite,
:gb_antilagmoveevents, :gb_antilagmove, :gb_antilagprocess,
:gb_antilagspriteevents, :gb_antilag_spriteupdate
def gamebaker_antilag?(sg)
return false if sg.real_x < @gb_antilagscreen_x or
sg.real_x > @gb_antilagscreen_width or
sg.real_y < @gb_antilagscreen_y or
sg.real_y > @gb_antilagscreen_height
return true
end
alias gamebaker_antilag_setupev setup_events
def setup_events
gamebaker_antilag_getscreen
@gb_antilagnonmove = []
@gb_antilagmove = []
@gb_antilagnosprite = []
@gb_antilagprocess = []
@gb_antilagcommons = [] if !@gb_antilagcommons
gamebaker_antilag_setupev
gamebaker_antilag_refresh_events
end
def gamebaker_antilag_getscreen
@gb_antilagscreen_x = @display_x - GameBaker::AntiLagModifierX
@gb_antilagscreen_y = @display_y - GameBaker::AntiLagModifierY
@gb_antilagscreen_width =
@display_x + (Graphics.width * 8) + GameBaker::AntiLagModifierWidth
@gb_antilagscreen_height =
@display_y + (Graphics.height * 8) + GameBaker::AntiLagModifierHeight
end
def gamebaker_antilag_refresh_events
@gb_antilagalwaysmove = []
@gb_antilagmoveevents = []
@gb_antilagspriteevents = []
for i in @events.values
next if @gb_antilagnosprite.include?(i)
@gb_antilagspriteevents += [i]
end
@gb_antilagspriteevents += [$game_player]
for vehicle in $game_map.vehicles
next if vehicle.map_id != @map_id
@gb_antilagspriteevents += [vehicle]
end
for i in 0...@gb_antilagmove.size
@gb_antilagalwaysmove += [@events[@gb_antilagmove[i]].id]
end
for i in @events.values
next if @gb_antilagnonmove.include?(i.id)
next if @gb_antilagmove.include?(i.id)
@gb_antilagmoveevents += [i.id]
end
@gb_antilag_spriteupdate = true
end
alias gamebaker_antilag_ue update_events
def update_events
return gamebaker_antilag_ue if $game_switches[GameBaker::AntiLagDisable]
gamebaker_antilag_getscreen
for i in 0...@gb_antilagprocess.size
@events[@gb_antilagprocess[i]].gamebaker_antilag_interupdate
end
for i in 0...@gb_antilagalwaysmove.size
@events[@gb_antilagalwaysmove[i]].update
end
for i in 0...@gb_antilagmoveevents.size
j = @gb_antilagmoveevents[i]
@events[j].update if gamebaker_antilag?(@events[j])
end
for i in 0...@gb_antilagcommons.size
@common_events[@gb_antilagcommons[i]].update
end
end
alias gamebaker_antilag_maprefresh refresh
def refresh
gamebaker_antilag_maprefresh
gamebaker_antilag_refresh_events
end
end
class Game_Vehicle; attr_accessor :map_id; end
class Spriteset_Map
def gamebaker_antilag_characters
@gb_antilag_eventsprites = []
for sprite in @character_sprites
next if !$game_map.gb_antilagspriteevents.include?(sprite.character)
@gb_antilag_eventsprites += [sprite]
end
$game_map.gb_antilag_spriteupdate = nil
end
alias gamebaker_antilag_uc update_characters
def update_characters
return gamebaker_antilag_uc if $game_switches[GameBaker::AntiLagDisable]
gamebaker_antilag_characters if $game_map.gb_antilag_spriteupdate
for sprite in @gb_antilag_eventsprites
sprite.update if $game_map.gamebaker_antilag?(sprite.character)
end
end
end
Ring Menu
Código:
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# Inicializa
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# Inicia os objetos do menu
#--------------------------------------------------------------------------
def start
super
@spriteset = Spriteset_Map.new
@gold_window = Window_Gold.new(0, 360)
@win_local = Window_Local.new(0,0)
@status_window = Window_MenuStatus.new(160, 0)
px = $game_player.screen_x - 16
py = $game_player.screen_y - 28
@ring_menu = Window_RingMenu_Comando.new(px,py)
@status_window.z = @ring_menu.z + 20
@status_window.visible = false
end
#--------------------------------------------------------------------------
# Fexa os objetos do menu
#--------------------------------------------------------------------------
def terminate
super
@spriteset.dispose
@ring_menu.dispose
@gold_window.dispose
@win_local.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# Atualiza os objetos do menu
#--------------------------------------------------------------------------
def update
super
@ring_menu.update
@gold_window.update
@win_local.update
@spriteset.update
@status_window.update
if @ring_menu.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# Atualiza o comando e a seleção do menu
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @ring_menu.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @ring_menu.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @ring_menu.indice
when 0
$scene = Scene_Item.new
when 1,2,3
start_actor_selection
when 4
$scene = Scene_File.new(true, false, false)
when 5
$scene = Scene_End.new
end
end
if Input.trigger?(Input::UP) or Input.trigger?(Input::LEFT)
Sound.play_cursor
@ring_menu.girar(3)
return
end
if Input.trigger?(Input::DOWN) or Input.trigger?(Input::RIGHT)
Sound.play_cursor
@ring_menu.girar(4)
return
end
end
#--------------------------------------------------------------------------
# Inicia a seleção de personagem
#--------------------------------------------------------------------------
def start_actor_selection
@ring_menu.active = false
@status_window.visible = true
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# Finaliza a seleção de personagens
#--------------------------------------------------------------------------
def end_actor_selection
@ring_menu.active = true
@status_window.active = false
@status_window.visible = false
@status_window.index = -1
end
#--------------------------------------------------------------------------
# Atualiza a seleção de personagens
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @ring_menu.indice
when 1
$scene = Scene_Skill.new(@status_window.index)
when 2
$scene = Scene_Equip.new(@status_window.index)
when 3
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
#==============================================================================
# Window_RingMenu_Comando
#------------------------------------------------------------------------------
# Esta classe cria o ring menu.
#==============================================================================
class Window_RingMenu_Comando < Window_Base
DurIni = 30
DurMov = 15
RaioAnel = 64
ModoIni = 1
ModoEsp = 2
ModoMD = 3
ModoME = 4
SE_Inicio = ""
attr_accessor :indice
#--------------------------------------------------------------------------
# Inicia o objeto
#--------------------------------------------------------------------------
def initialize(centro_x,centro_y)
super(0, 0, 544, 416)
self.opacity = 0
self.contents.font.size = 16
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@item_name = [s1,s2,s3,s4,s5,s6]
@item_max = 6
@item_icon = [144,128,40,137,149,112]
@item_hab = [true,true,true,true,true,true]
@indice = 0
@cx = centro_x - 12
@cy = centro_y - 12
inicia_menu
refresh
end
#--------------------------------------------------------------------------
# Atualiza o objeto
#--------------------------------------------------------------------------
def update
super
refresh
end
#--------------------------------------------------------------------------
# Atualiza o objeto
#--------------------------------------------------------------------------
def refresh
self.contents.clear
case @modo
when ModoIni
refresh_inicio
when ModoEsp
refresh_espera
when ModoMD
refresh_mover(1)
when ModoME
refresh_mover(0)
end
sw = self.contents.width
rect = Rect.new((@cx - ((sw-32)/2))+12, @cy - 40, sw-32, 32)
self.contents.draw_text(rect, @item_name[@indice],1)
end
#--------------------------------------------------------------------------
# Abre o menu
#--------------------------------------------------------------------------
def refresh_inicio
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / DurIni
r = RaioAnel - 1.0 * RaioAnel * @passos / DurIni
for i in 0...@item_max
j = i - @indice
d = d1 * j + d2 * @passos
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r * Math.cos( d ) ).to_i
desenha_item(x, y, i)
end
@passos -= 1
if @passos < 1
@modo = ModoEsp
end
end
#--------------------------------------------------------------------------
# Atualiza o menu
#--------------------------------------------------------------------------
def refresh_espera
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @indice
x = @cx + ( RaioAnel * Math.sin( d * j ) ).to_i
y = @cy - ( RaioAnel * Math.cos( d * j ) ).to_i
desenha_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# Movimenta o menu
#--------------------------------------------------------------------------
def refresh_mover(modo)
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / DurMov
d2 *= -1 if modo != 0
for i in 0...@item_max
j = i - @indice
d = d1 * j + d2 * @passos
x = @cx + ( RaioAnel * Math.sin( d ) ).to_i
y = @cy - ( RaioAnel * Math.cos( d ) ).to_i
desenha_item(x, y, i)
end
@passos -= 1
if @passos < 1
@modo = ModoEsp
end
end
#--------------------------------------------------------------------------
# Desenha o icone
#--------------------------------------------------------------------------
def desenha_item(x, y, i)
if @indice == i
self.cursor_rect.set(x-4, y-4, 32, 32)
draw_icon(@item_icon[i], x, y, @item_hab[i])
else
draw_icon(@item_icon[i], x, y, @item_hab[i])
end
end
#--------------------------------------------------------------------------
# Inicia o menu
#--------------------------------------------------------------------------
def inicia_menu
@modo = ModoIni
@passos = DurIni
if SE_Inicio != nil and SE_Inicio != ""
Audio.se_play("Audio/SE/" + SE_Inicio, 80, 100)
end
end
#--------------------------------------------------------------------------
# Gira o menu
#--------------------------------------------------------------------------
def girar(modo)
if modo == ModoMD
@indice -= 1
@indice = @item_hab.size - 1 if @indice < 0
elsif modo == ModoME
@indice += 1
@indice = 0 if @indice >= @item_hab.size
else
return
end
@modo = modo
@passos = DurMov
end
end
#==============================================================================
# Scene_Title
#------------------------------------------------------------------------------
# Faz modificações nescessarias para a exibição do nome do mapa
#==============================================================================
class Scene_Title
alias load_database_old load_database
def load_database
load_database_old
$data_mapinfo = load_data("Data/MapInfos.rvdata")
end
end
#==============================================================================
# Window_Local
#------------------------------------------------------------------------------
# Cria a janela responsavel pela exibição do nome do mapa
#==============================================================================
class Window_Local < Window_Base
#--------------------------------------------------------------------------
# Inicia o objeto
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, 96)
refresh
end
#--------------------------------------------------------------------------
# Atualiza o objeto
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, "Local:")
self.contents.font.color = system_color
self.contents.draw_text(4, 32, 120, 32, $data_mapinfo[$game_map.map_id].name, 2)
end
end
Aqui os dois juntos dão erro...
__________________
Clique na imagem

Para acompanhar esse jogo.
|

29-08-2008, 21:18
|
|
Novato
|
|
Data de Entrada: Jul 2008
Posts: 20
Reputação: 10
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Muuuito Obrigado Angel Ivy *----*
Funcionou Direitinho *------*
Arigatoooooou gozaimasu
=D
|

29-08-2008, 22:31
|
 |
Voltando Sprites para RO.
|
|
Data de Entrada: Mar 2008
Posts: 1,448
Reputação: 137
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Bem... Eles funcionam separadamente?
Se for o caso, procure outro anti-lag... X.X
|

29-08-2008, 22:48
|
 |
Your Soul is Mine
|
|
Data de Entrada: May 2008
Posts: 579
Reputação: 40
|
|
|
Re: Ajudo com Scripts... (Apenas um pouco >.<)
Sim, se eu remover o ant-lag o menu funciona perfeitamente e vice versa...
__________________
Clique na imagem

Para acompanhar esse jogo.
|
| Opções do Tópico |
|
|
| Exibição |
Modo Linear
|
Horários baseados na GMT -2. Agora são 19:00.
|
|