设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 15753|回复: 15
打印 上一主题 下一主题

[RMVX发布] ~~RMVX升级提示~~~

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
22 小时
注册时间
2006-4-22
帖子
370
跳转到指定楼层
1
发表于 2008-2-21 23:14:09 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
这是我刚发布的游戏拉尔夫战记里的副产品,基本不与没修改过升级显示的战斗系统冲突,(据我所知,在默认的,我的那个朴素横版,还有半即时横版,还有柳柳放出的那个百分之45的战斗系统中都可以正常使用!),而且在事件中升级也能选择是否在地图上显示,但降级不显示,{/gg}因为我比较懒,不过算法方面为了实现效果不择手段,算法有点orz,这个关系应该不大~~~~因为缺少充分测试,bug未知!由于修改Scene_map所以与地图名显示脚本可能有冲突,不过你不在地图上升级也没关系,像我游戏里就没整合进去,不过这里我附送一个兼容我自己写的地名显示的版本!

使用说明:把下面这幅图片复制到system文件夹命名为:箭头


补充:忘了说那个地图脚本的用法,如果你有用那个脚本,要显示地名时打开25号开关就行了,如果不想用25号,就在脚本开头找到25的数字改为你想要的!

截图:



一般版本:
  1. #=======================================================================
  2. #★升级提示★
  3. #-----------------------------------------------------------------------
  4. #★作者: Zhong_zw
  5. #★联系方式:66RPG.com论坛短信 或 [email protected]
  6. #=======================================================================
  7. class Game_Actor < Game_Battler

  8.   attr_accessor :last_level   
  9.    def initialize(actor_id)
  10.     super()
  11.     setup(actor_id)
  12.     @last_level = 0
  13.     @last_skill_id = 0
  14.    end
  15.    def last_atk
  16.     return actor.parameters[2,@last_level]
  17.   end
  18.   def last_def
  19.     return actor.parameters[3,@last_level]
  20.   end
  21.   def last_spi
  22.     return actor.parameters[4,@last_level]
  23.   end
  24.   def last_agi
  25.     return actor.parameters[5,@last_level]
  26.    end
  27.   def now_atk
  28.     return actor.parameters[2,@level]
  29.   end
  30.   def now_def
  31.     return actor.parameters[3,@level]
  32.   end
  33.   def now_spi
  34.     return actor.parameters[4,@level]
  35.   end
  36.   def now_agi
  37.     return actor.parameters[5,@level]
  38.   end  
  39.    def change_exp(exp, show)
  40.     @last_level = @level
  41.     last_skills = skills
  42.    
  43.     @exp = [[exp, 9999999].min, 0].max
  44.    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  45.       level_up
  46.     end
  47.     while @exp < @exp_list[@level]
  48.       level_down
  49.     end
  50.     @hp = [@hp, maxhp].min
  51.     @mp = [@mp, maxmp].min
  52.     if show and @level > last_level
  53.       
  54.       zhonglevelup_push(skills - last_skills)
  55.     end
  56.   end
  57.    #==========================================================================
  58.   #★角色升级显示
  59.   #==========================================================================
  60.   
  61.   def zhonglevelup_push(new_skills)
  62.    
  63.     text = [@actor_id,new_skills]
  64.     $game_temp.levelup_texts.push(text)
  65.   end
  66. end



  67. class Scene_Battle < Scene_Base

  68. def display_level_up
  69.     exp = $game_troop.exp_total
  70.     $game_party.remove_states_battle
  71.     @message_window.contents_opacity = 0
  72.     @message_window.opacity = 0
  73.     @levelup_window = Window_zhonglevelup.new
  74.     for actor in $game_party.existing_members
  75.       last_level = actor.level
  76.       last_skills = actor.skills
  77.       actor.gain_exp(exp, true)
  78.     end
  79.    
  80.     update_zhonglevelup
  81.    
  82.    
  83.   end
  84.   #==========================================================================
  85.   #★等待升级窗口刷新
  86.   #==========================================================================
  87.    def update_zhonglevelup
  88.       @levelup_window.update
  89.      while @levelup_window.visible
  90.        @levelup_window.update
  91.        Graphics.update
  92.        Input.update
  93.      end
  94.    end
  95.    
  96. end   

  97. class Game_Temp
  98.     attr_accessor :levelup_texts
  99.   #--------------------------------------------------------------------------
  100.   # ● オブジェクト初期化
  101.   #--------------------------------------------------------------------------
  102.   alias oldinitialize initialize
  103.   def initialize
  104.     @levelup_texts = []
  105.     oldinitialize
  106.   end  
  107.   
  108. end


  109. class Window_zhonglevelup < Window_Base

  110.   attr_accessor :index
  111.   def initialize
  112.     super(122, 15, 350, 345)
  113.     $game_temp.levelup_texts = []
  114.     @index = 0
  115.     @skill_index = 0
  116.     @skill_window = Window_Base.new(122,23,260,36)
  117.     @skill_window.opacity = 0
  118.     @skill_window.z = self.z - 1
  119.     @main_window = Window_Base.new(122,59,260,290)
  120.     @main_window.opacity = 0
  121.     @main_window.z = self.z - 1
  122.    
  123.     self.opacity = 0
  124.     self.visible = false
  125.    
  126.     #update
  127.    
  128.    end
  129.   
  130.   
  131.   #--------------------------------------------------------------------------
  132.   # ★ $game_temp.levelup_texts = [角色id,新特技]
  133.   #--------------------------------------------------------------------------
  134.   def update
  135.    
  136.    
  137.     zhonginputupdate if @index <= $game_temp.levelup_texts.size-1
  138.      
  139.     if @index <= $game_temp.levelup_texts.size-1      
  140.       
  141.       self.visible = true
  142.       @main_window.opacity = 150
  143.       actor = $game_actors[$game_temp.levelup_texts[@index][0]]
  144.       if @skill_index == 0 and $game_temp.levelup_texts[@index][1].size != 0
  145.         @skill_index = $game_temp.levelup_texts[@index][1].size
  146.       end  
  147.       level = actor.level
  148.       last_level = actor.last_level
  149.       atk = actor.now_atk
  150.       now_def = actor.now_def
  151.       spi = actor.now_spi
  152.       agi = actor.now_agi
  153.       last_atk = actor.last_atk
  154.       last_def = actor.last_def
  155.       last_spi = actor.last_spi
  156.       last_agi = actor.last_agi
  157.       
  158.       
  159.       self.contents.clear
  160.       
  161.       # x = 122
  162.       # y = 58
  163.        @skill_window.opacity = $game_temp.levelup_texts[@index][1].size != 0 ? 150 : 0
  164.        skill_name = $game_temp.levelup_texts[@index][1][@skill_index - 1].name if @skill_index != 0
  165.        level_name = Vocab::level
  166.        atk_name = Vocab::atk
  167.        def_name = Vocab::def
  168.        spi_name = Vocab::spi
  169.        agi_name = Vocab::agi
  170.        font = self.contents.font.size
  171.        x = 5
  172.        y = 165
  173.        self.contents.draw_text(x,y,60,60,atk_name)
  174.        self.contents.draw_text(x,y+30,60,60,def_name)
  175.        self.contents.draw_text(x,y+60,60,60,spi_name)
  176.        self.contents.draw_text(x,y+90,60,60,agi_name)
  177.        self.contents.draw_text(x + 45,y,60,60, last_atk)
  178.        self.contents.draw_text(x + 45,y+30,60,60,last_def)
  179.        self.contents.draw_text(x + 45,y+60,60,60,last_spi)
  180.        self.contents.draw_text(x + 45,y + 90,60,60,last_agi)
  181.        self.contents.draw_text(x,y-30,60,60,level_name)
  182.        self.contents.draw_text(x + 45,y-30,60,60,last_level)
  183.        self.contents.font.color = Color.new(0,255,0,255)
  184.        self.contents.draw_text(x + 105,y-30,60,60,level)
  185.        bitmap_5 = Bitmap.new("Graphics/system/箭头")
  186.        rect_5 = Rect.new(0,0,bitmap_5.width,bitmap_5.height)
  187.        self.contents.blt(x + 70,y - 18,bitmap_5,rect_5)
  188.        if atk > last_atk
  189.          self.contents.draw_text(x+105,y,60,60,atk)
  190.          atk_opacity = 255
  191.        else
  192.          atk_opacity = 0
  193.        end  
  194.        bitmap_1 = Bitmap.new("Graphics/system/箭头")
  195.        rect_1 = Rect.new(0,0,bitmap_1.width,bitmap_1.height)
  196.        self.contents.blt(x+70,y+12,bitmap_1,rect_1,atk_opacity)
  197.       
  198.       
  199.        if now_def > last_def
  200.          self.contents.draw_text(x+105,y+30,60,60,now_def)
  201.          def_opacity = 255
  202.        else
  203.          def_opacity = 0
  204.        end
  205.        bitmap_2 = Bitmap.new("Graphics/system/箭头")
  206.        rect_2 = Rect.new(0,0,bitmap_1.width,bitmap_1.height)
  207.        self.contents.blt(x+70,y+42,bitmap_1,rect_1,def_opacity)
  208.       
  209.        if spi > last_spi
  210.          self.contents.draw_text(x+105,y+60,60,60,spi)
  211.          spi_opacity = 255
  212.        else
  213.          spi_opacity = 0
  214.        end
  215.       
  216.        bitmap_3 = Bitmap.new("Graphics/system/箭头")
  217.        rect_3 = Rect.new(0,0,bitmap_1.width,bitmap_1.height)
  218.        self.contents.blt(x+70,y+72,bitmap_1,rect_1,spi_opacity)
  219.       
  220.        if agi > last_agi
  221.          self.contents.draw_text(x + 105,y + 90,60,60,agi)
  222.          agi_opacity = 255
  223.        else
  224.          agi_opacity = 0
  225.        end
  226.        bitmap_4 = Bitmap.new("Graphics/system/箭头")
  227.        rect_4 = Rect.new(0,0,bitmap_1.width,bitmap_1.height)
  228.        self.contents.blt(x+70,y+102,bitmap_1,rect_1,agi_opacity)
  229.          
  230.       
  231.       
  232.       
  233.        self.contents.font.color = normal_color
  234.        self.contents.font.size = 16
  235.        self.contents.draw_text(60, -19, 120, 60,"学会了 #{skill_name}")if @skill_index != 0
  236.        self.contents.font.color = Color.new(255,255,0,255)
  237.        self.contents.draw_text(61, -19,120,60,"       #{skill_name}")
  238.        self.contents.font.size = font
  239.        draw_face(actor.face_name, actor.face_index,3, 55, size = 80)
  240.        draw_actor_name(actor, 92, 55)
  241.        draw_actor_hp(actor, 95, 85)
  242.        draw_actor_mp(actor, 95, 115)
  243.       
  244.        self.contents.font.color = normal_color
  245.        actor.hp = [actor.maxhp,9999].min
  246.        actor.mp = [actor.maxmp,9999].min
  247.       
  248.       
  249.    
  250.      else
  251.        @main_window.visible = false
  252.        @skill_window.visible =false
  253.        self.visible = false
  254.       
  255.     end   
  256.    
  257.    
  258.      
  259.   end
  260.   #==========================================================================
  261.   #★窗口按键刷新
  262.   #==========================================================================
  263.    def zhonginputupdate
  264.      if Input.trigger?(Input::DOWN)
  265.        if @skill_index != 0
  266.          @skill_index -= 1
  267.          end
  268.          @index += 1 if @skill_index == 0
  269.      end
  270.      if Input.trigger?(Input::UP)
  271.         
  272.         if @skill_index != 0
  273.          @skill_index -= 1
  274.          end
  275.          @index += 1 if @skill_index == 0
  276.       end
  277.       if Input.trigger?(Input::RIGHT)
  278.         
  279.        if @skill_index != 0
  280.          @skill_index -= 1
  281.          end
  282.          @index += 1 if @skill_index == 0
  283.         
  284.       end
  285.       if Input.trigger?(Input::LEFT)
  286.          
  287.          if @skill_index != 0
  288.          @skill_index -= 1
  289.          end
  290.          @index += 1 if @skill_index == 0
  291.          
  292.       end
  293.       if Input.trigger?(Input::B)
  294.          
  295.           if @skill_index != 0
  296.          @skill_index -= 1
  297.          end
  298.          @index += 1 if @skill_index == 0
  299.         
  300.       end
  301.       if Input.trigger?(Input::C)
  302.          if @skill_index != 0
  303.          @skill_index -= 1
  304.          end
  305.          @index += 1 if @skill_index == 0
  306.          
  307.       end
  308.    end
  309.    
  310.   #==========================================================================  
  311.    
  312.   def dispose
  313.     super
  314.     @skill_window.dispose
  315.     @main_window.dispose
  316.   end  
  317.   
  318.   
  319. end

  320. class Scene_Map < Scene_Base
  321.   
  322. def start
  323.     super
  324.     $game_map.refresh
  325.     @spriteset = Spriteset_Map.new
  326.     @message_window = Window_Message.new
  327.     @levelup_window = Window_zhonglevelup.new
  328.     @lus_window = Window_Base.new(122,23,260,36)
  329.     @m_window = Window_Base.new(122,59,260,290)
  330.     @m_window.opacity = 0
  331.     @lus_window.opacity = 0
  332.     @m_window.z = 9998
  333.     @lus_window.z = 9998
  334.     @levelup_window.z = 9999
  335.   end
  336.   
  337. def update
  338.     super
  339.     $game_map.interpreter.update   
  340.     $game_map.update                  
  341.     $game_player.update               
  342.     $game_system.update               
  343.     @spriteset.update                 
  344.     @message_window.update            
  345.    
  346.     unless $game_message.visible      
  347.       update_levelup_window
  348.       update_transfer_player
  349.       update_encounter
  350.       update_call_menu
  351.       update_call_debug
  352.       update_scene_change
  353.     end
  354.   end
  355.   
  356.   def update_levelup_window
  357.       @levelup_window.update
  358.       while @levelup_window.visible
  359.         
  360.         @lus_window.opacity = $game_temp.levelup_texts[@levelup_window.index][1].size != 0 ? 150 : 0
  361.         @m_window.opacity = 150
  362.         @levelup_window.update
  363.         Graphics.update
  364.         Input.update
  365.        end
  366.      @m_window.opacity = 0
  367.     @lus_window.opacity = 0
  368.    
  369.   end   
  370. def terminate
  371.     super
  372.     if $scene.is_a?(Scene_Battle)     # バトル画面に切り替え中の場合
  373.       @spriteset.dispose_characters   # 背景作成のためにキャラを隠す
  374.     end
  375.     snapshot_for_background
  376.     @spriteset.dispose
  377.     @message_window.dispose
  378.     @levelup_window.dispose
  379.     @m_window.dispose
  380.     @lus_window.dispose
  381.     if $scene.is_a?(Scene_Battle)     # バトル画面に切り替え中の場合
  382.       perform_battle_transition       # 戦闘前トランジション実行
  383.     end
  384.   end
  385. end

复制代码


下面这个地名显示脚本是与上面那脚本兼容的,记得插在它下面!
  1. #====================================================================
  2. #★显示地名脚本
  3. #--------------------------------------------------------------------
  4. #★作者:Zhong_Zw
  5. #★联系方式:66rpg.com论坛短信 或 [email protected]
  6. #★注:与站上的肯定有区别,因为是我默写的,如有雷同,纯属巧合!
  7. #=====================================================================


  8. SWICHES = 25
  9. class Mapname_window < Window_Base
  10.    def initialize
  11.     super(0, 0, 280, WLH + 64)
  12.     self.opacity = 0
  13.     refresh
  14.   end
  15.   #--------------------------------------------------------------------------
  16.   # ● リフレッシュ
  17.   #--------------------------------------------------------------------------
  18.   def refresh
  19.     self.contents.clear
  20.     self.contents.font.size = 32
  21.     self.contents.font.color = Color.new(0,0,0,255)
  22.     self.contents.draw_text(1,1,120,32,$game_map.name,2)
  23.     self.contents.font.color = normal_color
  24.     self.contents.draw_text(0,0,120,32,$game_map.name,2)
  25.   end
  26.   def update
  27.     super
  28.     refresh
  29.   end   
  30.   
  31. end


  32. class Game_Map
  33.   attr_accessor :name
  34.   def setup(map_id)
  35.     @map_id = map_id
  36.     @map = load_data(sprintf("Data/Map%03d.rvdata", @map_id))
  37.     @mapinfo = load_data("Data/MapInfos.rvdata")
  38.     #============================
  39.     @name = @mapinfo[@map_id].name
  40.     #============================
  41.     @display_x = 0
  42.     @display_y = 0
  43.     @passages = $data_system.passages
  44.     referesh_vehicles
  45.     setup_events
  46.     setup_scroll
  47.     setup_parallax
  48.     @need_refresh = false
  49.   end
  50. end  

  51. class Scene_Map < Scene_Base
  52.   alias oldstart start
  53.   def start
  54.     oldstart
  55.     @mapname_window = Mapname_window.new
  56.     @mapname_window.x = 272
  57.     @levelup_window = Window_zhonglevelup.new
  58.     @lus_window = Window_Base.new(122,23,260,36)
  59.     @m_window = Window_Base.new(122,59,260,290)
  60.     @m_window.opacity = 0
  61.     @lus_window.opacity = 0
  62.     @m_window.z = 9998
  63.     @lus_window.z = 9998
  64.     @levelup_window.z = 9999
  65.     @last_mapname = $game_map.name
  66.     unless $game_switches[SWICHES]  
  67.       @mapname_window.opacity = 0
  68.       @mapname_window.contents_opacity = 0
  69.     end  
  70.   end
  71.   def update
  72.     super
  73.     $game_map.interpreter.update      
  74.     $game_map.update                  
  75.     $game_player.update              
  76.     $game_system.update               
  77.     @spriteset.update               
  78.     @message_window.update            
  79.     if @last_name != $game_map.name
  80.        @last_name = $game_map.name
  81.       if $game_switches[SWICHES]
  82.       @mapname_window.update
  83.       #@mapname_window.opacity = 200
  84.       @mapname_window.x = 272
  85.       @mapname_window.contents_opacity = 255
  86.       end
  87.     end  
  88.     if @mapname_window.x <= 440
  89.       @mapname_window.x += 1
  90.      # @mapname_window.opacity -= 2
  91.       @mapname_window.contents_opacity -= 2
  92.     end  
  93.     unless $game_message.visible      
  94.       update_levelup_window
  95.       update_transfer_player
  96.       update_encounter
  97.       update_call_menu
  98.       update_call_debug
  99.       update_scene_change
  100.     end
  101.   end
  102.   def update_levelup_window
  103.       @levelup_window.update
  104.       while @levelup_window.visible
  105.         
  106.         @lus_window.opacity = $game_temp.levelup_texts[@levelup_window.index][1].size != 0 ? 150 : 0
  107.         @m_window.opacity = 150
  108.         @levelup_window.update
  109.         Graphics.update
  110.         Input.update
  111.        end
  112.      @m_window.opacity = 0
  113.     @lus_window.opacity = 0
  114.    
  115.   end   
  116.   
  117.   
  118.   alias oldterminate  terminate
  119.   def terminate
  120.      @mapname_window.dispose
  121.     oldterminate
  122.   end  
  123. end
复制代码


应求发布,能力值计算了加武器之后的,而且增加了能力值增量显示,其实这个升级提示脚本有些地方不是很合理,优化一下可以更快,现在开学没时间了....有时间再弄个优化版的.

  1. #=======================================================================
  2. #★升级提示★
  3. #-----------------------------------------------------------------------
  4. #★作者: Zhong_zw
  5. #★联系方式:66RPG.com论坛短信 或 [email protected]
  6. #=======================================================================
  7. class Game_Actor < Game_Battler

  8.   attr_accessor :last_level   
  9.    def initialize(actor_id)
  10.     super()
  11.     setup(actor_id)
  12.     @last_level = 0
  13.     @last_skill_id = 0
  14.    end
  15.   
  16.   def last_atk
  17.     n=0
  18.     for item in equips.compact do n += item.atk end
  19.     return actor.parameters[2,@last_level] + n
  20.   end

  21.   def last_def
  22.     n=0
  23.     for item in equips.compact do n += item.def end
  24.     return actor.parameters[3,@last_level] + n
  25.   end
  26.   
  27.   def last_spi
  28.     n=0
  29.     for item in equips.compact do n += item.spi end
  30.     return actor.parameters[4,@last_level] + n
  31.   end
  32.   
  33.   def last_agi
  34.     n=0
  35.     for item in equips.compact do n += item.agi end
  36.     return actor.parameters[5,@last_level] + n
  37.   end
  38.   def now_atk
  39.     n=0
  40.     for item in equips.compact do n += item.atk end
  41.     return actor.parameters[2,@level] + n
  42.   end
  43.   def now_def
  44.      n=0
  45.     for item in equips.compact do n += item.def end
  46.     return actor.parameters[3,@level] + n
  47.   end
  48.   def now_spi
  49.      n=0
  50.     for item in equips.compact do n += item.spi end
  51.     return actor.parameters[4,@level] + n
  52.   end
  53.   def now_agi
  54.     n=0
  55.     for item in equips.compact do n += item.agi end
  56.     return actor.parameters[5,@level] + n
  57.   end  
  58.    def change_exp(exp, show)
  59.     @last_level = @level
  60.     last_skills = skills
  61.    
  62.     @exp = [[exp, 9999999].min, 0].max
  63.    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  64.       level_up
  65.     end
  66.     while @exp < @exp_list[@level]
  67.       level_down
  68.     end
  69.     @hp = [@hp, maxhp].min
  70.     @mp = [@mp, maxmp].min
  71.     if show and @level > last_level
  72.       
  73.       zhonglevelup_push(skills - last_skills)
  74.     end
  75.   end
  76.    #==========================================================================
  77.   #★角色升级显示
  78.   #==========================================================================
  79.   
  80.   def zhonglevelup_push(new_skills)
  81.    
  82.     text = [@actor_id,new_skills]
  83.     $game_temp.levelup_texts.push(text)
  84.   end
  85. end



  86. class Scene_Battle < Scene_Base

  87. def display_level_up
  88.     exp = $game_troop.exp_total
  89.     $game_party.remove_states_battle
  90.     @message_window.contents_opacity = 0
  91.     @message_window.opacity = 0
  92.     @levelup_window = Window_zhonglevelup.new
  93.     for actor in $game_party.existing_members
  94.       last_level = actor.level
  95.       last_skills = actor.skills
  96.       actor.gain_exp(exp, true)
  97.     end
  98.    
  99.     update_zhonglevelup
  100.    
  101.    
  102.   end
  103.   #==========================================================================
  104.   #★等待升级窗口刷新
  105.   #==========================================================================
  106.    def update_zhonglevelup
  107.       @levelup_window.update
  108.      while @levelup_window.visible
  109.        @levelup_window.update
  110.        Graphics.update
  111.        Input.update
  112.      end
  113.    end
  114.    
  115. end   

  116. class Game_Temp
  117.     attr_accessor :levelup_texts
  118.   #--------------------------------------------------------------------------
  119.   # ● オブジェクト初期化
  120.   #--------------------------------------------------------------------------
  121.   alias oldinitialize initialize
  122.   def initialize
  123.     @levelup_texts = []
  124.     oldinitialize
  125.   end  
  126.   
  127. end


  128. class Window_zhonglevelup < Window_Base

  129.   attr_accessor :index
  130.   def initialize
  131.     super(122, 15, 350, 345)
  132.     $game_temp.levelup_texts = []
  133.     @index = 0
  134.     @skill_index = 0
  135.     @skill_window = Window_Base.new(122,23,260,36)
  136.     @skill_window.opacity = 0
  137.     @skill_window.z = self.z - 1
  138.     @main_window = Window_Base.new(122,59,260,290)
  139.     @main_window.opacity = 0
  140.     @main_window.z = self.z - 1
  141.    
  142.     self.opacity = 0
  143.     self.visible = false
  144.    
  145.     #update
  146.    
  147.    end
  148.   
  149.   
  150.   #--------------------------------------------------------------------------
  151.   # ★ $game_temp.levelup_texts = [角色id,新特技]
  152.   #--------------------------------------------------------------------------
  153.   def update
  154.    
  155.    
  156.     zhonginputupdate if @index <= $game_temp.levelup_texts.size-1
  157.      
  158.     if @index <= $game_temp.levelup_texts.size-1      
  159.       
  160.       self.visible = true
  161.       @main_window.opacity = 150
  162.       actor = $game_actors[$game_temp.levelup_texts[@index][0]]
  163.       if @skill_index == 0 and $game_temp.levelup_texts[@index][1].size != 0
  164.         @skill_index = $game_temp.levelup_texts[@index][1].size
  165.       end  
  166.       level = actor.level
  167.       last_level = actor.last_level
  168.       atk = actor.now_atk
  169.       now_def = actor.now_def
  170.       spi = actor.now_spi
  171.       agi = actor.now_agi
  172.       last_atk = actor.last_atk
  173.       last_def = actor.last_def
  174.       last_spi = actor.last_spi
  175.       last_agi = actor.last_agi
  176.       
  177.       
  178.       self.contents.clear
  179.       
  180.       # x = 122
  181.       # y = 58
  182.        @skill_window.opacity = $game_temp.levelup_texts[@index][1].size != 0 ? 150 : 0
  183.        skill_name = $game_temp.levelup_texts[@index][1][@skill_index - 1].name if @skill_index != 0
  184.        level_name = Vocab::level
  185.        atk_name = Vocab::atk
  186.        def_name = Vocab::def
  187.        spi_name = Vocab::spi
  188.        agi_name = Vocab::agi
  189.        font = self.contents.font.size
  190.        x = 5
  191.        y = 165
  192.        self.contents.draw_text(x,y,60,60,atk_name)
  193.        self.contents.draw_text(x,y+30,60,60,def_name)
  194.        self.contents.draw_text(x,y+60,60,60,spi_name)
  195.        self.contents.draw_text(x,y+90,60,60,agi_name)
  196.        self.contents.draw_text(x + 45,y,60,60, last_atk)
  197.        self.contents.draw_text(x + 45,y+30,60,60,last_def)
  198.        self.contents.draw_text(x + 45,y+60,60,60,last_spi)
  199.        self.contents.draw_text(x + 45,y + 90,60,60,last_agi)
  200.        self.contents.draw_text(x,y-30,60,60,level_name)
  201.        self.contents.draw_text(x + 45,y-30,60,60,last_level)
  202.        self.contents.font.color = Color.new(0,255,255)
  203.        self.contents.font.size = 16
  204.        self.contents.draw_text(x + 77,y-30,60,60,"+ #{level - last_level}")
  205.        self.contents.font.size = font
  206.        self.contents.font.color = Color.new(0,255,0,255)
  207.        self.contents.draw_text(x + 140,y-30,60,60,level)
  208.       
  209.        bitmap_1 = Bitmap.new("Graphics/system/箭头")
  210.        rect_1 = Rect.new(0,0,bitmap_1.width,bitmap_1.height)
  211.        self.contents.blt(x + 105,y - 18,bitmap_1,rect_1)
  212.        if atk > last_atk
  213.          self.contents.font.color = Color.new(0,255,255)
  214.          self.contents.font.size = 16
  215.          self.contents.draw_text(x + 77,y,60,60,"+ #{atk - last_atk}")
  216.          self.contents.font.size = font
  217.          self.contents.font.color = Color.new(0,255,0,255)
  218.          self.contents.draw_text(x+140,y,60,60,atk)
  219.          atk_opacity = 255
  220.        else
  221.          atk_opacity = 0
  222.        end  
  223.       
  224.         
  225.        self.contents.blt(x+105,y+12,bitmap_1,rect_1,atk_opacity)
  226.       
  227.       
  228.        if now_def > last_def
  229.         self.contents.font.color = Color.new(0,255,255)
  230.         self.contents.font.size = 16
  231.         self.contents.draw_text(x + 77,y+30,60,60,"+ #{now_def - last_def}")
  232.         self.contents.font.size = font
  233.         self.contents.font.color = Color.new(0,255,0,255)
  234.          self.contents.draw_text(x+140,y+30,60,60,now_def)
  235.          def_opacity = 255
  236.        else
  237.          def_opacity = 0
  238.        end
  239.       
  240.        self.contents.blt(x+105,y+42,bitmap_1,rect_1,def_opacity)
  241.       
  242.        if spi > last_spi
  243.         self.contents.font.color = Color.new(0,255,255)
  244.         self.contents.font.size = 16
  245.         self.contents.draw_text(x + 77,y+60,60,60,"+ #{spi - last_spi}")
  246.         self.contents.font.size = font
  247.         self.contents.font.color = Color.new(0,255,0,255)
  248.          self.contents.draw_text(x+140,y+60,60,60,spi)
  249.          spi_opacity = 255
  250.        else
  251.          spi_opacity = 0
  252.        end
  253.       
  254.       
  255.        self.contents.blt(x+105,y+72,bitmap_1,rect_1,spi_opacity)
  256.       
  257.        if agi > last_agi
  258.          self.contents.font.color = Color.new(0,255,255)
  259.          self.contents.font.size = 16
  260.          self.contents.draw_text(x + 77,y+90,60,60,"+ #{agi - last_agi}")
  261.          self.contents.font.size = font
  262.          self.contents.font.color = Color.new(0,255,0,255)
  263.          self.contents.draw_text(x + 140,y + 90,60,60,agi)
  264.          agi_opacity = 255
  265.        else
  266.          agi_opacity = 0
  267.        end
  268.       
  269.        self.contents.blt(x+105,y+102,bitmap_1,rect_1,agi_opacity)
  270.          
  271.       
  272.       
  273.       
  274.        self.contents.font.color = normal_color
  275.        self.contents.font.size = 16
  276.        self.contents.draw_text(60, -19, 120, 60,"学会了 #{skill_name}")if @skill_index != 0
  277.        self.contents.font.color = Color.new(255,255,0,255)
  278.        self.contents.draw_text(61, -19,120,60,"       #{skill_name}")
  279.        self.contents.font.size = font
  280.        draw_face(actor.face_name, actor.face_index,3, 55, size = 80)
  281.        draw_actor_name(actor, 92, 55)
  282.        draw_actor_hp(actor, 95, 85)
  283.        draw_actor_mp(actor, 95, 115)
  284.       
  285.        self.contents.font.color = normal_color
  286.        actor.hp = [actor.maxhp,9999].min
  287.        actor.mp = [actor.maxmp,9999].min
  288.       
  289.       
  290.    
  291.      else
  292.        @main_window.visible = false
  293.        @skill_window.visible =false
  294.        self.visible = false
  295.       
  296.     end   
  297.    
  298.    
  299.      
  300.   end
  301.   #==========================================================================
  302.   #★窗口按键刷新
  303.   #==========================================================================
  304.    def zhonginputupdate
  305.      if Input.trigger?(Input::DOWN)
  306.        if @skill_index != 0
  307.          @skill_index -= 1
  308.          end
  309.          @index += 1 if @skill_index == 0
  310.      end
  311.      if Input.trigger?(Input::UP)
  312.         
  313.         if @skill_index != 0
  314.          @skill_index -= 1
  315.          end
  316.          @index += 1 if @skill_index == 0
  317.       end
  318.       if Input.trigger?(Input::RIGHT)
  319.         
  320.        if @skill_index != 0
  321.          @skill_index -= 1
  322.          end
  323.          @index += 1 if @skill_index == 0
  324.         
  325.       end
  326.       if Input.trigger?(Input::LEFT)
  327.          
  328.          if @skill_index != 0
  329.          @skill_index -= 1
  330.          end
  331.          @index += 1 if @skill_index == 0
  332.          
  333.       end
  334.       if Input.trigger?(Input::B)
  335.          
  336.           if @skill_index != 0
  337.          @skill_index -= 1
  338.          end
  339.          @index += 1 if @skill_index == 0
  340.         
  341.       end
  342.       if Input.trigger?(Input::C)
  343.          if @skill_index != 0
  344.          @skill_index -= 1
  345.          end
  346.          @index += 1 if @skill_index == 0
  347.          
  348.       end
  349.    end
  350.    
  351.   #==========================================================================  
  352.    
  353.   def dispose
  354.     super
  355.     @skill_window.dispose
  356.     @main_window.dispose
  357.   end  
  358.   
  359.   
  360. end

  361. class Scene_Map < Scene_Base
  362.   
  363. def start
  364.     super
  365.     $game_map.refresh
  366.     @spriteset = Spriteset_Map.new
  367.     @message_window = Window_Message.new
  368.     @levelup_window = Window_zhonglevelup.new
  369.     @lus_window = Window_Base.new(122,23,260,36)
  370.     @m_window = Window_Base.new(122,59,260,290)
  371.     @m_window.opacity = 0
  372.     @lus_window.opacity = 0
  373.     @m_window.z = 9998
  374.     @lus_window.z = 9998
  375.     @levelup_window.z = 9999
  376.   end
  377.   
  378. def update
  379.     super
  380.     $game_map.interpreter.update   
  381.     $game_map.update                  
  382.     $game_player.update               
  383.     $game_system.update               
  384.     @spriteset.update                 
  385.     @message_window.update            
  386.    
  387.     unless $game_message.visible      
  388.       update_levelup_window
  389.       update_transfer_player
  390.       update_encounter
  391.       update_call_menu
  392.       update_call_debug
  393.       update_scene_change
  394.     end
  395.   end
  396.   
  397.   def update_levelup_window
  398.       @levelup_window.update
  399.       while @levelup_window.visible
  400.         
  401.         @lus_window.opacity = $game_temp.levelup_texts[@levelup_window.index][1].size != 0 ? 150 : 0
  402.         @m_window.opacity = 150
  403.         @levelup_window.update
  404.         Graphics.update
  405.         Input.update
  406.        end
  407.      @m_window.opacity = 0
  408.     @lus_window.opacity = 0
  409.    
  410.   end   
  411. def terminate
  412.     super
  413.     if $scene.is_a?(Scene_Battle)     # バトル画面に切り替え中の場合
  414.       @spriteset.dispose_characters   # 背景作成のためにキャラを隠す
  415.     end
  416.     snapshot_for_background
  417.     @spriteset.dispose
  418.     @message_window.dispose
  419.     @levelup_window.dispose
  420.     @m_window.dispose
  421.     @lus_window.dispose
  422.     if $scene.is_a?(Scene_Battle)     # バトル画面に切り替え中の場合
  423.       perform_battle_transition       # 戦闘前トランジション実行
  424.     end
  425.   end
  426. end

复制代码






发布页面:http://rpg.blue/web/htm/news1081.htm
vip+3
准备有空挖个坑玩玩..
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-1-28
帖子
25
2
发表于 2008-2-22 00:08:51 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3263
在线时间
3616 小时
注册时间
2006-9-6
帖子
37399

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

3
发表于 2008-2-22 00:33:13 | 只看该作者
满漂亮的。
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-1-26
帖子
1544
4
发表于 2008-2-22 01:03:54 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-1-6
帖子
1139
5
发表于 2008-2-22 01:04:52 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

精灵族の天使

梦石
0
星屑
1697
在线时间
3038 小时
注册时间
2007-3-16
帖子
33731

开拓者贵宾

6
发表于 2008-2-22 01:07:52 | 只看该作者
转移到rmvx技术区。
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-2-24
帖子
28
7
发表于 2008-5-27 05:37:41 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
22 小时
注册时间
2006-4-22
帖子
370
8
 楼主| 发表于 2008-5-28 05:36:22 | 只看该作者
经测试,好像没问题,可能你是否有加入了其他战斗类的脚本,有冲突吧。。。。
准备有空挖个坑玩玩..
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-5-24
帖子
335
9
发表于 2008-5-28 12:21:38 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3263
在线时间
3616 小时
注册时间
2006-9-6
帖子
37399

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

10
发表于 2008-5-30 01:54:20 | 只看该作者
为什么用了以后没效果呢……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-26 18:51

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表