赞 | 8 |
VIP | 13 |
好人卡 | 1 |
积分 | 40 |
经验 | 12098 |
最后登录 | 2014-8-18 |
在线时间 | 132 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3993
- 在线时间
- 132 小时
- 注册时间
- 2012-1-7
- 帖子
- 208
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 Sion 于 2013-12-17 15:50 编辑
我是新手刚写的脚本求指点
*注意注释*- #---------------------------------------------------------------------------
- #
- # VA菜单滑动
- #
- # 制作:百页书香
- # 注意:本脚本和其他对菜单有修改脚本有一点点冲突。
- # 如:VA图书馆的“任务”和“称号”脚本,会发生无法点选的问题。
- # 但只要把此脚本放在他们的前面就没事了。
- #
- #特别感谢 6R论坛 铅笔描绘的思念 的指点
- #---------------------------------------------------------------------------
- class Scene_Menu < Scene_MenuBase #主菜单的移动
- #--------------------------------------------------------------------------
- # ● 生成指令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- @command_window = Window_MenuCommand.new
- @command_window.set_handler(:item, method(:command_item))
- @command_window.set_handler(:skill, method(:command_personal))
- @command_window.set_handler(:equip, method(:command_personal))
- @command_window.set_handler(:status, method(:command_personal))
- @command_window.set_handler(:formation, method(:command_formation))
- @command_window.set_handler(:save, method(:command_save))
- @command_window.set_handler(:game_end, method(:command_game_end))
- @command_window.set_handler(:cancel, method(:return_scene))
-
- @command_window.x = -100
-
- end
-
- #--------------------------------------------------------------------------
- # ● 生成金钱窗口
- #--------------------------------------------------------------------------
- def create_gold_window
- @gold_window = Window_Gold.new
- @gold_window.x = 0
- @gold_window.y = Graphics.height - @gold_window.height
-
- @gold_window.x = -100
- end
- #--------------------------------------------------------------------------
- # ● 生成状态窗口
- #--------------------------------------------------------------------------
- def create_status_window
- @status_window = Window_MenuStatus.new(@command_window.width, 0)
- @status_window.y = -200
- end
- #--------------------------------------------------------------------------
- # 窗口移动
- #--------------------------------------------------------------------------
- def update
- super
- @command_window.x += 5 if @command_window.x < 0
- @gold_window.x += 5 if @gold_window.x < 0
- @status_window.y += 10 if @status_window.y < 0
- end
- end
- class Scene_Item < Scene_ItemBase #物品栏的移动
- #--------------------------------------------------------------------------
- # ● 生成分类窗口
- #--------------------------------------------------------------------------
- def create_category_window
- @category_window = Window_ItemCategory.new
- @category_window.viewport = @viewport
- @category_window.help_window = @help_window
- @category_window.y = @help_window.height
- @category_window.set_handler(:ok, method(:on_category_ok))
- @category_window.set_handler(:cancel, method(:return_scene))
- @category_window.x = -200 #初始位置
- end
- #--------------------------------------------------------------------------
- # ● 生成物品窗口
- #--------------------------------------------------------------------------
- def create_item_window
- wy = @category_window.y + @category_window.height
- wh = Graphics.height - wy
- @item_window = Window_ItemList.new(0, wy, Graphics.width, wh)
- @item_window.viewport = @viewport
- @item_window.help_window = @help_window
- @item_window.set_handler(:ok, method(:on_item_ok))
- @item_window.set_handler(:cancel, method(:on_item_cancel))
- @category_window.item_window = @item_window
- @item_window.y += 100
- @help_window.x += 100
- @help_window.y -= 60
- end
- #--------------------------------------------------------------------------
- # ● 窗口移动
- #--------------------------------------------------------------------------
- def update
- super
- if @category_window.x >= 0
- else
- @category_window.x += 10
- @item_window.y -= 5
- @help_window.x -= 5
- @help_window.y += 3
- end
- end
- end
- class Scene_Skill < Scene_ItemBase #技能窗口
- #--------------------------------------------------------------------------
- # ● 生成指令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- wy = @help_window.height
- @command_window = Window_SkillCommand.new(0, wy)
- @command_window.viewport = @viewport
- @command_window.help_window = @help_window
- @command_window.actor = @actor
- @command_window.set_handler(:skill, method(:command_skill))
- @command_window.set_handler(:cancel, method(:return_scene))
- @command_window.set_handler(:pagedown, method(:next_actor))
- @command_window.set_handler(:pageup, method(:prev_actor))
- end
- #--------------------------------------------------------------------------
- # ● 生成状态窗口
- #--------------------------------------------------------------------------
- def create_status_window
- y = @help_window.height
- @status_window = Window_SkillStatus.new(@command_window.width, y)
- @status_window.viewport = @viewport
- @status_window.actor = @actor
- end
- #--------------------------------------------------------------------------
- # ● 生成物品窗口
- #--------------------------------------------------------------------------
- def create_item_window
- wx = 0
- wy = @status_window.y + @status_window.height
- ww = Graphics.width
- wh = Graphics.height - wy
- @item_window = Window_SkillList.new(wx, wy, ww, wh)
- @item_window.actor = @actor
- @item_window.viewport = @viewport
- @item_window.help_window = @help_window
- @item_window.set_handler(:ok, method(:on_item_ok))
- @item_window.set_handler(:cancel, method(:on_item_cancel))
- @command_window.skill_window = @item_window
- @item_window.y += 100 #初始位置
- @help_window.y -= 60 #初始位置
- @status_window.y -= 60 #初始位置
- @command_window.x = -100 #初始位置
- end
- #--------------------------------------------------------------------------
- # ● 窗口移动
- #--------------------------------------------------------------------------
- def update
- super
- if @command_window.x >=0
- else
- @command_window.x += 5
- @status_window.y += 3
- @item_window.y -= 5
- @help_window.y += 3
- end
- end
- end
- class Scene_Equip < Scene_MenuBase #装备窗口
- #--------------------------------------------------------------------------
- # ● 生成状态窗口
- #--------------------------------------------------------------------------
- def create_status_window
- @status_window = Window_EquipStatus.new(0, @help_window.height)
- @status_window.viewport = @viewport
- @status_window.actor = @actor
- @status_window.x -= 100
- end
- #--------------------------------------------------------------------------
- # ● 生成指令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- wx = @status_window.width
- wy = @help_window.height
- ww = Graphics.width - @status_window.width
- @command_window = Window_EquipCommand.new(wx, wy, ww)
- @command_window.viewport = @viewport
- @command_window.help_window = @help_window
- @command_window.set_handler(:equip, method(:command_equip))
- @command_window.set_handler(:optimize, method(:command_optimize))
- @command_window.set_handler(:clear, method(:command_clear))
- @command_window.set_handler(:cancel, method(:return_scene))
- @command_window.set_handler(:pagedown, method(:next_actor))
- @command_window.set_handler(:pageup, method(:prev_actor))
- end
- #--------------------------------------------------------------------------
- # ● 生成装备栏窗口
- #--------------------------------------------------------------------------
- def create_slot_window
- wx = @status_window.width
- wy = @command_window.y + @command_window.height
- ww = Graphics.width - @status_window.width
- @slot_window = Window_EquipSlot.new(wx, wy, ww)
- @slot_window.viewport = @viewport
- @slot_window.help_window = @help_window
- @slot_window.status_window = @status_window
- @slot_window.actor = @actor
- @slot_window.set_handler(:ok, method(:on_slot_ok))
- @slot_window.set_handler(:cancel, method(:on_slot_cancel))
- end
- #--------------------------------------------------------------------------
- # ● 生成物品窗口
- #--------------------------------------------------------------------------
- def create_item_window
- wx = 0
- wy = @slot_window.y + @slot_window.height
- ww = Graphics.width
- wh = Graphics.height - wy
- @item_window = Window_EquipItem.new(wx, wy, ww, wh)
- @item_window.viewport = @viewport
- @item_window.help_window = @help_window
- @item_window.status_window = @status_window
- @item_window.actor = @actor
- @item_window.set_handler(:ok, method(:on_item_ok))
- @item_window.set_handler(:cancel, method(:on_item_cancel))
- @slot_window.item_window = @item_window
- @command_window.y -= 100
- @help_window.y -= 100
- @slot_window.x += 100
- @item_window.y += 100
- end
- #--------------------------------------------------------------------------
- # ● 窗口移动
- #--------------------------------------------------------------------------
- def update
- super
- if @status_window.x >= 0
- else
- @status_window.x += 5
- @command_window.y += 5
- @help_window.y += 5
- @slot_window.x -= 5
- @item_window.y -= 5
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|