Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Zamknięty przez: Ayene
Pią 24 Gru, 2010 12:22
Mała edycja skryptu.
Autor Wiadomość
MicroSeven 



Preferowany:
RPG Maker XP

Dołączył: 02 Lis 2010
Posty: 12
Wysłany: Nie 28 Lis, 2010 12:27
Mała edycja skryptu.
Cześć, potrzebuję edycji skryptu, by za pojawiającym się okienku było takie tło jak w skrypcie zamieszczonym w tym temacie : http://www.rmxp.pl/index.php?topic=5357.0
Chcę aby windowskin miał identyczną jak w demie przeźroczystość, tak samo jak tło.

Skrypt do edycji:
Kod:
#==============================================================================
# Requiem Upgrade
#==============================================================================

Points_Gained = 10 # Points that hero will gain when level-up

#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
  attr_accessor :points
  alias requiem_upgwnd_setup setup
  def setup(actor_id)
    requiem_upgwnd_setup(actor_id)
    @points = 0
  end
  def exp=(exp)
    @exp = [[exp, 9999999].min, 0].max
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1
      @points += Points_Gained     
      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
#------------------------------------------------------------------------------
class Requiem_UpgradeWindow < Window_Base
 
  def initialize(actor)
    super(0,0,320,320)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    update
  end
 
  def update
    self.contents.clear
    draw_actor_graphic(@actor,50,90)
    draw_actor_name(@actor,0,0)
    self.contents.font.color = normal_color
    self.contents.draw_text(224,0,64,32,@actor.level.to_s)
    self.contents.draw_text(224,32,64,32,@actor.points.to_s)
    self.contents.draw_text(128,32*3,96,32,@actor.maxhp.to_s)
    self.contents.draw_text(128,32*4,96,32,@actor.maxsp.to_s)
    self.contents.draw_text(128,32*5,96,32,@actor.str.to_s)
    self.contents.draw_text(128,32*6,96,32,@actor.dex.to_s)
    self.contents.draw_text(128,32*7,96,32,@actor.agi.to_s)
    self.contents.draw_text(128,32*8,96,32,@actor.int.to_s)
    refresh
  end
 
  def refresh   
    self.contents.font.color = system_color
    self.contents.draw_text(128,0,128,32,"Poziom:")
    self.contents.draw_text(128,32,128,32,"Punkty:")
    self.contents.draw_text(0,32*3,128,32,"PŻ:")
    self.contents.draw_text(0,32*4,128,32,"PM:")
    self.contents.draw_text(0,32*5,128,32,"Siła:")
    self.contents.draw_text(0,32*6,128,32,"Zręczność:")
    self.contents.draw_text(0,32*7,128,32,"Zwinność:")
    self.contents.draw_text(0,32*8,128,32,"Mądrość:")
  end
end
#------------------------------------------------------------------------------
class Scene_RequiemUpgrade
 
  def initialize(actor_index=0, from_menu=false)   
    @actor_index = actor_index
    @from_menu = from_menu
  end
 
  def main   
    @spriteset = Spriteset_Map.new
    @actor = $game_party.actors[@actor_index]
    @requiem_upgwindow = Requiem_UpgradeWindow.new(@actor)
    @requiem_upgwindow.x = (640 - @requiem_upgwindow.width) / 2
    @requiem_upgwindow.y = (480 - @requiem_upgwindow.height) / 2
    @requiem_upgcmdwnd  = Window_Command.new(64,[" +"," +"," +"," +"," +"," +"])
    @requiem_upgcmdwnd.index = 0
    @requiem_upgcmdwnd.x = @requiem_upgwindow.x + 192
    @requiem_upgcmdwnd.y = @requiem_upgwindow.y + 96
    @requiem_upgcmdwnd.opacity = 0   
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze   
    @requiem_upgwindow.dispose
    @requiem_upgcmdwnd.dispose
    @spriteset.dispose
  end 
 
  def update     
    @requiem_upgwindow.update
    @requiem_upgcmdwnd.update
    @spriteset.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_RequiemUpgrade.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_RequiemUpgrade.new(@actor_index)
      return
    end
   
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      if @from_menu
        $scene = Scene_Menu.new(4)
      else
        $scene = Scene_Map.new
      end
      return
    end   
   
    if Input.trigger?(Input::C)
      if @actor.points > 0
        $game_system.se_play($data_system.decision_se)
      else
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @requiem_upgcmdwnd.index
      when 0
        @actor.points -= 1
        @actor.maxhp += 10
      when 1
        @actor.points -= 1
        @actor.maxsp += 10
      when 2
        @actor.points -= 1
        @actor.str += 1
      when 3
        @actor.points -= 1
        @actor.dex += 1
      when 4
        @actor.points -= 1
        @actor.agi += 1
      when 5
        @actor.points -= 1
        @actor.int += 1
      end
      return
    end
  end   
end

class Scene_Map
  alias ayene_scmap_update update 
  def update
    ayene_scmap_update
    if $game_party.actors.any? {|actor| actor.points > 0}
      $scene = Scene_RequiemUpgrade.new(0)
    end
  end
end
 
 
Sabikku 




Nagrody:
UF i UFT2 Winner

Ranga RM:
4 gry

Pomógł: 73 razy
Dołączył: 04 Kwi 2010
Posty: 428
Wysłany: Nie 28 Lis, 2010 15:01
Check it out.
Spoiler:

Kod:
#==============================================================================
# Requiem Upgrade
#==============================================================================

Points_Gained = 10 # Points that hero will gain when level-up

#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
  attr_accessor :points
  alias requiem_upgwnd_setup setup
  def setup(actor_id)
    requiem_upgwnd_setup(actor_id)
    @points = 0
  end
  def exp=(exp)
    @exp = [[exp, 9999999].min, 0].max
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1
      @points += Points_Gained     
      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
#------------------------------------------------------------------------------
class Requiem_UpgradeWindow < Window_Base
 
  def initialize(actor)
    super(0,0,320,320)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 200
    @actor = actor
    update
  end
 
  def update
    self.contents.clear
    draw_actor_graphic(@actor,50,90)
    draw_actor_name(@actor,0,0)
    self.contents.font.color = normal_color
    self.contents.draw_text(224,0,64,32,@actor.level.to_s)
    self.contents.draw_text(224,32,64,32,@actor.points.to_s)
    self.contents.draw_text(128,32*3,96,32,@actor.maxhp.to_s)
    self.contents.draw_text(128,32*4,96,32,@actor.maxsp.to_s)
    self.contents.draw_text(128,32*5,96,32,@actor.str.to_s)
    self.contents.draw_text(128,32*6,96,32,@actor.dex.to_s)
    self.contents.draw_text(128,32*7,96,32,@actor.agi.to_s)
    self.contents.draw_text(128,32*8,96,32,@actor.int.to_s)
    refresh
  end
 
  def refresh   
    self.contents.font.color = system_color
    self.contents.draw_text(128,0,128,32,"Poziom:")
    self.contents.draw_text(128,32,128,32,"Punkty:")
    self.contents.draw_text(0,32*3,128,32,"PŻ:")
    self.contents.draw_text(0,32*4,128,32,"PM:")
    self.contents.draw_text(0,32*5,128,32,"Siła:")
    self.contents.draw_text(0,32*6,128,32,"Zręczność:")
    self.contents.draw_text(0,32*7,128,32,"Zwinność:")
    self.contents.draw_text(0,32*8,128,32,"Mądrość:")
  end
end
#------------------------------------------------------------------------------
class Scene_RequiemUpgrade
 
  def initialize(actor_index=0, from_menu=false)   
    @actor_index = actor_index
    @from_menu = from_menu
  end
 
  def main   
    @spriteset = Spriteset_Map.new
    @tlo = Sprite.new
    @tlo.bitmap = RPG::Cache.picture("fantasy_background")
    @tlo.opacity = 150
    @actor = $game_party.actors[@actor_index]
    @requiem_upgwindow = Requiem_UpgradeWindow.new(@actor)
    @requiem_upgwindow.x = (640 - @requiem_upgwindow.width) / 2
    @requiem_upgwindow.y = (480 - @requiem_upgwindow.height) / 2
    @requiem_upgcmdwnd  = Window_Command.new(64,[" +"," +"," +"," +"," +"," +"])
    @requiem_upgcmdwnd.index = 0
    @requiem_upgcmdwnd.x = @requiem_upgwindow.x + 192
    @requiem_upgcmdwnd.y = @requiem_upgwindow.y + 96
    @requiem_upgcmdwnd.opacity = 0   
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze   
    @requiem_upgwindow.dispose
    @requiem_upgcmdwnd.dispose
    @spriteset.dispose
    @tlo.dispose
  end 
 
  def update     
    @requiem_upgwindow.update
    @requiem_upgcmdwnd.update
    @spriteset.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_RequiemUpgrade.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_RequiemUpgrade.new(@actor_index)
      return
    end
   
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      if @from_menu
        $scene = Scene_Menu.new(4)
      else
        $scene = Scene_Map.new
      end
      return
    end   
   
    if Input.trigger?(Input::C)
      if @actor.points > 0
        $game_system.se_play($data_system.decision_se)
      else
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @requiem_upgcmdwnd.index
      when 0
        @actor.points -= 1
        @actor.maxhp += 10
      when 1
        @actor.points -= 1
        @actor.maxsp += 10
      when 2
        @actor.points -= 1
        @actor.str += 1
      when 3
        @actor.points -= 1
        @actor.dex += 1
      when 4
        @actor.points -= 1
        @actor.agi += 1
      when 5
        @actor.points -= 1
        @actor.int += 1
      end
      return
    end
  end   
end

class Scene_Map
  alias ayene_scmap_update update 
  def update
    ayene_scmap_update
    if $game_party.actors.any? {|actor| actor.points > 0}
      $scene = Scene_RequiemUpgrade.new(0)
    end
  end
end

 
 
 
Wyświetl posty z ostatnich:   
Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene