🤔 Para Refletir : "Nunca desista se tiver uma ideia em mente, se tiver inicie-a." - Samuel Augusto

undefined method param for nil:nilclass [rpg maker vx ace]

Estado
Tópico fechado. Não é possível fazer postagens nela.
Membro Membro
Postagens
25
Bravecoins
0
Estou tentando fazer com que a barra de stamina do Advanced Dash Run by Raizen seja calculada pelo @actor.param(6)*20
mas isso acaba dando esse erro undefined method param for nil:nilclass

tambem estou usando [ACE] Sapphire Action System IV By Khas Arcthunder, Script de Pular Title by Raizen884 um pequeno script do Ventwig para mostrar status customizados no menu do personagem
 
o [member=1152]Hudell[/member] tinha te dito pra mudar o (6) da sua fórmula por [6] não? (Disse no chat hoje a tarde)

Veja se resolve, se tiver o link do script do raizen melhor ainda XD
Posta no tópico que a gente dá um jeito \o/
 
FelipeFalcon comentou:
o [member=1152]Hudell[/member] tinha te dito pra mudar o (6) da sua fórmula por [6] não? (Disse no chat hoje a tarde)

Veja se resolve, se tiver o link do script do raizen melhor ainda XD
Posta no tópico que a gente dá um jeito \o/

eu tinha tentando e continuou o erro, eu até tinha falado mas o chat tava muito movimentado XD

http://centrorpg.com/index.php?topic=2425.0 eu mudei algumas bobagens mas nada que daria esse erro eu acho
para elaborar: MaxVar = @actor.param(6) tentei de varias outras meneiras mas não tive conhecimento suficiente  :ksksks:
 
primeiro deu erro de comparação que eu resolvi com MaxVar =  $player_agil.to_f

blz, jogo abriu, barra nao subia, abri e fechei o menu e a hud foi algumas centenas de bit pra direita ficando só uma parte visiviel

TC0Bd
F4TQ5
 
Apaga então o código que te pedi pra colocar e copia e cola esse abaixo do move_by_input
Código:
alias add_var_move update
def update
  add_var_move
  $player_agil = $game_party.members[0].param(6)
end

Veja se dá alguma coisa. Passa seu script como está aí e as imagens que você usa, fica mais fácil pra eu testar XD
 
FelipeFalcon comentou:
Apaga então o código que te pedi pra colocar e copia e cola esse abaixo do move_by_input
Código:
alias add_var_move update
def update
  add_var_move
  $player_agil = $game_party.members[0].param(6)
end

Veja se dá alguma coisa. Passa seu script como está aí e as imagens que você usa, fica mais fácil pra eu testar XD

stack level too deep, vou ver aqui de te passar pera aew
 
Advanced Dash Run by Raizen

Código:
#=======================================================
#         Advanced Dash Run
# Autor: Raizen
# Compativel com: RMVXAce
# Função: O Script adiciona uma barra de stamina, que ao
# correr ela é diminuida, ao andar sobe lentamente e ao
# ficar parado sobe mais rapidamente. O script associa uma
# variável a stamina, portanto pode-se criar poções e outras 
# coisas baseadas na variável de stamina.
#========================================================


module Lune_Stamina
# Nome do arquivo da bar de stamina.(sempre entre aspas "")
# O Arquivo deve estar na pasta System, dentro de Graphics.
# Posição da hud em X
Lx = 250
# Posição da hud em Y
Ly = 300
# Variavel que controlará a stamina do jogador.
Variable = 5
# Valor máximo de stamina.
MaxVar =  $player_agil
# Valor que cai ao estar correndo.
Queda = 4
# Valor obtido ao andar.
Andar = 1
# Valor obtido ao ficar parado.
Stop = 2
# Atualização da hud, para fins de melhor perfomance, valor em frames.
# Quanto maior, menos atualização
Atualiza = 5
end



# Informações gerais do script
# Para fins de maior compatibilidade, mantenha esse script abaixo de todos
# os scripts adicionais, e acima do main.

#==============================================================
# Alias dos seguintes métodos.
# start         => Scene_Map
# update        => Scene_Map
# terminate     => Scene_Map

# dash?         => Game_Player
# move_by_imput => Game_Player

# Novo método.
# update_stamina_bar   => Scene_Map
#==============================================================
#==============================================================
# Aqui começa o script.
#==============================================================
class Scene_Map < Scene_Base
alias raizen_stamina_start start
alias raizen_stamina_update update
alias raizen_stamina_terminate terminate
  #--------------------------------------------------------------------------
  # * Inicialização do processo
  #--------------------------------------------------------------------------
  def start
    @stamina_hud = Sprite.new
    @stamina_hud.x = Lune_Stamina::Lx
    @stamina_hud.y = Lune_Stamina::Ly
    update_stamina_bar
    raizen_stamina_start
  end
  def update
    raizen_stamina_update
    update_stamina_bar if Graphics.frame_count % Lune_Stamina::Atualiza == 1
  end
  def update_stamina_bar
    if $game_variables[Lune_Stamina::Variable] > Lune_Stamina::MaxVar.to_f
    $game_variables[Lune_Stamina::Variable] = Lune_Stamina::MaxVar.to_f
    elsif $game_variables[Lune_Stamina::Variable] < Lune_Stamina::MaxVar.to_f
    $game_variables[Lune_Stamina::Variable] += Lune_Stamina::Andar if $game_player.moving? and !$game_player.dash?
    $game_variables[Lune_Stamina::Variable] += Lune_Stamina::Stop unless $game_player.moving?
  end
    calculate = ($game_variables[Lune_Stamina::Variable] * 100) / Lune_Stamina::MaxVar.to_f
    $game_map.screen.pictures[1].show('Barra de STM', 2, 205, 415, 100, calculate, 255, 0)
    $game_map.screen.pictures[1].move(2, 205, 415, 100, calculate, 255, 0, 60)
  end
end

class Game_Player < Game_Character
alias raizen_stamina_dash? dash?
alias raizen_stamina_move move_by_input
  def dash?
    return false if $game_variables[Lune_Stamina::Variable] <= 0
    raizen_stamina_dash?
  end
  def move_by_input
    alias add_var_move update
    def update
      add_var_move
      $player_agil = $game_party.members[0].param(6)
    end
    raizen_stamina_move
    $game_variables[Lune_Stamina::Variable] -= Lune_Stamina::Queda if dash?
    $game_variables[Lune_Stamina::Variable] = 0 if  $game_variables[Lune_Stamina::Variable] < 0
  end
end

Barra de Status by Ventwig

Código:
#------------------------
#Changed by Wesley Ronald
#------------------------
class Window_Status < Window_Selectable
  def draw_equipments(x, y)
    change_color(system_color)
    draw_text(x, y, 120, line_height, "Stamina")
    change_color(normal_color)
    draw_text(x + 120, y, 50, line_height, (@actor.param(6)*20).to_s.split(".")[0], 2)
      
    change_color(system_color)
    draw_text(x, y+line_height, 120, line_height, "STA Rate")
    change_color(normal_color)
    draw_text(x + 120, y+line_height, 50, line_height, (@actor.param(6)+100).to_s+"%".split(".")[0], 2)
  end
end

Script de Pular Title by Raizen884

Código:
#=======================================================
#         Script de Pular Title
# Autor: Raizen884
# Exclusividade da comunidade : www.centrorpgmaker.com
# O script fará com que vá direto ao primeiro mapa do jogo,
# útil para criar Titles feitas por eventos.
#=======================================================

class Scene_Title < Scene_Base
  def start
    super
    DataManager.setup_new_game
    $game_map.autoplay
    $game_map.update
    SceneManager.goto(Scene_Map)
  end
  def dispose_background
  end
  def dispose_foreground
  end
end
 
Era pra colar o código do falcon um pouco mais pra baixo, assim:

Código:
#=======================================================
#         Advanced Dash Run
# Autor: Raizen
# Compativel com: RMVXAce
# Função: O Script adiciona uma barra de stamina, que ao
# correr ela é diminuida, ao andar sobe lentamente e ao
# ficar parado sobe mais rapidamente. O script associa uma
# variável a stamina, portanto pode-se criar poções e outras 
# coisas baseadas na variável de stamina.
#========================================================


module Lune_Stamina
# Nome do arquivo da bar de stamina.(sempre entre aspas "")
# O Arquivo deve estar na pasta System, dentro de Graphics.
# Posição da hud em X
Lx = 250
# Posição da hud em Y
Ly = 300
# Variavel que controlará a stamina do jogador.
Variable = 5
# Valor máximo de stamina.
MaxVar =  $player_agil.to_f*20
# Valor que cai ao estar correndo.
Queda = 4
# Valor obtido ao andar.
Andar = 1
# Valor obtido ao ficar parado.
Stop = 2
# Atualização da hud, para fins de melhor perfomance, valor em frames.
# Quanto maior, menos atualização
Atualiza = 3
end


class Window_Status < Window_Selectable
  def draw_equipments(x, y)
    stamina_max = @actor.param(6)*20
    stamina = 0
    stamina_rec = @actor.param(6)
  end
end

# Informações gerais do script
# Para fins de maior compatibilidade, mantenha esse script abaixo de todos
# os scripts adicionais, e acima do main.

#==============================================================
# Alias dos seguintes métodos.
# start         => Scene_Map
# update        => Scene_Map
# terminate     => Scene_Map

# dash?         => Game_Player
# move_by_imput => Game_Player

# Novo método.
# update_stamina_bar   => Scene_Map
#==============================================================
#==============================================================
# Aqui começa o script.
#==============================================================
class Scene_Map < Scene_Base
alias raizen_stamina_start start
alias raizen_stamina_update update
alias raizen_stamina_terminate terminate
  #--------------------------------------------------------------------------
  # * Inicialização do processo
  #--------------------------------------------------------------------------
  def start
    @stamina_hud = Sprite.new
    @stamina_hud.x = Lune_Stamina::Lx
    @stamina_hud.y = Lune_Stamina::Ly
    update_stamina_bar
    raizen_stamina_start
  end
  def update
    raizen_stamina_update
    update_stamina_bar if Graphics.frame_count % Lune_Stamina::Atualiza == 1
  end
  def update_stamina_bar
    if $game_variables[Lune_Stamina::Variable] > Lune_Stamina::MaxVar
    $game_variables[Lune_Stamina::Variable] = Lune_Stamina::MaxVar
    elsif $game_variables[Lune_Stamina::Variable] < Lune_Stamina::MaxVar
    $game_variables[Lune_Stamina::Variable] += Lune_Stamina::Andar if $game_player.moving? and !$game_player.dash?
    $game_variables[Lune_Stamina::Variable] += Lune_Stamina::Stop unless $game_player.moving?
  end
    calculate = ($game_variables[Lune_Stamina::Variable] * 100) / Lune_Stamina::MaxVar
    $game_map.screen.pictures[1].show('Barra de STM', 2, 205, 415, 100, calculate, 255, 0)
    $game_map.screen.pictures[1].move(2, 205, 415, 100, calculate, 255, 0, 60)
  end
end

class Game_Player < Game_Character
alias raizen_stamina_dash? dash?
alias raizen_stamina_move move_by_input
  def dash?
  return false if $game_variables[Lune_Stamina::Variable] <= 0
  raizen_stamina_dash?
  end
  def move_by_input
    raizen_stamina_move
    $game_variables[Lune_Stamina::Variable] -= Lune_Stamina::Queda if dash?
    $game_variables[Lune_Stamina::Variable] = 0 if  $game_variables[Lune_Stamina::Variable] < 0
  end

    alias add_var_move update
    def update
      add_var_move
      $player_agil = $game_party.members[0].param(6)
    end
end
end
 
Não mudei nada do Heal nem do Damage, talvez eu tenha mudado algo do SAS IV principal mas acho dificil

SAS IV HUD

Código:
#-------------------------------------------------------------------------------
# * [ACE] SAS IV HUD
#-------------------------------------------------------------------------------
# * By Khas Arcthunder - arcthunder.site40.net
# * Version: 4.1 EN
# * Released on: 13/02/2012
#
#-------------------------------------------------------------------------------
# * Terms of Use
#-------------------------------------------------------------------------------
# Terms of Use – June 22, 2012
# 1. You must give credit to Khas;
# 2. All Khas scripts are licensed under a Creative Commons license
# 3. All Khas scripts are free for non-commercial projects. If you need some 
#    script for your commercial project, check bellow these terms which 
#    scripts are free and which scripts are paid for commercial use;
# 4. All Khas scripts are for personal use, you can use or edit for your own 
#    project, but you are not allowed to post any modified version;
# 5. You can’t give credit to yourself for posting any Khas script;
# 6. If you want to share a Khas script, don’t post the script or the direct 
#    download link, please redirect the user to http://arcthunder.site40.net/
# 7. You are not allowed to convert any of Khas scripts to another engine, 
#    such converting a RGSS3 script to RGSS2 or something of that nature.
# 8. Its your obligation (user) to check these terms on the date you release 
#    your game. Your project must follow them correctly.
#
# Free commercial use scripts:
# - Sapphire Action System IV (RPG Maker VX Ace)
# - Awesome Light Effects (RPG Maker VX Ace)
# - Pixel movement (RPG Maker VX e RPG Maker VX Ace)
# - Sprite & Window Smooth Sliding (RPG Maker VX e RPG Maker VX Ace)
# - Pathfinder (RPG Maker VX Ace)
#
# Check all the terms at http://arcthunder.site40.net/terms/
#
#-------------------------------------------------------------------------------
# * Features
#-------------------------------------------------------------------------------
# Optimized SAS IV HUD.
#
#-------------------------------------------------------------------------------
# * Configuration
#-------------------------------------------------------------------------------
module HUD_Core
  Background_Name = "hud_bg"
  Contents_Width = 600
  Contents_Height = 550
  Font_Size = 16
  Font_Name = "Verdana"
  Font_Color =  Color.new(255,255,255)
  Font_Bold = true
  Font_Italic = false
  No_Skill_Icon = 117
  Health_X = 219
  Health_Y = 415
  Health_Width = 10
  Health_Height = 64
  Health_Color = Color.new(255,0,0)
  Exp_X = 390
  Exp_Y = 411
  Exp_Width = 150
  Exp_Height = 3
  Exp_Color = Color.new(0,255,255)
  Magic_X = 319
  Magic_Y = 415
  Magic_Width = 10
  Magic_Height = 64
  Magic_Color = Color.new(10,0,220)
  Name_X = 76
  Name_Y = 20
  Spell_X = 444
  Spell_Y = 20
  Icon_X = 498
  Icon_Y = 28
  Level_X = 10
  Level_Y = 60
  Level_String = "Lv "
end
#-------------------------------------------------------------------------------
# * Register
#-------------------------------------------------------------------------------
if $khas_awesome.nil? 
  $khas_awesome = []
end
scripts = []
$khas_awesome.each { |script| scripts << script[0] }
unless scripts.include?("Sapphire Action System")
  error = Sprite.new
  error.bitmap = Bitmap.new(544,416)
  error.bitmap.draw_text(0,208,544,32,"Please install the Sapphire Action System IV",1)
  continue = Sprite.new
  continue.bitmap = Bitmap.new(544,416)
  continue.bitmap.font.color = Color.new(0,255,0)
  continue.bitmap.font.size = error.bitmap.font.size - 3
  continue.bitmap.draw_text(0,384,544,32,"Tecle ENTER para sair",1)
  add = Math::PI/80; max = 2*Math::PI; angle = 0
  loop do
    Graphics.update; Input.update
    angle += add; angle %= max
    continue.opacity = 185 + 70* Math.cos(angle)
    break if Input.trigger?(Input::C)
  end
  error.bitmap.dispose; continue.bitmap.dispose
  error.bitmap = nil; continue.bitmap = nil
  error.dispose; continue.dispose
  error = nil; continue = nil
  exit
end

$khas_awesome << ["SAS HUD",4.0]

#-------------------------------------------------------------------------------
# * Script
#-------------------------------------------------------------------------------

class Sapphire_Hud
  include HUD_Core
  def initialize
    @contents = Sprite.new
    @background = Sprite.new
    @base = Sprite.new
    @contents.bitmap = Bitmap.new(Contents_Width, Contents_Height)
    @base.bitmap = Bitmap.new(Contents_Width, Contents_Height)
    @background.bitmap = Cache.system(Background_Name)
    @base.bitmap.font.bold = Font_Bold
    @base.bitmap.font.italic = Font_Italic
    @base.bitmap.font.size = Font_Size
    @base.bitmap.font.color = Font_Color
    @base.bitmap.font.name = Font_Name
    @contents.z = 210
    @background.z = 0
    @base.z = 220
    @locked = false
    hide(true)
  end
  def refresh_bars(current_hp=@actor.hp)
    return if @hidden
    hp = ((current_hp)*100)/@actor.mhp
    mp = (@actor.mp*100)/@actor.mmp
    exp = ((@actor.exp-@actor.current_level_exp)*Exp_Width)/(@actor.next_level_exp-@actor.current_level_exp)
    @contents.bitmap.clear
    
    $game_map.screen.pictures[2].show('Barra de HP', 2, Health_X,Health_Y, 100, hp, 255, 0)
    $game_map.screen.pictures[2].move(2, Health_X,Health_Y, 100, hp, 255, 0, 60)
    
    $game_map.screen.pictures[3].show('Barra de MP', 2, Magic_X,Magic_Y, 100, mp, 255, 0)
    $game_map.screen.pictures[3].move(2, Magic_X,Magic_Y, 100, mp, 255, 0, 60)
    
    @contents.bitmap.fill_rect(Exp_X,Exp_Y,exp,Exp_Height,Exp_Color)
  end
  def refresh_base
    return if @hidden
    @base.bitmap.clear
    @actor = $game_party.members[0]
    skill = $game_player.current_skill[0]
    @base.bitmap.draw_text(Name_X, Name_Y,100,Font_Size+4,@actor.name)
    @base.bitmap.draw_text(Level_X, Level_Y,64,Font_Size+4,Level_String+@actor.level.to_s,1)
    temp = Cache.system("Iconset")
    unless skill.nil?
      @base.bitmap.draw_text(Spell_X,Spell_Y,68,Font_Size+4,skill.name)
      @base.bitmap.blt(Icon_X,Icon_Y,temp,Rect.new(skill.icon_index%16*24,skill.icon_index/16*24,24,24))
    else
      @base.bitmap.blt(Icon_X,Icon_Y,temp,Rect.new(No_Skill_Icon%16*24,No_Skill_Icon/16*24,24,24))
    end
    temp.dispose
    temp = nil
  end
  def hide(lock=false)
    unless @background.nil?
      @background.bitmap.dispose
      @background.dispose
      @background = nil
    end
    unless @base.nil?
      @base.bitmap.dispose
      @base.dispose
      @base = nil
    end
    unless @contents.nil?
      @contents.bitmap.dispose
      @contents.dispose
      @contents = nil
    end
    @hidden = true
    @locked = lock unless @locked
  end
  def show(unlock=false)
    @actor = $game_party.members[0]
    return if @locked && !unlock
    @contents = Sprite.new
    @background = Sprite.new
    @base = Sprite.new
    @contents.bitmap = Bitmap.new(Contents_Width, Contents_Height)
    @base.bitmap = Bitmap.new(Contents_Width, Contents_Height)
    @background.bitmap = Cache.system(Background_Name)
    @base.bitmap.font.bold = Font_Bold
    @base.bitmap.font.italic = Font_Italic
    @base.bitmap.font.size = Font_Size
    @base.bitmap.font.color = Font_Color
    @base.bitmap.font.name = Font_Name
    @contents.z = 210
    @background.z = 0
    @base.z = 220
    @hidden = false
    refresh_base
    refresh_bars
    @locked = false
  end
end

SAS IV - Multiple Actors

Código:
#-------------------------------------------------------------------------------
# * [ACE] SAS IV Multiple Actors
#-------------------------------------------------------------------------------
# * By Khas Arcthunder - arcthunder.site40.net
# * Version: 4.2 EN
# * Released on: 11/07/2012
#
#-------------------------------------------------------------------------------
# * Terms of Use
#-------------------------------------------------------------------------------
# Terms of Use – June 22, 2012
# 1. You must give credit to Khas;
# 2. All Khas scripts are licensed under a Creative Commons license
# 3. All Khas scripts are free for non-commercial projects. If you need some 
#    script for your commercial project, check bellow these terms which 
#    scripts are free and which scripts are paid for commercial use;
# 4. All Khas scripts are for personal use, you can use or edit for your own 
#    project, but you are not allowed to post any modified version;
# 5. You can’t give credit to yourself for posting any Khas script;
# 6. If you want to share a Khas script, don’t post the script or the direct 
#    download link, please redirect the user to http://arcthunder.site40.net/
# 7. You are not allowed to convert any of Khas scripts to another engine, 
#    such converting a RGSS3 script to RGSS2 or something of that nature.
# 8. Its your obligation (user) to check these terms on the date you release 
#    your game. Your project must follow them correctly.
#
# Free commercial use scripts:
# - Sapphire Action System IV (RPG Maker VX Ace)
# - Awesome Light Effects (RPG Maker VX Ace)
# - Pixel movement (RPG Maker VX e RPG Maker VX Ace)
# - Sprite & Window Smooth Sliding (RPG Maker VX e RPG Maker VX Ace)
# - Pathfinder (RPG Maker VX Ace)
#
# Check all the terms at http://arcthunder.site40.net/terms/
#
#-------------------------------------------------------------------------------
# * Features
#-------------------------------------------------------------------------------
# This script enables the changing of actors, so you can change both voice
# and graphic files (for SAS IV HUD).
# 
#-------------------------------------------------------------------------------
# * Instructions
#-------------------------------------------------------------------------------
# Paste this script below SAS IV and below SAS IV HUD (if you're using the
# SAS IV default HUD). When changing actors, call the following script:
# Multiple_Core.refresh
#-------------------------------------------------------------------------------
# * Configuration
#-------------------------------------------------------------------------------

module Multiple_Core
  
  Multiple_Voice = true
  
  Multiple_Graphics = true
  
  Voice_Files = {
  # Voice hash. Use the following form:
  # actor_id => [voicefile1,voicefile2,voicefile3,...],
  
  1 => ["khas_voice_1","khas_voice_2","khas_voice_3","khas_voice_4","khas_voice_5","khas_voice_6"],
  2 => ["sapphire_voice_1","sapphire_voice_2","sapphire_voice_3","sapphire_voice_4","sapphire_voice_5","sapphire_voice_6","sapphire_voice_7"]
  
  # End of Voice hash.
  }
  
  Graphic_Files = {
  # Graphic hash. Use the following form:
  # actor_id => graphic_name,
  
  1 => "HUD 2",
  2 => "sapphire_bg",
  
  # End of Graphic hash.
  
  }
  
  def self.refresh
    $game_map.sas_hud.hide
    $game_map.sas_hud.show
    $game_player.next_skill
    $game_player.refresh_weapon_stats
    SceneManager.scene.spriteset.refresh_weapon rescue return
  end
end

if $khas_awesome.nil? 
  $khas_awesome = []
end
scripts = []
$khas_awesome.each { |script| scripts << script[0] }
unless scripts.include?("Sapphire Action System")
  error = Sprite.new
  error.bitmap = Bitmap.new(544,416)
  error.bitmap.draw_text(0,208,544,32,"Please install the Sapphire Action System IV",1)
  continue = Sprite.new
  continue.bitmap = Bitmap.new(544,416)
  continue.bitmap.font.color = Color.new(0,255,0)
  continue.bitmap.font.size = error.bitmap.font.size - 3
  continue.bitmap.draw_text(0,384,544,32,"Tecle ENTER para sair",1)
  add = Math::PI/80; max = 2*Math::PI; angle = 0
  loop do
    Graphics.update; Input.update
    angle += add; angle %= max
    continue.opacity = 185 + 70* Math.cos(angle)
    break if Input.trigger?(Input::C)
  end
  error.bitmap.dispose; continue.bitmap.dispose
  error.bitmap = nil; continue.bitmap = nil
  error.dispose; continue.dispose
  error = nil; continue = nil
  exit
end

$khas_awesome << ["SAS MULTIPLE",4.2]

class Scene_Map <  Scene_Base
  attr_accessor :spriteset
end

if Multiple_Core::Multiple_Voice
  class Game_Player < Game_Character
    def play_voice
      v = $game_party.members[0].id
      RPG::SE.new(Multiple_Core::Voice_Files[v][rand(Multiple_Core::Voice_Files[v].size)],Sapphire_Core::Voice_Volume).play 
    end
  end
end

if Multiple_Core::Multiple_Graphics && scripts.include?("SAS HUD")
  class Sapphire_Hud
    def initialize
      @contents = Sprite.new
      @background = Sprite.new
      @base = Sprite.new
      @contents.bitmap = Bitmap.new(Contents_Width, Contents_Height)
      @base.bitmap = Bitmap.new(Contents_Width, Contents_Height)
      @background.bitmap = Bitmap.new(1,1)
      @base.bitmap.font.bold = Font_Bold
      @base.bitmap.font.italic = Font_Italic
      @base.bitmap.font.size = Font_Size
      @base.bitmap.font.color = Font_Color
      @base.bitmap.font.name = Font_Name
      @contents.z = 210
      @background.z = 0
      @base.z = 220
      @locked = false
      hide(true)
    end
    def show(unlock=false)
      @actor = $game_party.members[0]
      return if @locked && !unlock
      @contents = Sprite.new
      @background = Sprite.new
      @base = Sprite.new
      @contents.bitmap = Bitmap.new(Contents_Width, Contents_Height)
      @base.bitmap = Bitmap.new(Contents_Width, Contents_Height)
      refresh_background
      @base.bitmap.font.bold = Font_Bold
      @base.bitmap.font.italic = Font_Italic
      @base.bitmap.font.size = Font_Size
      @base.bitmap.font.color = Font_Color
      @base.bitmap.font.name = Font_Name
      @contents.z = 210
      @background.z = 0
      @base.z = 220
      @hidden = false
      refresh_base
      refresh_bars
      @locked = false
    end
    def refresh_background
      @background.bitmap = Cache.system(Multiple_Core::Graphic_Files[@actor.id])
    end
  end
end
 
Angelo Nobre comentou:
Wesley evite Double-post da próxima vez. Use o EDITE caso precise.

Foi mal Angelo, eu tinha postado tudo de uma vez mas acho que só o SAS IV ja passava do limite.. tbm tava meio desnutrido e desorientado kkkkk vou tentar tomar mais cuidado na hora de postar

Pessoal resolvi o problema da stamina e vo colar o codigo aqui caso alguem queira dar uma olhada
edit: problema 2 tbm resolvido, se eu precisar abro outro topico

Advanced Dash Run by Raizen
Código:
#=======================================================
#         Advanced Dash Run
# Autor: Raizen
# Compativel com: RMVXAce
# Função: O Script adiciona uma barra de stamina, que ao
# correr ela é diminuida, ao andar sobe lentamente e ao
# ficar parado sobe mais rapidamente. O script associa uma
# variável a stamina, portanto pode-se criar poções e outras 
# coisas baseadas na variável de stamina.
#========================================================


module Lune_Stamina
# Nome do arquivo da bar de stamina.(sempre entre aspas "")
# O Arquivo deve estar na pasta System, dentro de Graphics.
# Posição da hud em X
Lx = 250
# Posição da hud em Y
Ly = 300
# Variavel que controlará a stamina do jogador.
Variable = 5
# Valor máximo de stamina.
MaxVar =  $player_agil.to_f*20
# Valor que cai ao estar correndo.
Queda = 4
# Valor obtido ao andar.
Andar = 1
# Valor obtido ao ficar parado.
Stop = 2
# Atualização da hud, para fins de melhor perfomance, valor em frames.
# Quanto maior, menos atualização
Atualiza = 5
end



# Informações gerais do script
# Para fins de maior compatibilidade, mantenha esse script abaixo de todos
# os scripts adicionais, e acima do main.

#==============================================================
# Alias dos seguintes métodos.
# start         => Scene_Map
# update        => Scene_Map
# terminate     => Scene_Map

# dash?         => Game_Player
# move_by_imput => Game_Player

# Novo método.
# update_stamina_bar   => Scene_Map
#==============================================================
#==============================================================
# Aqui começa o script.
#==============================================================
class Scene_Map < Scene_Base
alias raizen_stamina_start start
alias raizen_stamina_update update
alias raizen_stamina_terminate terminate
  #--------------------------------------------------------------------------
  # * Inicialização do processo
  #--------------------------------------------------------------------------
  def start
    @stamina_hud = Sprite.new
    @stamina_hud.x = Lune_Stamina::Lx
    @stamina_hud.y = Lune_Stamina::Ly
    update_stamina_bar
    raizen_stamina_start
  end
  def update
    raizen_stamina_update
    update_stamina_bar if Graphics.frame_count % Lune_Stamina::Atualiza == 1
  end
  def update_stamina_bar
    if $game_variables[Lune_Stamina::Variable] > $max_stamina.to_f
    $game_variables[Lune_Stamina::Variable] = $max_stamina.to_f
    elsif $game_variables[Lune_Stamina::Variable] < $max_stamina.to_f
    $game_variables[Lune_Stamina::Variable] += Lune_Stamina::Andar if $game_player.moving? and !$game_player.dash?
    $game_variables[Lune_Stamina::Variable] += Lune_Stamina::Stop unless $game_player.moving?
  end
    calculate = ($game_variables[Lune_Stamina::Variable] * 100) /  $max_stamina.to_f
    $game_map.screen.pictures[1].show('Barra de STM', 2, 205, 415, 100, calculate, 255, 0)
    $game_map.screen.pictures[1].move(2, 205, 415, 100, calculate, 255, 0, 60)
  end
end

class Game_Player < Game_Character
alias raizen_stamina_dash? dash?
alias raizen_stamina_move move_by_input
  def dash?
    return false if $game_variables[Lune_Stamina::Variable] <= 0
    raizen_stamina_dash?
  end
  def move_by_input
    raizen_stamina_move
    $game_variables[Lune_Stamina::Variable] -= Lune_Stamina::Queda if dash?
    $game_variables[Lune_Stamina::Variable] = 0 if  $game_variables[Lune_Stamina::Variable] < 0
  end
  alias add_var_move update
  def update
    add_var_move
    $max_stamina = (($game_party.members[0].param(6).to_f)*20)
    $stamina_rate = $game_party.members[0].param(6).to_f
  end
end

Ventwig
Código:
#------------------------
#Changed by Wesley Ronald
#------------------------
class Window_Status < Window_Selectable
  def draw_equipments(x, y)
    change_color(system_color)
    draw_text(x, y, 120, line_height, "Stamina")
    change_color(normal_color)
    draw_text(x + 120, y, 50, line_height, ($max_stamina.to_f).to_s.split(".")[0], 2)
      
    change_color(system_color)
    draw_text(x, y+line_height, 120, line_height, "STA Rate")
    change_color(normal_color)
    draw_text(x + 120, y+line_height, 50, line_height, ($stamina_rate.to_f+100).to_s+"%".split(".")[0], 2)
  end
end
 
Estado
Tópico fechado. Não é possível fazer postagens nela.
Voltar
Topo