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

Project1

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

[已经过期] 请为这个脚本加个开关控制

[复制链接]

Lv2.观梦者

梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
帖子
496
跳转到指定楼层
1
发表于 2013-11-22 13:34:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
当10号才使用这个脚本
但是要怎么添加?
  1. #==============================================================================
  2. # ★RGSS2
  3. # *STR11b_XP Battle Style #Battle Message v1.2 08/01/26
  4. # Created by star: http://otsu.cool.ne.jp/strcatyou/
  5. # Translated by Mr. Bubble
  6. #
  7. # ・Battle message appears with transparent background at
  8. #  the upper left of the screen.
  9. #
  10. #------------------------------------------------------------------------------

  11. #==============================================================================
  12. # ■ Window_BattleMessage
  13. #==============================================================================
  14. class Window_BattleMessage < Window_Message
  15.   # Gradient Background [Left, Right]
  16.   TEXT_B_COLOR = [Color.new(0,0,0,160), Color.new(0,0,0,0)]
  17.   INFO      = "信息" # String that shows at the upper left of message window
  18.   BTWIDTH   = 320       # Message Width
  19.   MOVE      = false      # Smooth resize of lines
  20.   SPEED     = 1        # Resize Speed
  21.   W_OPACITY = 96        # Transparency 1~255
  22.   #
  23.   N_WINDOW  = false     # Window is not converted transparent
  24.   #--------------------------------------------------------------------------
  25.   # ★ エイリアス
  26.   #--------------------------------------------------------------------------
  27.   alias initialize_str11b initialize
  28.   def initialize
  29.     initialize_str11b
  30.     self.x = 0
  31.     self.y = 0
  32.     self.back_opacity = 0
  33.     self.opacity = 0
  34.     unless N_WINDOW
  35.       @b_sprite = Sprite.new(self.viewport)
  36.       bitmap = Bitmap.new(BTWIDTH, 96 + 16)
  37.       bitmap.gradient_fill_rect(0, 16, BTWIDTH, 96, TEXT_B_COLOR[0], TEXT_B_COLOR[1])
  38.       bitmap.font.shadow = false
  39.       bitmap.font.size = 16
  40.       bitmap.draw_text(2, 2, BTWIDTH, 16, INFO)
  41.       @b_sprite.bitmap = bitmap
  42.       @b_sprite.x = self.x
  43.       @b_sprite.y = self.y
  44.       @b_sprite.src_rect.height = 16
  45.       @b_sprite.opacity = 0
  46.       @str11f = false
  47.     end
  48.   end
  49.   alias dispose_str11b dispose
  50.   def dispose
  51.     dispose_str11b
  52.     unless N_WINDOW
  53.       @b_sprite.bitmap.dispose
  54.       @b_sprite.dispose
  55.     end
  56.   end
  57.   alias update_str11b update
  58.   def update
  59.     update_str11b
  60.    
  61.     unless N_WINDOW
  62.       if self.visible and (@lines.size > 0 and not @str11f) or
  63.          (@text != nil or self.pause or [url=home.php?mod=space&uid=370741]@Index[/url] > -1)
  64.         @b_sprite.opacity += W_OPACITY
  65.         h = @b_sprite.src_rect.height
  66.         if @text != nil
  67.           @l = 4
  68.         else
  69.           unless self.pause or @index > -1
  70.             @l = @lines.size
  71.           else
  72.             @l = 4
  73.           end
  74.         end
  75.         if MOVE
  76.           if SPEED == 1
  77.             @b_sprite.src_rect.height = 16 + (@l * 24)
  78.           else
  79.             s = (SPEED - 1)
  80.             @b_sprite.src_rect.height = (h + ((16 + (@l * 24)) * s)) / SPEED
  81.           end
  82.         else
  83.           @b_sprite.src_rect.height = 96 + 16
  84.         end
  85.       else
  86.         @b_sprite.opacity -= W_OPACITY
  87.       end
  88.     else
  89.       if self.visible
  90.         self.back_opacity += W_OPACITY
  91.         self.opacity += W_OPACITY
  92.         self.back_opacity = 200 if self.back_opacity > 200
  93.       else
  94.         self.back_opacity -= W_OPACITY
  95.         self.opacity -= W_OPACITY
  96.       end
  97.     end
  98.   end
  99. end
复制代码
不定期回来6R玩。
下方广告帖,欢迎点击

Lv1.梦旅人

狂気の月兔

梦石
0
星屑
231
在线时间
1245 小时
注册时间
2009-4-7
帖子
879

贵宾

来自 2楼
发表于 2013-11-22 18:39:39 | 只看该作者
RUBY 代码复制
  1. #==============================================================================
  2. # ★RGSS2
  3. # *STR11b_XP Battle Style #Battle Message v1.2 08/01/26
  4. # Created by star: [url]http://otsu.cool.ne.jp/strcatyou/[/url]
  5. # Translated by Mr. Bubble
  6. #
  7. # ・Battle message appears with transparent background at
  8. #  the upper left of the screen.
  9. #
  10. #------------------------------------------------------------------------------
  11.  
  12. #==============================================================================
  13. # ■ Window_BattleMessage
  14. #==============================================================================
  15. class Window_BattleMessage < Window_Message
  16.   # Gradient Background [Left, Right]
  17.   TEXT_B_COLOR = [Color.new(0,0,0,160), Color.new(0,0,0,0)]
  18.   INFO      = "信息" # String that shows at the upper left of message window
  19.   BTWIDTH   = 320       # Message Width
  20.   MOVE      = false      # Smooth resize of lines
  21.   SPEED     = 1        # Resize Speed
  22.   W_OPACITY = 96        # Transparency 1~255
  23.   #
  24.   N_WINDOW  = false     # Window is not converted transparent
  25.  
  26.   SwitchesID = 10
  27.   #--------------------------------------------------------------------------
  28.   # ★ エイリアス
  29.   #--------------------------------------------------------------------------
  30.   alias initialize_str11b initialize
  31.   def initialize
  32.     initialize_str11b
  33.     self.x = 0
  34.     self.y = 0
  35.     self.back_opacity = 0
  36.     self.opacity = 0
  37.     @b_sprite = Sprite.new(self.viewport)
  38.     bitmap = Bitmap.new(BTWIDTH, 96 + 16)
  39.     bitmap.gradient_fill_rect(0, 16, BTWIDTH, 96, TEXT_B_COLOR[0], TEXT_B_COLOR[1])
  40.     bitmap.font.shadow = false
  41.     bitmap.font.size = 16
  42.     bitmap.draw_text(2, 2, BTWIDTH, 16, INFO)
  43.     @b_sprite.bitmap = bitmap
  44.     @b_sprite.x = self.x
  45.     @b_sprite.y = self.y
  46.     @b_sprite.src_rect.height = 16
  47.     @b_sprite.opacity = 0
  48.     @str11f = false
  49.   end
  50.  
  51.   alias dispose_str11b dispose
  52.   def dispose
  53.     dispose_str11b
  54.     @b_sprite.bitmap.dispose
  55.     @b_sprite.dispose
  56.   end
  57.  
  58.   alias update_str11b update
  59.   def update
  60.     update_str11b
  61.     @b_sprite.visible = $game_switches[SwitchesID]
  62.     if $game_switches[SwitchesID]
  63.       if self.visible and (@lines.size > 0 and not @str11f) or
  64.          (@text != nil or self.pause or [url=home.php?mod=space&uid=370741]@Index[/url] > -1)
  65.         @b_sprite.opacity += W_OPACITY
  66.         h = @b_sprite.src_rect.height
  67.         if @text != nil
  68.           @l = 4
  69.         else
  70.           unless self.pause or @index > -1
  71.             @l = @lines.size
  72.           else
  73.             @l = 4
  74.           end
  75.         end
  76.         if MOVE
  77.           if SPEED == 1
  78.             @b_sprite.src_rect.height = 16 + (@l * 24)
  79.           else
  80.             s = (SPEED - 1)
  81.             @b_sprite.src_rect.height = (h + ((16 + (@l * 24)) * s)) / SPEED
  82.           end
  83.         else
  84.           @b_sprite.src_rect.height = 96 + 16
  85.         end
  86.       else
  87.         @b_sprite.opacity -= W_OPACITY
  88.       end
  89.     else
  90.       if self.visible
  91.         self.back_opacity += W_OPACITY
  92.         self.opacity += W_OPACITY
  93.         self.back_opacity = 200 if self.back_opacity > 200
  94.       else
  95.         self.back_opacity -= W_OPACITY
  96.         self.opacity -= W_OPACITY
  97.       end
  98.     end
  99.   end
  100. end


未测试

评分

参与人数 1星屑 +120 收起 理由
怪蜀黍 + 120 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
帖子
496
3
 楼主| 发表于 2013-11-22 23:45:58 | 只看该作者
铃仙·优昙华院·因幡 发表于 2013-11-22 18:39
#==============================================================================
# ★RGSS2
# *STR11b ...

多谢,可是跟默认的效果还是有些冲突啊

点评

这个无能为力  发表于 2013-11-23 12:27
不定期回来6R玩。
下方广告帖,欢迎点击
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
帖子
496
4
 楼主| 发表于 2013-11-24 23:18:53 | 只看该作者
铃仙·优昙华院·因幡 发表于 2013-11-22 18:39
#==============================================================================
# ★RGSS2
# *STR11b ...

米事,实现基本的效果就可以啦
不定期回来6R玩。
下方广告帖,欢迎点击
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-28 09:14

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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