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

Project1

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

[原创发布] 多货币脚本小补丁

[复制链接]

Lv3.寻梦者

○赛

梦石
0
星屑
1249
在线时间
1276 小时
注册时间
2013-1-22
帖子
2246

贵宾

跳转到指定楼层
1
发表于 2013-11-30 23:12:25 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式

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

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

x
@876加几 发布了一个多货币脚本,但是细心的小小周发现,这里并没有提供Window_Gold的
修改,导致在对话框中使用\g功能跳出的界面无法显示另一个货币,于是就有了这个小补丁~如果有人发布过就请无视掉吧~
  1. #==============================================================================
  2. # ■ Window_Gold
  3. #------------------------------------------------------------------------------
  4. #  显示金钱的窗口。
  5. #==============================================================================

  6. class Window_Gold < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化窗口
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 0, 160, 64+32)
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     @gold_sp = $game_variables[8]
  14.     @gold_sp_name = "灵魄"
  15.     refresh
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # ● 刷新
  19.   #--------------------------------------------------------------------------
  20.   def refresh
  21.     self.contents.clear
  22.     cx = contents.text_size($data_system.words.gold).width
  23.     cx_sp = contents.text_size(@gold_sp_name).width
  24.     self.contents.font.color = normal_color
  25.     self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
  26.     self.contents.font.color = system_color
  27.     self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  28.     self.contents.font.color = normal_color
  29.     self.contents.draw_text(4, 0, 120-cx_sp-2, 64+32, @gold_sp.to_s, 2)
  30.     self.contents.font.color = system_color
  31.     self.contents.draw_text(124-cx_sp, 0, cx_sp, 64+32, @gold_sp_name.to_s, 2)
  32.   end
  33. end
复制代码
相信大家都看得懂吧...在@gold_sp = $game_variables[]中的数字“8”代表着第二货币的对应变量,而下面一行的@gold_sp_name = “”则代表着第二货币的名字...
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-5-15 12:46

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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