赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 163587 |
最后登录 | 2020-5-5 |
在线时间 | 41 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 60
- 在线时间
- 41 小时
- 注册时间
- 2008-3-5
- 帖子
- 2072
|
- #====================================================☆○
- # 本脚本来自www.66rpg.com,使用和转载请保留此信息
- #====================================================☆○
- # ■ Script_practice_w
- #------------------------------------------------------------------------------
- # 游戏帮助
- # 开启脚本:
- # $scene = Script_practice_w.new
- # 修改说明名称:18---28
- # 修改说明文字:195---261
- #==============================================================================
- class Script_practice_w
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- # ● 自定义 #
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- #背景
- Background_name = "001-Title01.jpg" #Graphics/001-Title01.jpg
- #音乐
- Bgm_name = "Audio/BGM/021-Field04.mid"
- #说明名称
- $co_spw1 = "说明1"
- $co_spw2 = "说明2"
- $co_spw3 = "说明3"
- $co_spw4 = "说明4"
- $co_spw5 = "说明5"
- $co_spw6 = "说明6"
- $co_spw7 = "说明7"
- $co_spw8 = "说明8"
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- # ● 主处理 #
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- def main
- #确认处理
- spw_command
- unless MTV.mtv?
- #开启BGM、BGS
- $game_system.bgm_memorize
- $game_system.bgs_memorize
- #停止BGM、BGS
- Audio.bgm_stop
- Audio.bgs_stop
- #开启BGM、BGS
- Audio.bgm_play(Bgm_name,100,100)
- end
- @mtv_window = Window_MTV.new
- #准备
- Graphics.freeze
- #背景
- @sprite = Sprite.new
- @sprite.bitmap = RPG::Cache.title(Background_name)
- #帮助
- @Spw = Window_Help.new
- @Spw.x = 0
- @Spw.y = 0
- @Spw.height = 64
- @Spw.width = 640
- @Spw.back_opacity = 160
- if $co_spw1 == "――――――"
- #文章
- @text = ""
- else
- #文章
- @text = ($co_spw1 + "")
- end
- @Spw.contents.draw_text(0, 0, 400, 32, @text)
- @Spw.visible = true
- #表示
- @Spw_co = Window_Help.new
- @text_ss = ""
- @Spw_co.contents.draw_text(0, 0, 400, 32, @text_ss)
- @Spw_co.x = 160
- @Spw_co.y = 64
- @Spw_co.width = 320
- @Spw_co.height = 255
- @Spw_co.back_opacity = 160
- @Spw_co.visible = true
- #变量
- s1 = $co_spw1
- s2 = $co_spw2
- s3 = $co_spw3
- s4 = $co_spw4
- s5 = $co_spw5
- s6 = $co_spw6
- s7 = $co_spw7
- s8 = $co_spw8
- @Spw2 = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
- @Spw2.x = 480
- @Spw2.y = 64
- @Spw2.back_opacity = 160
- #确认处理2
- spw_command2
- #位置记录
- @Command_ss = @Spw2.index
- #时间记录
- @playtime_window = Window_PlayTime.new
- @playtime_window.x = 0
- @playtime_window.y = 64
- @playtime_window.back_opacity = 160
- #歩数记录
- @steps_window = Window_Steps.new
- @steps_window.x = 0
- @steps_window.y = 160
- @steps_window.back_opacity = 160
- @gold_window = Window_Gold.new
- @gold_window.x = 0
- @gold_window.y = 256
- @gold_window.back_opacity = 160
- Graphics.transition
- #开始
- loop do
- #刷新画面
- Graphics.update
- #刷新事件
- Input.update
- #刷新
- @Spw2.update
- @playtime_window.update
- @steps_window.update
- @gold_window.update
- input_ss
- if @Command_ss != @Spw2.index
- update_spw2
- end
- if $scene != self
- break
- end
- end
- end
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- # ● 确认处理 #
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- def spw_command
- if $co_spw1 == ""
- $co_spw1 = "――――――"
- end
- if $co_spw2 == ""
- $co_spw2 = "――――――"
- end
- if $co_spw3 == ""
- $co_spw3 = "――――――"
- end
- if $co_spw4 == ""
- $co_spw4 = "――――――"
- end
- if $co_spw5 == ""
- $co_spw5 = "――――――"
- end
- if $co_spw6 == ""
- $co_spw6 = "――――――"
- end
- if $co_spw7 == ""
- $co_spw7 = "――――――"
- end
- if $co_spw8 == ""
- $co_spw8 = "――――――"
- end
- end
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- # ● 确认处理2 #
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- def spw_command2
- if $co_spw1 == "――――――"
- @Spw2.disable_item(0)
- end
- if $co_spw2 == "――――――"
- @Spw2.disable_item(1)
- end
- if $co_spw3 == "――――――"
- @Spw2.disable_item(2)
- end
- if $co_spw4 == "――――――"
- @Spw2.disable_item(3)
- end
- if $co_spw5 == "――――――"
- @Spw2.disable_item(4)
- end
- if $co_spw6 == "――――――"
- @Spw2.disable_item(5)
- end
- if $co_spw7 == "――――――"
- @Spw2.disable_item(6)
- end
- if $co_spw8 == "――――――"
- @Spw2.disable_item(7)
- end
- end
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- # ● 文字处理 #
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- def input_ss
- #当 按下C键时
- if Input.trigger?(Input::C)
- @Spw_co.dispose
- @Spw_co = Window_Help.new
- case @Spw2.index
- when 0
- if $co_spw1 == "――――――"
- #演奏効果音
- $game_system.se_play($data_system.buzzer_se)
- @text_ss = ""
- else
- #演奏効果音
- $game_system.se_play($data_system.decision_se)
- #说明文字(自定义)
- @text_ss = ($co_spw1 + ":说明文字")
- end
- when 1
- if $co_spw2 == "――――――"
- #演奏効果音
- $game_system.se_play($data_system.buzzer_se)
- @text_ss = ""
- else
- #演奏効果音
- $game_system.se_play($data_system.decision_se)
- #真ん中のウィンドの文章を代入
- @text_ss = ($co_spw2 + ":说明文字")
- end
- when 2
- if $co_spw3 == "――――――"
- #演奏効果音
- $game_system.se_play($data_system.buzzer_se)
- @text_ss = ""
- else
- #演奏効果音
- $game_system.se_play($data_system.decision_se)
- #说明文字(自定义)
- @text_ss = ($co_spw3 + ":说明文字")
- end
- when 3
- if $co_spw4 == "――――――"
- #演奏効果音
- $game_system.se_play($data_system.buzzer_se)
- @text_ss = ""
- else
- #演奏効果音
- $game_system.se_play($data_system.decision_se)
- #说明文字(自定义)
- @text_ss = ($co_spw4 + ":说明文字")
- end
- when 4
- if $co_spw5 == "――――――"
- #演奏効果音
- $game_system.se_play($data_system.buzzer_se)
- @text_ss = ""
- else
- #演奏効果音
- $game_system.se_play($data_system.decision_se)
- #说明文字(自定义)
- @text_ss = ($co_spw5 + ":说明文字")
- end
- when 5
- if $co_spw6 == "――――――"
- #演奏効果音
- $game_system.se_play($data_system.buzzer_se)
- @text_ss = ""
- else
- #演奏効果音
- $game_system.se_play($data_system.decision_se)
- #说明文字(自定义)
- @text_ss = ($co_spw6 + ":说明文字")
- end
- when 6
- if $co_spw7 == "――――――"
- #演奏効果音
- $game_system.se_play($data_system.buzzer_se)
- @text_ss = ""
- else
- #演奏効果音
- $game_system.se_play($data_system.decision_se)
- #说明文字(自定义)
- @text_ss = ($co_spw7 + ":说明文字7777777")
- end
- when 7
- if $co_spw8 == "――――――"
- #演奏効果音
- $game_system.se_play($data_system.buzzer_se)
- @text_ss = ""
- else
- #演奏効果音
- $game_system.se_play($data_system.decision_se)
- #说明文字(自定义)
- @text_ss = ($co_spw8 + ":说明文字8888888")
- end
- end
- @Spw_co.contents.draw_text(0, 0, 400, 32, @text_ss)
- @Spw_co.x = 160
- @Spw_co.y = 64
- @Spw_co.width = 320
- @Spw_co.height = 255
- @Spw_co.back_opacity = 160
- @Spw_co.visible = true
- end
- #当 按下B键时 or H键
- if Input.trigger?(Input::B) or Kboard.trigger?(0x48)
- #演奏声音
- $game_system.se_play($data_system.cancel_se)
- #最终处理
- back
- end
- end
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- # ● 刷新画面 #
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- def update_spw2
- @mtv_window.refresh
- @Spw_co.dispose
- @Spw_co = Window_Help.new
- @text_ss = ""
- @Spw_co.contents.draw_text(0, 0, 400, 32, @text_ss)
- @Spw_co.x = 160
- @Spw_co.y = 64
- @Spw_co.width = 320
- @Spw_co.height = 255
- @Spw_co.back_opacity = 160
- @Spw_co.visible = true
- @Spw.dispose
- @Spw = Window_Help.new
- case @Spw2.index
- when 0
- if $co_spw1 == "――――――"
- @Command_ss = @Spw2.index
- @text = ""
- else
- @Command_ss = @Spw2.index
- @text = ($co_spw1 + "")
- end
- when 1
- if $co_spw2 == "――――――"
- @Command_ss = @Spw2.index
- @text = ""
- else
- @Command_ss = @Spw2.index
- @text = ($co_spw2 + "")
- end
- when 2
- if $co_spw3 == "――――――"
- @Command_ss = @Spw2.index
- @text = ""
- else
- @Command_ss = @Spw2.index
- @text = ($co_spw3 + "")
- end
- when 3
- if $co_spw4 == "――――――"
- @Command_ss = @Spw2.index
- @text = ""
- else
- @Command_ss = @Spw2.index
- @text = ($co_spw4 + "")
- end
- when 4
- if $co_spw5 == "――――――"
- @Command_ss = @Spw2.index
- @text = ""
- else
- @Command_ss = @Spw2.index
- @text = ($co_spw5 + "")
- end
- when 5
- if $co_spw6 == "――――――"
- @Command_ss = @Spw2.index
- @text = ""
- else
- @Command_ss = @Spw2.index
- @text = ($co_spw6 + "")
- end
- when 6
- if $co_spw7 == "――――――"
- @Command_ss = @Spw2.index
- @text = ""
- else
- @Command_ss = @Spw2.index
- @text = ($co_spw7 + "")
- end
- when 7
- if $co_spw8 == "――――――"
- @Command_ss = @Spw2.index
- @text = ""
- else
- @Command_ss = @Spw2.index
- @text = ($co_spw8 + "")
- end
- end
- @Spw.contents.draw_text(0, 0, 400, 32, @text)
- @Spw.x = 0
- @Spw.y = 0
- @Spw.height = 64
- @Spw.width = 640
- @Spw.back_opacity = 160
- @Spw.visible = true
- end
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- # ● 最终处理 #
- #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
- def back
- #准备
- Graphics.freeze
- @Spw.dispose
- @Spw_co.dispose
- @Spw2.dispose
- @playtime_window.dispose
- @steps_window.dispose
- @gold_window.dispose
- #背景消除
- @sprite.bitmap.dispose
- @sprite.dispose
- @mtv_window.dispose
- #停止BGM、BGS
- Audio.bgm_stop
- Audio.bgs_stop
- #开启BGM、BGS
- $game_system.bgm_restore
- $game_system.bgs_restore
- Graphics.transition
- $scene = Scene_Map.new
- end
- end
复制代码
这个是我存的,是个游戏说明的脚本,原地址忘了。
改下Script_practice_w这个名字就好用了,一面有注释的,说明的内容就自己写吧
要做更漂亮点的话,还是要自己学学脚本
当然过个说明的图片,然后说明的内容就让他显示这张图片的话也可以 |
|