Samuka_Adm Admin
Medalhas :
Mensagens : 150 Pontos : 319 Reputação : 44 Data de inscrição : 15/06/2012
| Assunto: Distribuir Pontos Sáb Jun 23, 2012 2:52 pm | |
| Lembrando quê: esse script nao é meu Esse é um script que faz com que você distribua pontos pelos atributos do herói do jeito que vc quer - Código:
-
#================================= # Syn's Upgrade Customization V4.86 (3/28/07) # Criado por CastielRPG # Ajudado por Raziel # Traduzido por CastielRPG (e google tradutor kkk) #=================================
module Upgrade_Points Points_Gained = 3 # Quantidade de pontos ganhas a cada nível. Hp_rise = 10 # Quantidade de HP aumentada a cada ponto Sp_rise = 10 # Quantidade de SP aumentada a cada ponto Str_rise = 1 # Quantidade de Força aumentada a cada ponto Dex_rise = 1 # Quantidade de Destreza aumentada a cada ponto Agi_rise = 1 # Quantidade de Agilidade aumentada a cada ponto Int_rise = 1 # Quantidade de Magia aumentada a cada ponto Error_sound = '057-Wrong01' # Mude o efeito de som quando os pontos chegarem a 0. end
#================================= # *Começo do Script* #================================= #================================= # *Criar Pontos* #================================= class Game_Actor < Game_Battler attr_accessor :upgrade_points alias stat_point_lvlup_game_actor_setup setup def setup(actor_id) stat_point_lvlup_game_actor_setup(actor_id) @upgrade_points = 0 end def exp=(exp) @exp = [[exp, 9999999].min, 0].max # Nível acima while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0 @level += 1 @upgrade_points += Upgrade_Points::Points_Gained $scene = Scene_Upgrade.new # Aprenda Habilidades 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 end # ^^^^ Obrigado Icedmetal ^^^^
#================================= # Começo do Upgrade #=================================
class Scene_Upgrade #-------------------------------------------------------------------------- # Inicialização de Objetos #-------------------------------------------------------------------------- def initialize(actor_index = 0) @actor_index = actor_index end
def main @spriteset = Spriteset_Map.new s1 = "Aumentar HP" s2 = "Aumentar SP" s3 = "Aumentar Força" s4 = "Aumentar Destreza" s5 = "Aumentar Agilidade" s6 = "Aumentar Inteligência" # Coloca dados da janela de comando @command_window = Window_Command.new(260, [s1, s2, s3, s4, s5, s6]) @command_window.x = 45 @command_window.y = 59 @command_window.z = 350 @command_window.opacity = 200 @command_window.active = true # Coloca dados dos Heróis @actor = $game_party.actors[@actor_index] @status_window = Window_Upgrade.new(@actor) @status_window.opacity= 200 @status_window.x = 304 @status_window.y = 59 # Coloca dados da Janela de aumento @raise_window = Window_Raise.new @raise_window.x = 46 @raise_window.y = 56 @raise_window.opacity = 200 @raise_window.visible = false # Coloca dados da Janela dos Heróis @actor_window = Window_ActorTab.new(@actor) @actor_window.x = 304 @actor_window.y = 0 @actor_window.opacity = 200 @actor_window.visible = true # Eu (Uchiha Sanosuke) Desativei essa janela, pois eu não # a achei necessária. Se você quiser ativá-la é só # tirar # da frente das linhas 103 a 108 # Coloca a Janela de comando #@controls_window = Window_Controls.new #@controls_window.opacity= 200 #@controls_window.x = 46 #@controls_window.y = 333 #@controls_window.visible = true # Graficos de Transição Graphics.transition # Loop Principal loop do # Atualização de Gráficos Graphics.update # Atualização do Input Input.update # Atualização update # Interromper Loop if $scene != self break end end # Preparar Transição Graphics.freeze # Desfazer as janelas @command_window.dispose @status_window.dispose @raise_window.dispose # Tb faz parte da janela que desativei, retire o # da #frente da linha a seguir. #@controls_window.dispose @spriteset.dispose @actor_window.dispose end end #-------------------------------------------------------------------------- # Atualização #-------------------------------------------------------------------------- def update @command_window.update @raise_window.update if Input.trigger?(Input::R) $game_system.se_play($data_system.cursor_se) @actor_index += 1 @actor_index %= $game_party.actors.size $scene = Scene_Upgrade.new(@actor_index) return end if Input.trigger?(Input::L) $game_system.se_play($data_system.cursor_se) @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size $scene = Scene_Upgrade.new(@actor_index) return end # Se o comando janela estiver ativo: chamar update_command if @command_window.active update_command return # Fim do IF end # Fim do Def end #================================= # *Comando de Atualização* #================================= def update_command @raise_window.update @spriteset.update if Input.trigger?(Input::B) # Tocar SE de cancelamento $game_system.se_play($data_system.cancel_se) # Carregar Mapa $scene = Scene_Map.new return end if Input.trigger?(Input::C) # Filiado ao cursor da Janela de Comando case @command_window.index when 0 if @actor.upgrade_points > 0 and @actor.maxhp < 9999 $game_system.se_play($data_system.decision_se) @actor.maxhp += Upgrade_Points::Hp_rise @actor.hp += Upgrade_Points::Hp_rise @actor.upgrade_points -= 1 @status_window.refresh @raise_window.visible = true else @raise_window.visible = false $game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound)) end when 1 if @actor.upgrade_points > 0 and @actor.maxsp < 9999 $game_system.se_play($data_system.decision_se) @actor.maxsp += Upgrade_Points::Sp_rise @actor.sp += Upgrade_Points::Sp_rise @actor.upgrade_points -= 1 @status_window.refresh @raise_window.visible = true else @raise_window.visible = false $game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound)) end when 2 if @actor.upgrade_points > 0 and @actor.str < 9999 $game_system.se_play($data_system.decision_se) @actor.str += Upgrade_Points::Str_rise @actor.upgrade_points -= 1 @status_window.refresh @raise_window.visible = true else @raise_window.visible = false $game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound)) end when 3 if @actor.upgrade_points > 0 and @actor.dex < 9999 $game_system.se_play($data_system.decision_se) @actor.dex += Upgrade_Points::Dex_rise @actor.upgrade_points -= 1 @status_window.refresh @raise_window.visible = true else @raise_window.visible = false $game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound)) end when 4 if @actor.upgrade_points > 0 and @actor.agi < 9999 $game_system.se_play($data_system.decision_se) @actor.agi += Upgrade_Points::Agi_rise @actor.upgrade_points -= 1 @status_window.refresh @raise_window.visible = true else @raise_window.visible = false $game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound)) end when 5 if @actor.upgrade_points > 0 and @actor.int < 9999 $game_system.se_play($data_system.decision_se) @actor.int += Upgrade_Points::Int_rise @actor.upgrade_points -= 1 @status_window.refresh @raise_window.visible = true else @raise_window.visible = false $game_system.se_play(RPG::AudioFile.new(Upgrade_Points::Error_sound)) end end end end #============================================================ # Começo das Janelas #============================================================
#================================= # *Janela de Status* #=================================
class Window_Upgrade < Window_Base def initialize(actor) super(32, 32, 315, 416) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = "Arial" # Fonte usada na Janela de aumento self.contents.font.size = 18 # Tamanho da fonte na Janela de aumento @actor = actor self.opacity = 200 refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_graphic(@actor, 122, 60) draw_actor_class(@actor, 176, 3) draw_actor_level(@actor, 6, 3) draw_actor_state(@actor, 95, 48) if @actor.upgrade_points >= 1 self.contents.font.color = system_color if @actor.hp < 9999 self.contents.draw_text(170, 70, 100, 100, "") end if @actor.sp < 9999 self.contents.draw_text(170, 94, 100, 100, "") end if @actor.str < 999 self.contents.draw_text(170, 158, 100, 100, "") end if @actor.dex < 999 self.contents.draw_text(170, 182, 100, 100, "") end if @actor.agi < 999 self.contents.draw_text(170, 206, 100, 100, "") end if @actor.int < 999 self.contents.draw_text(170, 230, 100, 100, "") end self.contents.font.color = normal_color @hp_preview = @actor.hp + Upgrade_Points::Hp_rise @mhp_preview = @actor.maxhp + Upgrade_Points::Hp_rise if @actor.hp < 9999 self.contents.draw_text(200, 70, 100, 100, "") end @sp_preview = @actor.sp + Upgrade_Points::Sp_rise @msp_preview = @actor.maxsp + Upgrade_Points::Sp_rise if @actor.sp < 9999 self.contents.draw_text(200, 94, 100, 100, "") end @str_preview = @actor.str + Upgrade_Points::Str_rise if @actor.str < 999 self.contents.draw_text(200, 158, 100, 100, "") end @dex_preview = @actor.dex + Upgrade_Points::Dex_rise if @actor.dex < 999 self.contents.draw_text(200, 182, 100, 100, "") end @agi_preview = @actor.agi + Upgrade_Points::Agi_rise if @actor.agi < 999 self.contents.draw_text(200, 206, 100, 100, "") end @int_preview = @actor.int + Upgrade_Points::Int_rise if @actor.int < 999 self.contents.draw_text(200, 230, 100, 100, "") end end draw_actor_hp(@actor, 4, 104, 172) draw_actor_sp(@actor, 4, 128, 172) draw_actor_exp(@actor, 4, 152) draw_actor_parameter(@actor, 4, 192, 3) draw_actor_parameter(@actor, 4, 216, 4) draw_actor_parameter(@actor, 4, 240, 5) draw_actor_parameter(@actor, 4, 264, 6) x = contents.text_size("Pontos:").width text = "Pontos:" text2 = "#{@actor.upgrade_points}" self.contents.font.color = system_color self.contents.draw_text(190, 360, x, 32, text) self.contents.font.color = normal_color self.contents.draw_text(200+x, 360, (self.width/2), 32, text2.to_s) end end
#-------------------------------------------------------------------------- # Janela de Aumento #-------------------------------------------------------------------------- class Window_Raise< Window_Base def initialize super(0, 0, 260, 60) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = "Arial" # Fonte usada na Janela de aumento self.contents.font.size = 21 # Tamanho da fonte na Janela de aumento refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 180, 30, "Atributo aumentado.") end end #=================================
#-------------------------------------------------------------------------- # Janela dos Heróis #-------------------------------------------------------------------------- class Window_ActorTab< Window_Base def initialize(actor) super(0, 0, 120, 60) @actor = actor self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = "Arial" # Fonte usada na Janela de aumento self.contents.font.size = 21 # Tamanho da fonte na Janela de aumento refresh end def refresh self.contents.clear draw_actor_name(@actor, 4, 3) end end #=================================
#-------------------------------------------------------------------------- # Controls Window #-------------------------------------------------------------------------- # Aqui faz parte daquela janela que retirei, retire # o # da frente das linhas 389 a 402 para ativá-la #----------------------------------------------------------------- #class Window_Controls < Window_Base #def initialize #super(0, 0, 260, 60) #self.contents = Bitmap.new(width - 32, height - 32) #self.contents.font.name = "Arial" # Font used in Raise Window #self.contents.font.size = 20 # Font Size in Raise Window #refresh #end #def refresh #self.contents.clear #self.contents.font.color = system_color #self.contents.draw_text(4, 0, 200, 30, "Q: Shift <- W: Shift-> ") #end #end #=================================
Última edição por Samuka_Adm em Dom Jul 15, 2012 9:48 pm, editado 1 vez(es) | |
|
Malandro.Maker Novato
Mensagens : 8 Pontos : 10 Reputação : 0 Data de inscrição : 24/06/2012
| Assunto: Re: Distribuir Pontos Dom Jun 24, 2012 2:16 pm | |
| aaah sim distribuir pontos, kkkk eu tinha esse script mais formatei o pc :/ | |
|
Samuka_Adm Admin
Medalhas :
Mensagens : 150 Pontos : 319 Reputação : 44 Data de inscrição : 15/06/2012
| Assunto: Re: Distribuir Pontos Seg Jul 02, 2012 12:13 am | |
| kk nome do tópico arrumado hashuoes já que vc formato o pc coloca eele dnv xD | |
|
Zeref Moderador
Mensagens : 49 Pontos : 112 Reputação : 7 Data de inscrição : 18/06/2012 Idade : 37 Localização : Rua Bolo Doce
| Assunto: Re: Distribuir Pontos Sex Jul 13, 2012 3:31 pm | |
| não é compatível com Netplay v4 master D: Que pena D: | |
|