Lusianl Posted July 15, 2011 Share Posted July 15, 2011 (edited) Sistema di distribuzione puntiAutoreNiel 17DescrizioneUn menù per distribuire i punti e aumentare le abilitàScreenhttp://i258.photobucket.com/albums/hh257/atoa/Img-10.pngIstruzioniChiamare lo script: cena = $ Scene_Distribuct.newAggiungere punti al singolo $ game_actors [iD ]. point_add (X)Aggiungere punti al gruppo: game_party.actors actor.point_add (X) final para o ator em $ Script:Script principale #============================================================================== # Distribuilçao de Pontos # por Pedro HCDO # Modificado por Atoa #============================================================================== =begin Este script permite adicionar um sistema de distribuir pontos. Você pode configurar o script para adicionar pontos automáticamente quando o personagem subir de nível, ou adicionar manualmente atravez de eventos. Basta usar o comando "Chamar Script" e adicionar uma das seguintes linhas: Para aumentar a quantidade de pontos individualmente: $game_actors[iD].point_add(X) onde: ID = ID do personagem X = total de pontos ganhos Para aumentar a quantidade de pontos de todos membros do grupo: for actor in $game_party.actors actor.point_add(X) end onde: X = total de pontos ganhos Para abrir a tela de distribuição de pontos atravéz de um evento Use o comando "Chamar Script" e adicione a linha: $scene = Scene_Distribuct.new Modificações feitas por Atoa: - Adicionadas Várias constantes de configuração para aumentar o nível de customização do sistema - Melhorias no script que adiciona a opção de distribuir pontos no menu =end module Point #Se true, ignora o aumento de atributo ganho por level up. #Esse sistema pode ser incompatível com alguns #outros sistemas que alteram o ganho de atributos #esta é apenas uma forma de facilitar a edição do sistema #uma vez que isso pode ser feito via database, bastando alterar #a curva de atributos de uma forma que não haja ganho. NEGATE_LVLUP = false #Definir se os pontos serão ganhos ao subir de nível ADD_POINT_POR_LV = true #Se escolher adicionar pontos por nível, defina aqui quantos #pontos serão ganhos. #Deixe = nil para ganhar pontos aleatórios ADD_POINT_POR_LV_P = 20 #Maximo de pontos MAX_POINT = 999 #Modificar Mostrador de pontos totais #Se true, mostra os pontos totais ganhos, se false mostra #o valor máximo de pontos. SHOW_TOTAL_POINT = true #Quanto cada atributo gastara e adcionara ao personagem #ex:HP_GAST = [a,b] # a == pontos gastos para aumentar o atributo # b == valor aumentado no atributo HP_GAST = [2,25] SP_GAST = [1,15] STR_GAST = [3,2] DEX_GAST = [2,3] AGI_GAST = [2,2] INT_GAST = [2,3] #Animação ao passar a janela # 0 == normal # 1 == anda para o lado # 2 == zoom_out MOVE_TYP = 1 #Velocidade a fazer animação SPEDD_ANIMATION_MOVE_TYP = 20 #Desenhar o Battler do personagem? se true deixe o DRAW_FACE = false DRAW_BATTLER = true #Desenhar Face do personagem? se true deixe o DRAW_BATTLER = false #Só use se você usar o sistema de suporte para faces DRAW_FACE = false #Defina como os nomes dos atributos serão mostrados ATRIB_HP = "HP" ATRIB_SP = "MP" ATRIB_STR = "FOR" ATRIB_DEX = "DEF" ATRIB_AGI = "AGI" ATRIB_INT = "INT" #Atributos Máximos #Valores adicionados para tornar o sistema compatível com sistemas #de modificação dos valores máximos dos atributos. MAX_HP = 9999 MAX_SP = 9999 MAX_STR = 999 MAX_DEX = 999 MAX_AGI = 999 MAX_INT = 999 # Conguração Limite Máximo de atributos e level. MAX_LEVEL = [] #Não altere esta linha # Limite Padrão de Level MAX_LEVEL_DEFAUT = 99 PARAM_CALC = "(param[99] - param[98]) * (level - 99)" # Limite individual de Level # MAX_LEVEL[iD] = X, onde ID é a ID do personagem, e X o level máximo # Caso queira que todo personagens tenham o mesmo limite de level, apagues estas linhas MAX_LEVEL[1] = 99 MAX_LEVEL[2] = 99 MAX_LEVEL[3] = 99 MAX_LEVEL[4] = 99 end #============================================================================== # Game_Battler (Parte 1) #============================================================================== class Game_Battler #-------------------------------------------------------------------------- include Point #-------------------------------------------------------------------------- def maxhp n = [[base_maxhp + @maxhp_plus, 1].max, 99999999].min for i in @states n *= $data_states[i].maxhp_rate / 100.0 end n = [[integer(n), 1].max, 99999999].min return n end #-------------------------------------------------------------------------- def maxsp n = [[base_maxsp + @maxsp_plus, 0].max, 999999].min for i in @states n *= $data_states[i].maxsp_rate / 100.0 end n = [[integer(n), 0].max, 999999].min return n end #-------------------------------------------------------------------------- def str n = [[base_str + @str_plus, 1].max, MAX_STR].min for i in @states n *= $data_states[i].str_rate / 100.0 end n = [[integer(n), 1].max, MAX_STR].min return n end #-------------------------------------------------------------------------- def dex n = [[base_dex + @dex_plus, 1].max, MAX_DEX].min for i in @states n *= $data_states[i].dex_rate / 100.0 end n = [[integer(n), 1].max, MAX_DEX].min return n end #-------------------------------------------------------------------------- def agi n = [[base_agi + @agi_plus, 1].max, MAX_AGI].min for i in @states n *= $data_states[i].agi_rate / 100.0 end n = [[integer(n), 1].max, MAX_AGI].min return n end #-------------------------------------------------------------------------- def int n = [[base_int + @int_plus, 1].max, MAX_INT].min for i in @states n *= $data_states[i].int_rate / 100.0 end n = [[integer(n), 1].max, MAX_INT].min return n end #-------------------------------------------------------------------------- def maxhp=(maxhp) @maxhp_plus += maxhp - self.maxhp @maxhp_plus = [[@maxhp_plus, -MAX_HP].max, MAX_HP].min @hp = [@hp, self.maxhp].min end #-------------------------------------------------------------------------- def maxsp=(maxsp) @maxsp_plus += maxsp - self.maxsp @maxsp_plus = [[@maxsp_plus, -MAX_SP].max, MAX_SP].min @sp = [@sp, self.maxsp].min end #-------------------------------------------------------------------------- def str=(str) @str_plus += str - self.str @str_plus = [[@str_plus, -MAX_STR].max, MAX_STR].min end #-------------------------------------------------------------------------- def dex=(dex) @dex_plus += dex - self.dex @dex_plus = [[@dex_plus, -MAX_DEX].max, MAX_DEX].min end #-------------------------------------------------------------------------- def agi=(agi) @agi_plus += agi - self.agi @agi_plus = [[@agi_plus, -MAX_AGI].max, MAX_AGI].min end #-------------------------------------------------------------------------- def int=(int) @int_plus += int - self.int @int_plus = [[@int_plus, -MAX_INT].max, MAX_INT].min end end #============================================================================== # Game_Actor #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- alias points_initialize_setup setup #-------------------------------------------------------------------------- include Point #-------------------------------------------------------------------------- attr_accessor :total_points attr_accessor :compar_lv #-------------------------------------------------------------------------- def batler_propets return [@battler_name,@battler_hue] end #-------------------------------------------------------------------------- def setup(actor_id) points_initialize_setup(actor_id) @points = 0 @total_points = 0 if point_por_lv? @compar_lv = -1 end end #-------------------------------------------------------------------------- def point_por_lv? return ADD_POINT_POR_LV end #-------------------------------------------------------------------------- def add_point_por_lv return ADD_POINT_POR_LV_P end #-------------------------------------------------------------------------- def point return @points end #-------------------------------------------------------------------------- def total_point return @total_points end #-------------------------------------------------------------------------- def point_modifi(p) @points = p @total_points = p end #-------------------------------------------------------------------------- def point_add(p) @points = (@points+p) if p > 0 @total_points = (@total_points+p) end end #-------------------------------------------------------------------------- def point_lost(p) point_add(-p) end #-------------------------------------------------------------------------- def update_point return unless point_por_lv? if @compar_lv < @level @compar_lv += 1 unless add_point_por_lv.nil? point_add(add_point_por_lv) else point = ((@level/[rand(4),1].max)+1) point_add(point) end end end #-------------------------------------------------------------------------- def exp=(exp) @exp = [[exp, 999999999999].min, 0].max while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0 @level += 1 for j in $data_classes[@class_id].learnings if j.level == @level learn_skill(j.skill_id) end end end while @exp < @exp_list[@level] @level -= 1 end @hp = [@hp, self.maxhp].min @sp = [@sp, self.maxsp].min end #-------------------------------------------------------------------------- def base_parameter(type) if @level >= 100 calc_text = PARAM_CALC.dup calc_text.gsub!(/level/i) { "@level" } calc_text.gsub!(/param\[(\d+)\]/i) { "$data_actors[@actor_id].parameters[type, #{$1.to_i}]" } return $data_actors[@actor_id].parameters[type, 99] + eval(calc_text) end return $data_actors[@actor_id].parameters[type, @level] end #-------------------------------------------------------------------------- def base_maxhp n = (Point::NEGATE_LVLUP ? $data_actors[@actor_id].parameters[0, 1] : base_parameter(0)) return [[n, 1].max, MAX_HP].min end #-------------------------------------------------------------------------- def maxhp n = [[base_maxhp + @maxhp_plus, 1].max, MAX_HP].min for i in @states n *= $data_states[i].maxhp_rate / 100.0 end n = [[integer(n), 1].max, MAX_HP].min return n end #-------------------------------------------------------------------------- def base_maxsp n = (Point::NEGATE_LVLUP ? $data_actors[@actor_id].parameters[1, 1] : base_parameter(1)) return [[n, 1].max, MAX_SP].min end #-------------------------------------------------------------------------- def make_exp_list actor = $data_actors[@actor_id] @exp_list[1] = 0 pow_i = 2.4 + actor.exp_inflation / 100.0 (2..(self.final_level + 1)).each { |i| if i > self.final_level @exp_list[i] = 0 else n = actor.exp_basis * ((i + 3) * pow_i) / (5 * pow_i) @exp_list[i] = @exp_list[i-1] + Integer(n) end } end #-------------------------------------------------------------------------- def level=(level) level = [[level, self.final_level].min, 1].max self.exp = @exp_list[level] end #-------------------------------------------------------------------------- def final_level return MAX_LEVEL[@actor_id] != nil ? MAX_LEVEL[@actor_id] : MAX_LEVEL_DEFAUT end #-------------------------------------------------------------------------- def base_str n = (Point::NEGATE_LVLUP ? $data_actors[@actor_id].parameters[2, 1] : base_parameter(2)) weapon = $data_weapons[@weapon_id] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += weapon != nil ? weapon.str_plus : 0 n += armor1 != nil ? armor1.str_plus : 0 n += armor2 != nil ? armor2.str_plus : 0 n += armor3 != nil ? armor3.str_plus : 0 n += armor4 != nil ? armor4.str_plus : 0 return [[n, 1].max, MAX_STR].min end #-------------------------------------------------------------------------- def base_dex n = (Point::NEGATE_LVLUP ? $data_actors[@actor_id].parameters[3, 1] : base_parameter(3)) weapon = $data_weapons[@weapon_id] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += weapon != nil ? weapon.dex_plus : 0 n += armor1 != nil ? armor1.dex_plus : 0 n += armor2 != nil ? armor2.dex_plus : 0 n += armor3 != nil ? armor3.dex_plus : 0 n += armor4 != nil ? armor4.dex_plus : 0 return [[n, 1].max, MAX_DEX].min end #-------------------------------------------------------------------------- def base_agi n = (Point::NEGATE_LVLUP ? $data_actors[@actor_id].parameters[4, 1] : base_parameter(4)) weapon = $data_weapons[@weapon_id] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += weapon != nil ? weapon.agi_plus : 0 n += armor1 != nil ? armor1.agi_plus : 0 n += armor2 != nil ? armor2.agi_plus : 0 n += armor3 != nil ? armor3.agi_plus : 0 n += armor4 != nil ? armor4.agi_plus : 0 return [[n, 1].max, MAX_AGI].min end #-------------------------------------------------------------------------- def base_int n = (Point::NEGATE_LVLUP ? $data_actors[@actor_id].parameters[5, 1] : base_parameter(5)) weapon = $data_weapons[@weapon_id] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += weapon != nil ? weapon.int_plus : 0 n += armor1 != nil ? armor1.int_plus : 0 n += armor2 != nil ? armor2.int_plus : 0 n += armor3 != nil ? armor3.int_plus : 0 n += armor4 != nil ? armor4.int_plus : 0 return [[n, 1].max, MAX_INT].min end end #============================================================================== # Game_Point #============================================================================== class Game_Point #-------------------------------------------------------------------------- def update for actor in $game_party.actors actor.update_point end end #-------------------------------------------------------------------------- def point(actor) unless $game_party.actors[actor].nil? return $game_party.actors[actor].point end end #-------------------------------------------------------------------------- def modifi_point(actor,point) unless $game_party.actors[actor].nil? $game_party.actors[actor].point_modifi(point) end end #-------------------------------------------------------------------------- def add_point(actor,point) unless $game_party.actors[actor].nil? $game_party.actors[actor].point_add(point) end end #-------------------------------------------------------------------------- def remove_point(actor,point) unless $game_party.actors[actor].nil? $game_party.actors[actor].point_lost(point) end end end #============================================================================== # Scene_Map #============================================================================== class Scene_Map #-------------------------------------------------------------------------- alias points_update_main main alias points_update_update update #-------------------------------------------------------------------------- def main $game_points = Game_Point.new points_update_main end #-------------------------------------------------------------------------- def update points_update_update $game_points.update end end #============================================================================== # Window_Command #============================================================================== class Window_Command < Window_Selectable #-------------------------------------------------------------------------- alias d_disable_item disable_item alias d_disable_initialize initialize alias d_disable_refresh refresh #-------------------------------------------------------------------------- def initialize(width, commands) d_disable_initialize(width, commands) @disableds_items = commands.clone for i in 0...@disableds_items.size @disableds_items[i] = false end end #-------------------------------------------------------------------------- def refresh d_disable_refresh @disableds_items = @commands.clone for i in 0...@disableds_items.size @disableds_items[i] = false end end #-------------------------------------------------------------------------- def disable_item(index) d_disable_item(index) @disableds_items[index] = true end #-------------------------------------------------------------------------- def disabled?(index) return @disableds_items[index] end end #============================================================================== # Window_Base #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- def dispose return if self.disposed? if self.contents != nil self.contents.dispose end super end #-------------------------------------------------------------------------- def draw_batler(actor,x,y) bn = actor.batler_propets[0] bh = actor.batler_propets[1] begin batler = RPG::Cache.battler(bn,bh) rescue batler = RPG::Cache.battler("",0) end cw = batler.width ch = batler.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 81, y - ch + 50, batler, src_rect) end end #============================================================================== # Window_Proprets_Dirtribuct_1 #============================================================================== class Window_Proprets_Dirtribuct_1 < Window_Base #-------------------------------------------------------------------------- include Point #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 200, 64) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize @time = 10 refresh(actor) end #-------------------------------------------------------------------------- def refresh(actor) self.contents.clear return if $game_party.actors.size <= 0 if Point::SHOW_TOTAL_POINT text = "Pontos: "+$game_party.actors[actor].point.to_s+"/"+$game_party.actors[actor].total_point.to_s else text = "Pontos: "+$game_party.actors[actor].point.to_s+"/"+MAX_POINT.to_s end cx = contents.text_size(text).width self.contents.font.color = normal_color self.contents.draw_text(4, 0, self.width - 30, 32, text, 0) end #-------------------------------------------------------------------------- def update(actor) if @time > 0 @time -= 1 else @time = 10 refresh(actor) end end end #============================================================================== # Window_Proprets_Dirtribuct_2 #============================================================================== class Window_Proprets_Dirtribuct_2 < Window_Base #-------------------------------------------------------------------------- include Point #-------------------------------------------------------------------------- def initialize super(0, 0, 200, 192) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize @time = 10 refresh end #-------------------------------------------------------------------------- def refresh self.contents.clear text1 = "Distribuir Pontos" sublinha = "________________" self.contents.draw_text(4, 0, self.width - 30, 32, text1, 0) self.contents.draw_text(4, 6, self.width - 30, 32, sublinha, 0) if $game_party.actors.size > 1 text2 = "← Q ● W →" self.contents.draw_text(4, 54, self.width - 30, 32, text2, 0) text3 = "C >Escolher<" self.contents.draw_text(4, 84, self.width - 30, 32, text3, 0) text4 = "ESC >Sair<" self.contents.draw_text(4, 114, self.width - 30, 32, text4, 0) else text3 = "C >Escolher<" self.contents.draw_text(4, 54, self.width - 30, 32, text3, 0) text4 = "ESC >Sair<" self.contents.draw_text(4, 84, self.width - 30, 32, text4, 0) end end end #============================================================================== # Window_Proprets_Dirtribuct_3 #============================================================================== class Window_Proprets_Dirtribuct_3 < Window_Base #-------------------------------------------------------------------------- include Point #-------------------------------------------------------------------------- def initialize(actor,x_zoom=440,y_zoom=480) super(0, 0, x_zoom, y_zoom) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize @actor_id = actor refresh(actor) end #-------------------------------------------------------------------------- def refresh(actor) self.contents.clear return if $game_party.actors.size <= 0 @actor = $game_party.actors[actor] draw_batler(@actor,-45,120) if Point::DRAW_BATTLER draw_actor_face(@actor,0,120) if Point::DRAW_FACE draw_actor_graphic(@actor, 180, 170) draw_actor_name(@actor, 200,0) draw_actor_class(@actor, 230, 40) draw_actor_level(@actor, 230, 70) draw_actor_exp(@actor, 230, 90) draw_actor_state(@actor, 230, 120) draw_actor_hp(@actor, 230, 150) draw_actor_sp(@actor, 230, 170) draw_actor_parameter(@actor, 230, 220, 0) draw_actor_parameter(@actor, 230, 240, 1) draw_actor_parameter(@actor, 230, 260, 2) draw_actor_parameter(@actor, 230, 280, 3) draw_actor_parameter(@actor, 230, 300, 4) draw_actor_parameter(@actor, 230, 320, 5) draw_actor_parameter(@actor, 230, 340, 6) end #-------------------------------------------------------------------------- def no_actor self.contents.clear self.contents.font.color = system_color text = "Não há Personagens no grupo." self.contents.draw_text(80, 200, self.width - 40, 32, text, 0) end #-------------------------------------------------------------------------- def actor_in_memory return @actor_id end end #============================================================================== # Window_Proprets_Dirtribuct_4 #============================================================================== class Window_Proprets_Dirtribuct_4 < Window_Base #-------------------------------------------------------------------------- include Point #-------------------------------------------------------------------------- def initialize(index) super(0, 0, 200, 104) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize @time = 10 refresh(index) end #-------------------------------------------------------------------------- def refresh(index) self.contents.clear if index == "no_index" text1 = "" text2 = "Sem Comando" text3 = "" text4 = "" text5 = "" else text2 = "Pontos" text3 = "Aumenta" case index when 0 text1 = "Aumentar " + Point::ATRIB_HP text4 = HP_GAST[0].to_s text5 = "+" + HP_GAST[1].to_s + " " + Point::ATRIB_HP when 1 text1 = "Aumentar " + Point::ATRIB_SP text4 = SP_GAST[0].to_s text5 = "+" + SP_GAST[1].to_s + " " + Point::ATRIB_SP when 2 text1 = "Aumentar " + Point::ATRIB_STR text4 = STR_GAST[0].to_s text5 = "+" + STR_GAST[1].to_s + " " + Point::ATRIB_STR when 3 text1 = "Aumentar " + Point::ATRIB_DEX text4 = DEX_GAST[0].to_s text5 = "+" + DEX_GAST[1].to_s + " " + Point::ATRIB_DEX when 4 text1 = "Aumentar " + Point::ATRIB_AGI text4 = AGI_GAST[0].to_s text5 = "+" + AGI_GAST[1].to_s + " " + Point::ATRIB_AGI when 5 text1 = "Aumentar " + Point::ATRIB_INT text4 = INT_GAST[0].to_s text5 = "+" + INT_GAST[1].to_s + " " + Point::ATRIB_INT end end self.contents.draw_text(4, 0, self.width - 30, 32, text1, 0) self.contents.draw_text(4, 20, self.width - 30, 32, text2, 0) self.contents.draw_text(4, 40, self.width - 30, 32, text3, 0) self.contents.draw_text(88, 20, self.width - 30, 32, text4, 0) self.contents.draw_text(72, 40, self.width - 30, 32, text5, 0) self.contents.draw_text(72, 20, self.width - 30, 32, ":", 0) end #-------------------------------------------------------------------------- def update(index) if @time > 0 @time -= 1 else @time = 10 refresh(index) end end end #============================================================================== # Window_Proprets_Dirtribuct_5 #============================================================================== class Window_Proprets_Dirtribuct_5 < Window_Base #-------------------------------------------------------------------------- def initialize super(0, 0, 200, 224) end #-------------------------------------------------------------------------- def index return "no_index" end end #============================================================================== # Scene_Distribuct #============================================================================== class Scene_Distribuct #-------------------------------------------------------------------------- include Point #-------------------------------------------------------------------------- def initialize(actor_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- def main s1 = $data_system.words.hp + " Máximo" s2 = $data_system.words.sp + " Máximo" s3 = $data_system.words.str s4 = $data_system.words.dex s5 = $data_system.words.agi s6 = $data_system.words.int s = [s1,s2,s3,s4,s5,s6] if $game_party.actors.size > 0 @command = Window_Command.new(200,s) else @command = Window_Proprets_Dirtribuct_5.new end @command.y = 192 update_commands @janela1 = Window_Proprets_Dirtribuct_1.new(@actor_index) @janela1.y = 416 @janela2 = Window_Proprets_Dirtribuct_2.new @janela3 = Window_Proprets_Dirtribuct_3.new(@actor_index) @janela3.x = 200 @janela3.z = 0 @janela4 = Window_Proprets_Dirtribuct_4.new(@command.index) if $game_party.actors.size <= 0 @janela4.y = 240 else @janela4.x = 204 @janela4.y = 200 end Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command.dispose @janela1.dispose @janela2.dispose @janela3.dispose @janela4.dispose unless @janela_ex.nil? unless @janela_ex.disposed? @janela_ex.dispose end end end #-------------------------------------------------------------------------- def update if @processing update_process return end if $game_party.actors.size > 0 @command.update @janela1.update(@actor_index) @janela4.update(@command.index) case @command.index when 0; @janela4.y = 200 when 1; @janela4.y = 231 when 2; @janela4.y = 264 when 3; @janela4.y = 292 when 4; @janela4.y = 328 when 5; @janela4.y = 360 end case Input.dir4 when 2 ; @janela4.refresh(@command.index) when 4 ; @janela4.refresh(@command.index) when 6 ; @janela4.refresh(@command.index) when 8 ; @janela4.refresh(@command.index) end else @janela3.no_actor end as = $game_party.actors.size if Input.trigger?(Input::C) and as > 0 unless @command.disabled?(@command.index) $game_system.se_play($data_system.decision_se) modified_atribut(@command.index) else $game_system.se_play($data_system.buzzer_se) end update_commands @janela1.refresh(@actor_index) @janela3.refresh(@actor_index) elsif Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) if $using_menu $using_menu = false $scene = Scene_Menu.new(3) else $scene = Scene_Map.new end elsif Input.trigger?(Input::L) and as > 1 $game_system.se_play($data_system.cursor_se) @actor_index += 1 @actor_index %= $game_party.actors.size update_commands if MOVE_TYP == 0 @janela3.refresh(@actor_index) elsif MOVE_TYP == 1 ativation_update_process("left") elsif MOVE_TYP == 2 ativation_update_process("zoom_in") end @janela1.refresh(@actor_index) elsif Input.trigger?(Input::R) and as > 1 $game_system.se_play($data_system.cursor_se) @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size update_commands if MOVE_TYP == 0 @janela3.refresh(@actor_index) elsif MOVE_TYP == 1 ativation_update_process("right") elsif MOVE_TYP == 2 ativation_update_process("zoom_in") end @janela1.refresh(@actor_index) end end #-------------------------------------------------------------------------- def ativation_update_process(typ) @janela_ex = Window_Proprets_Dirtribuct_3.new(@actor_index) @janela_ex.z = 0 case typ when "left" @move_process_typ = "left" @janela_ex.x = 640 when "right" @move_process_typ = "right" @janela_ex.x = (200-@janela_ex.width) when "zoom_in" @move_process_typ = "zoom_in" @janela_ex.dispose @janela_ex = nil @x_zoom = 440 @y_zoom = 480 @pos_x = 200 @pos_y = 0 @zoom_in = true end @processing = true end #-------------------------------------------------------------------------- def update_process if @move_process_typ == "left" if @janela3.x > -@janela3.width @janela3.x -= SPEDD_ANIMATION_MOVE_TYP end if @janela_ex.x > 200 @janela_ex.x -= SPEDD_ANIMATION_MOVE_TYP end if @janela3.x <= -@janela3.width and @janela_ex.x <= 200 unless @janela_ex.disposed? @janela_ex.dispose end @janela_ex = nil @janela3.refresh(@actor_index) @janela3.x = 200 @processing = false end elsif @move_process_typ == "right" if @janela3.x < 640 @janela3.x += SPEDD_ANIMATION_MOVE_TYP end if @janela_ex.x < 200 @janela_ex.x += SPEDD_ANIMATION_MOVE_TYP end if @janela3.x >= 640 and @janela_ex.x >= 200 unless @janela_ex.disposed? @janela_ex.dispose end @janela_ex = nil @janela3.refresh(@actor_index) @janela3.x = 200 @processing = false end elsif @move_process_typ == "zoom_in" if @x_zoom > 32 or @y_zoom > 32 and @zoom_in actor = @janela3.actor_in_memory unless @janela3.disposed? @janela3.dispose end @janela3 = Window_Proprets_Dirtribuct_3.new(actor,@x_zoom,@y_zoom) @janela3.z = 0 @janela3.x = @pos_x @janela3.y = @pos_y @x_zoom -= SPEDD_ANIMATION_MOVE_TYP @y_zoom -= SPEDD_ANIMATION_MOVE_TYP @x_zoom = [@x_zoom,40].max @y_zoom = [@y_zoom,40].max if @x_zoom <= 40 and @y_zoom <= 40 @zoom_in = false end else unless @janela3.disposed? @janela3.dispose end @x_zoom += SPEDD_ANIMATION_MOVE_TYP @y_zoom += SPEDD_ANIMATION_MOVE_TYP @x_zoom = [@x_zoom,440].min @y_zoom = [@y_zoom,480].min @janela3 = Window_Proprets_Dirtribuct_3.new(@actor_index,@x_zoom,@y_zoom) @janela3.z = 0 @janela3.x = @pos_x @janela3.y = @pos_y if @x_zoom >= 440 and @y_zoom >= 480 @processing = false end end end end #-------------------------------------------------------------------------- def modified_atribut(index) case index when 0 $game_party.actors[@actor_index].maxhp += hp_atribuct[1] $game_party.actors[@actor_index].hp += hp_atribuct[1] lost_point(hp_atribuct[0]) when 1 $game_party.actors[@actor_index].maxsp += sp_atribuct[1] $game_party.actors[@actor_index].sp += sp_atribuct[1] lost_point(sp_atribuct[0]) when 2 $game_party.actors[@actor_index].str += str_atribuct[1] lost_point(str_atribuct[0]) when 3 $game_party.actors[@actor_index].dex += dex_atribuct[1] lost_point(dex_atribuct[0]) when 4 $game_party.actors[@actor_index].agi += agi_atribuct[1] lost_point(agi_atribuct[0]) when 5 $game_party.actors[@actor_index].int += int_atribuct[1] lost_point(int_atribuct[0]) end end #-------------------------------------------------------------------------- def update_commands return if $game_party.actors.size <= 0 if $game_party.actors[@actor_index].nil? return end if $game_party.actors[@actor_index].hp <= (Point::MAX_HP - 1) or $game_party.actors[@actor_index].sp <= (Point::MAX_SP - 1) or $game_party.actors[@actor_index].str <= (Point::MAX_STR - 1) or $game_party.actors[@actor_index].dex <= (Point::MAX_DEX - 1) or $game_party.actors[@actor_index].agi <= (Point::MAX_AGI - 1) or $game_party.actors[@actor_index].int <= (Point::MAX_INT - 1) @command.refresh end if $game_party.actors[@actor_index].hp >= Point::MAX_HP or point < hp_atribuct[0] @command.disable_item(0) end if $game_party.actors[@actor_index].sp >= Point::MAX_SP or point < sp_atribuct[0] @command.disable_item(1) end if $game_party.actors[@actor_index].str >= Point::MAX_STR or point < str_atribuct[0] @command.disable_item(2) end if $game_party.actors[@actor_index].dex >= Point::MAX_DEX or point < dex_atribuct[0] @command.disable_item(3) end if $game_party.actors[@actor_index].agi >= Point::MAX_AGI or point < agi_atribuct[0] @command.disable_item(4) end if $game_party.actors[@actor_index].int >= Point::MAX_INT or point < int_atribuct[0] @command.disable_item(5) end if point <= 0 for i in 0...6 @command.disable_item(i) end end end #-------------------------------------------------------------------------- def point return $game_party.actors[@actor_index].point end #-------------------------------------------------------------------------- def lost_point(point) $game_party.actors[@actor_index].point_lost(point) end #-------------------------------------------------------------------------- def hp_atribuct return HP_GAST end #-------------------------------------------------------------------------- def sp_atribuct return SP_GAST end #-------------------------------------------------------------------------- def str_atribuct return STR_GAST end #-------------------------------------------------------------------------- def dex_atribuct return DEX_GAST end #-------------------------------------------------------------------------- def agi_atribuct return AGI_GAST end #-------------------------------------------------------------------------- def int_atribuct return INT_GAST end end Script del menù #============================================================================== Scene_Menu # #============================================================================== Scene_Menu classe def principais s1 = $ data_system.words.item s2 = $ data_system.words.skill s3 = $ data_system.words.equip s4 = " Pontos " s5 = "Status" s6 = $ $ $ "Pontos" "Salvar" s7 = " Fim de Jogo " command_window Window_Command.new @ = (160, [ s1, S2, S3 , S4, S5 , S6, S7 ]) command_window.index = @ @ menu_index $ game_party.actors.size if = = "Fim Jogo" = [s1, S2, S3, S4, S5, S6, S7]) = if = = 0 @ command_window.disable_item (0) @ command_window.disable_item (1) @ command_window.disable_item (2) @ command_window.disable_item (3) @ command_window.disable_item (4) end if $ game_system.save_disabled command_window.disable_item @ (5) = 0 if $ final playtime_window @ = Window_PlayTime.new @ playtime_window.x = 0 = 256 @ playtime_window.y steps_window @ = Window_Steps.new @ steps_window.x = 0 = 336 @ steps_window.y gold_window @ = Window_Gold.new @ gold_window.x = 0 @ = = 0 = 256 = = 0 = 336 = = 0 gold_window.y = 416 status_window Window_MenuStatus.new @ = @ = 160 status_window.x status_window.y @ = 0 Graphics.transition loop do Graphics.update Input.update atualização se $ cena! = auto break end end Graphics.freeze @ command_window . 416 160 0 loop do se $ command_window. dispor @ playtime_window.dispose @ steps_window.dispose @ gold_window.dispose @ status_window.dispose final #------------------------------- ------------------------------------------- def update_command se Input.trigger ? Input.trigger? (Input :: B) $ game_system.se_play ($ data_system.cancel_se ) = $ cena Scene_Map.new retorno final se Input.trigger ? (Input :: C) se game_party.actors.size $ == 0 and@command_window.index (Input:: B) data_system.cancel_se) Input.trigger? (Input:: == 0 <5 $ game_system.se_play ($ data_system.buzzer_se ) retorno final case@command_window.index quando 0 $ game_system.se_play ( data_system.decision_se $ ) $ = Scene_Item.new cena quando um game_system.se_play $ ($ data_system.decision_se ) @ data_system.buzzer_se) 0 (data_system.decision_se $) data_system.decision_se) command_window.active = false @ status_window.active = true status_window.index @ = 0 quando 2 $ game_system.se_play ($ data_system.decision_se ) = false command_window.active @ @ status_window.active = true status_window.index @ = 0 quando 3 $ = false = true = 0 quando 2 data_system.decision_se) = false = true = 0 quando 3 game_system.se_play ($ data_system.decision_se ) using_menu = true $ $ = Scene_Distribuct.new cena quando 4 $ game_system.se_play ($ data_system.decision_se ) = false command_window.active @ @ status_window.active = true status_window.index @ = 0 quando data_system.decision_se) true 4 data_system.decision_se) false true 0 5 if $ game_system.save_disabled game_system.se_play $ ($ data_system.buzzer_se ) retorno final $ game_system.se_play ($ data_system.decision_se ) = $ cena Scene_Save.new quando seis $ game_system.se_play ($ data_system.decision_se ) = $ cena Scene_End if data_system.buzzer_se) data_system.decision_se) data_system.decision_se) . novo final retorno final final #------------------------------------------- ------------------------------- update_status def se Input.trigger ? (Input :: B) game_system.se_play $ ($ Input.trigger? (Input:: B) data_system.cancel_se ) @ command_window.active = true @ status_window.active = false status_window.index @ = -1 retorno final se Input.trigger ? (Input :: C) case@command_window.index quando uma se $ game_party.actors [@ data_system.cancel_se) = true = false = -1 Input.trigger? (Input:: $ ] status_window.index . > restrição = 2 $ game_system.se_play ($ data_system.buzzer_se ) retorno final $ game_system.se_play ($ data_system.decision_se ) = $ cena Scene_Skill.new (@ status_window.index ) quando dois $ game_system.se_play ( status_window.index.> 2 data_system.buzzer_se) data_system.decision_se) status_window.index) data_system.decision_se $ ) $ = cena Scene_Equip.new (@ status_window.index ) quando 4 $ game_system.se_play ($ data_system.decision_se ) = $ cena Scene_Status.new (@ status_window.index ) final retorno final final final # === $) status_window.index) quando 4 data_system.decision_se) status_window.index) ================================================== ========================= # Scene_Status #====================== ================================================== ====== classe Scene_Status #----------------------------------------- --------------------------------- atualização def se Input.trigger ? (Input :: B) $ game_system.se_play Input.trigger? (Input:: B) ($ data_system.cancel_se ) = $ cena Scene_Menu.new (4) retorno final se? (Entrada : R) Input.trigger $ game_system.se_play ($ data_system.cursor_se ) + actor_index @ = 1 % actor_index @ = $ game_party . data_system.cancel_se) (Entrada: data_system.cursor_se) 1 game_party. actors.size $ cena = Scene_Status.new (@ actor_index ) retorno final se Input.trigger ? (Input :: L) $ game_system.se_play ($ data_system.cursor_se ) + actor_index @ = $ game_party.actors.size - 1 actor_index @ actor_index) Input.trigger? (Input:: data_system.cursor_se) - 1 % = $ game_party.actors.size $ cena = Scene_Status.new (@ actor_index ) retorno final final final #=========================== % actor_index) ================================================== = Scene_Save # #============================================== ================================ classe Scene_Save < Scene_File #------------- <Scene_File -------------------------------------------------- ----------- def on_cancel game_system.se_play $ ($ data_system.cancel_se ) se $ game_temp.save_calling $ game_temp.save_calling = false $ cena = Scene_Map.new retorno final = $ cena Scene_Menu.new (5 ($ data_system.cancel_se) se false ) end end #============================================== ================================ # Scene_End #=============== ================================================== ============= classe Scene_End #---------------------------------- ---------------------------------------- atualização def @ command_window.update se Input.trigger ? (Input :: B) $ game_system.se_play ($ data_system.cancel_se ) = $ cena Scene_Menu.new (6) retorno final se Input.trigger ? (Input :: C) case@command_window.index quando 0 command_to_title quando um command_shutdown (Input:: B) data_system.cancel_se) Input.trigger? (Input:: 0 quando dois command_cancel final retorno final final final #========================================= ===================================== Window_Steps # #========== ================================================== ================== classe Window_Steps < Window_Base #--------------------------- <Window_Base ----------------------------------------------- def initialize super (0, 0 , 160, 80) self.conteudo Bitmap.new = (largura - 32, altura - 32) = $ self.contents.font.name fontface self.contents.font.size = $ fontsize refresh end def refresh auto (0, 0, 160, - 32, altura - $ $ . contents.clear = system_color self.contents.font.color self.contents.draw_text (4 , 0 , 120, 32, " Passos ") = self.contents.font.color normal_color self.contents.draw_text (4 , 24, (4, 0, 120, 32, "Passos") (4, 24, 120, 32, $ game_party.steps.to_s , 2) end end #================================== game_party.steps.to_s, 2) ============================================ Window_PlayTime # # === ================================================== ========================= classe Window_PlayTime < Window_Base #-------------------- <Window_Base -------------------------------------------------- ---- def initialize super (0, 0 , 160, 80) self.conteudo Bitmap.new = (largura - 32, altura - 32) = $ self.contents.font.name fontface self.contents.font.size = (0, 0, 160, - 32, altura - $ $ fontsize refresh final #--------------------------------------------- ----------------------------- final Edited April 27, 2013 by Dilos Script monoriga sistemato. http://www.freankexpo.net/signature/1129.pngPremi RpgMaker http://www.rpg2s.net/forum/uploads/monthly_01_2017/msg-293-0-48316500-1483794996.jpghttp://www.rpg2s.net/dax_games/r2s_regali2.pngContesthttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif http://rpg2s.net/gif/SCContest1Oct.gif http://rpg2s.net/gif/SCContest2Oct.gif http://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://www.rpg2s.net/awards/bestpixel2.jpghttp://www.rpg2s.net/awards/bestresourCSist2.jpghttp://www.rpg2s.net/awards/mostproductive1.jpghttp://i42.servimg.com/u/f42/13/12/87/37/iconap13.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap14.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap15.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap16.pnghttp://i42.servimg.com/u/f42/13/12/87/37/screen10.pnghttp://www.rpgmkr.net/contest/screen-contest-primo.pnghttp://www.makerando.com/forum/uploads/jawards/iconawards3.png Link to comment Share on other sites More sharing options...
Lomax af Posted July 15, 2011 Share Posted July 15, 2011 Bug di distrazione (credo)Richiamare lo script cena=?? ......Cospladya 2011La mia Lightning: http://img69.imageshack.us/img69/4672/43078798.png ........Nissa comix 2011vincitori come miglior gruppo:http://img521.imageshack.us/img521/668/migliorgrupponissacomix.png Link to comment Share on other sites More sharing options...
giver Posted July 15, 2011 Share Posted July 15, 2011 Errore di traduzione automatizzata, come la parte di script che riguarda il menù . . . (final al posto di end . . . XD) SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]http://www.rpg2s.net/forum/index.php/topic/21892-vintagevisualsrewrite-enhanced-revised-victory-screen-v-35-da-autori-vari-a-giver/ http://www.rpg2s.net/forum/index.php/topic/21868-eventing-utility-simple-last-battle-events-fix-v-30-by-giver/ http://www.rpg2s.net/forum/index.php/topic/21853-vintagerewrite-constance-menu-per-4-personaggi-da-team-constance-a-giver/ http://www.rpg2s.net/forum/index.php/topic/22126-vintagedoveroso-necroedit-dummy-title-22u-update-per-crearlo-ad-eventi-su-mappa-by-giver/ http://www.rpg2s.net/forum/index.php/topic/22127-vintagevisuals-tale-chapters-save-system-20-by-giver/ Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !! http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gifNon riesco a smettere di essere affascinato da immagini come questa . . .http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpgAlcuni wallpapers che faccio ruotare sul mio vecchio PC . . .http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpghttp://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpghttp://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpghttp://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . . BBCode TestingTypeface & Size Link to comment Share on other sites More sharing options...
Guardian of Irael Posted July 15, 2011 Share Posted July 15, 2011 Bug di distrazione (credo)Richiamare lo script cena=??No, no credo sia proprio cena, se cerchi nello script ci sono diverse parole! Probabilmente è qualcosa nella sua lingua! XD^ ^ Mi pare ci fosse uno script simile, ma non era lo stesso! Lu, usa il tag code con la parola ruby, adesso il bug dello spoiler è fixato!^ ^ (\_/)(^ ^) <----coniglietto rosso, me! (> <) Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^ http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^ http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^ REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^ 🖤http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gifhttp://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3http://i.imgur.com/MpaUphY.jpg by Idriu E:3Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44) http://i.imgur.com/PgUqHPm.pngUfficiale"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.pngGrazie Testament XD Fan n°1 ufficiale di PQ! :DVivail Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che nonavevo programmi di grafica per fare un banner su questo pc XD (ora ho dinuovo il mio PC veramente :D) Rosso Guardiano dellahttp://i.imgur.com/Os5rvhx.pngRpg2s RPG BY FORUM:Nome: Darth Reveal PV totali 2PA totali 16Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.Bozze vesti non definitive qui.Equipaggiamento:Indossa:60$ e 59$ divisi in due tasche interneLevaitanSpada a due mani elsa lungaGuanti del Defender (2PA)Anello del linguaggio animale (diventato del Richiamo)Scrinieri da lanciere (2 PA)Elmo del Leone (5 PA)Corazza del Leone in Ferro Corrazzato (7 PA) ZAINO (20) contenente:Portamonete in pelle di cinghiale contenente: 100$Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)CordaBottiglia di idromeleForma di formaggioTorcia (serve ad illuminare, dura tre settori)Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)Ampolla BiancaSemi di Balissa CAVALLO NORMALE + SELLA (30 +2 armi) contentente:66$Benda di pronto soccorso x3Spada a due maniFagotto per Adara (fazzoletto ricamato) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now