赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 0 |
经验 | 0 |
最后登录 | 2008-11-17 |
在线时间 | 0 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 45
- 在线时间
- 0 小时
- 注册时间
- 2008-10-19
- 帖子
- 3
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
就是学魔法的页面不显示行走图
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #==============================================================================
- # ■ 本脚本源自www.66rpg.com,转载与使用请保留此信息
- #==============================================================================
- #——以下是一些自定义的内容
- $mShop_use_1 = "黄金" #——这项是购买魔法特技的货币的名称,如“灵魄”、“金钱”
- $mShop_use_2 = "G" #——这项是购买魔法特技的货币单位,如“点”、“¥”
- $mShop_use_variable = 0 #——这项是购买魔法特技时消耗的变量编号,如果=0 则是消耗金钱
- $mShop_Window_Opacity = 50 #——这项是窗口透明度
- #==============================================================================
- # ■ Window_MGold
- #------------------------------------------------------------------------------
- # 显示金钱的窗口。
- #==============================================================================
- class Window_MGold < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化窗口
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 272, 64)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.draw_text(0, 0 , 240,32 ,$mShop_use_1)
- self.contents.font.color = normal_color
- self.contents.draw_text(0, 0, 240-contents.text_size($mShop_use_2).width-6, 32, $mShop_gold.to_s, 2)
- self.contents.font.color = system_color
- self.contents.draw_text(0, 0, 240, 32, $mShop_use_2, 2)
- end
- end
- #==============================================================================
- # ■ Scene_MShop
- #------------------------------------------------------------------------------
- # 处理特技商店画面的类。
- #==============================================================================
- class Scene_MShop
- #--------------------------------------------------------------------------
- # ● 初始化
- #--------------------------------------------------------------------------
- def initialize(id)
- @id = id
- end
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- def main
- screen = Spriteset_Map.new
- if $mShop_use_variable == 0
- $mShop_gold = $game_party.gold
- else
- $mShop_gold = $game_variables[$mShop_use_variable]
- end
- # 生成帮助窗口
- @help_window = Window_Help.new
- @help_window.opacity = $mShop_Window_Opacity
- # 生成金钱窗口
- @gold_window = Window_MGold.new
- @gold_window.x = 368
- @gold_window.y = 416
- @gold_window.opacity = $mShop_Window_Opacity
- # 生成购买窗口
- @buy_window = Window_MShopBuy.new(@id)
- @buy_window.active = true
- @buy_window.visible = true
- @buy_window.help_window = @help_window
- @buy_window.opacity = $mShop_Window_Opacity
- # 生成状态窗口
- @status_window = Window_MShopStatus.new
- @status_window.visible = true
- @status_window.active = false
- @status_window.opacity = $mShop_Window_Opacity
- # 执行过渡
- Graphics.transition
- # 主循环
- loop do
- # 刷新游戏画面
- Graphics.update
- # 刷新输入信息
- Input.update
- # 刷新画面
- update
- # 如果画面切换的话就中断循环
- if $scene != self
- break
- end
- end
- # 准备过渡
- Graphics.freeze
- # 释放窗口
- @help_window.dispose
- #@mhelp_window.dispose
- @gold_window.dispose
- @buy_window.dispose
- @status_window.dispose
- screen.dispose
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- # 刷新窗口
- @help_window.update
- #@mhelp_window.update
- @gold_window.update
- @buy_window.update
- @status_window.update
- # 购买窗口激活的情况下: 调用 update_buy
- if @buy_window.active
- update_buy
- return
- end
- if @status_window.active
- update_status
- return
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (购买窗口激活的情况下)
- #--------------------------------------------------------------------------
- def update_buy
- @status_window.skill = @buy_window.skill
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Map.new
- return
- end
- if Input.trigger?(Input::C)
- @skill = @buy_window.skill
- if @skill == nil or @skill.price > $mShop_gold
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- $game_system.se_play($data_system.decision_se)
- @buy_window.active = false
- @status_window.index = 0
- @status_window.active = true
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (状态窗口激活的情况下)
- #--------------------------------------------------------------------------
- def update_status
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- @status_window.active = false
- @status_window.index = -1
- @buy_window.active = true
- end
- if Input.trigger?(Input::C)
- can_learn=false
- for j in $data_classes[$game_party.actors[@status_window.index].class_id].learnings
- if j.skill_id == @skill.id
- can_learn=true
- end
- end
- if can_learn==false
- $game_system.se_play($data_system.cancel_se)
- return
- end
- if $game_party.actors[@status_window.index].skill_learn?(@skill.id)
- $game_system.se_play($data_system.cancel_se)
- return
- else
- $game_system.se_play($data_system.decision_se)
- if $mShop_use_variable == 0
- $game_party.gain_gold([email protected])
- $mShop_gold -= @skill.price
- else
- $game_variables[$mShop_use_variable] -= @skill.price
- $mShop_gold -= @skill.price
- end
- $game_party.actors[@status_window.index].learn_skill(@skill.id)
- @gold_window.refresh
- @buy_window.refresh
- @status_window.refresh
- @status_window.active = false
- @status_window.index = -1
- @buy_window.active = true
- end
- end
- end
- end
- #==============================================================================
- # ■ Window_MShopStatus
- #------------------------------------------------------------------------------
- # 特技商店画面、显示物品所持数与角色装备的窗口。
- #==============================================================================
- class Window_MShopStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(368, 64, 272, 352)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.conten
复制代码 |
|