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

Project1

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

[已经解决] 有没有脚本能让战斗时附加一个项目更改角色装备

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
186 小时
注册时间
2014-6-14
帖子
213
跳转到指定楼层
1
发表于 2014-8-1 14:13:18 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

x
今日累死,连提两个问题……………………
我要与链接里的Taroxd的脚本共用啊!!!
还是一样,标题说得清楚了……
附加的项目名字就是装备,打开后就会弹出非战斗时主菜单的“装备”窗口
而且功能也和他一样,可以更改装备,按Esc就会自动消除战斗窗口,回到了普通战斗的界面{:2_282:}
麻烦了……………………{:2_249:}

Lv1.梦旅人

梦石
0
星屑
50
在线时间
186 小时
注册时间
2014-6-14
帖子
213
6
 楼主| 发表于 2014-8-1 15:47:43 | 只看该作者
本帖最后由 qq19750508 于 2014-8-1 15:54 编辑

谢谢 VIPArcher 摔的脚本!
我感觉他们卖萌的都要收编了………………233
(此处有白字,小心监视)
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
186 小时
注册时间
2014-6-14
帖子
213
5
 楼主| 发表于 2014-8-1 15:30:26 | 只看该作者
VIPArcher 发表于 2014-8-1 14:44
我摔脚本。

你摔的脚本有一点错误,我的72行出错了。

点评

可以改的。这样不好吗?话说这个还是刻意这么做的呢。  发表于 2014-8-2 10:00
你的脚本一个战斗只能更改一次装备  发表于 2014-8-2 06:45
论坛卖萌啦,[url=home.php?mod=space&uid=420706]@Scene[/url] = scene_class改成 @Scene = scene_class  发表于 2014-8-1 15:34
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

4
发表于 2014-8-1 14:44:27 | 只看该作者
本帖最后由 VIPArcher 于 2014-8-1 15:34 编辑
qq19750508 发表于 2014-8-1 14:32
@VIPArcher
@taroxd

  @Scene  ← 无视它
我摔脚本。
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Command Equip v1.01
  4. # -- Last Updated: 2012.01.10
  5. # -- Level: Easy, Normal
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-CommandEquip"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.10 - Compatibility Update: Ace Battle Engine v1.15+
  15. # 2011.12.13 - Started Script and Finished.
  16. #
  17. #==============================================================================
  18. # ▼ Introduction
  19. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  20. # This command allows your actors to be able to change equipment in the middle
  21. # of battle by directly accessing the equip scene in the middle of battle, and
  22. # returning back to the battle scene exactly as it was. Furthermore, you can
  23. # limit how frequently your player can switch equipment for each of the actors.
  24. #
  25. #==============================================================================
  26. # ▼ Instructions
  27. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. # To install this script, open up your script editor and copy/paste this script
  29. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  30. #
  31. #==============================================================================
  32. # ▼ Compatibility
  33. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  34. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  35. # it will run with RPG Maker VX without adjusting.
  36. #
  37. #==============================================================================

  38. module YEA
  39.   module COMMAND_EQUIP
  40.    
  41.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  42.     # - Battle Equip Settings -
  43.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  44.     # This is just how the text appears visually in battle for your actors and
  45.     # how often they can change equips in battle.
  46.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  47.     COMMAND_TEXT   = "Equip"      # Text used for the command.
  48.     EQUIP_COOLDOWN = 2            # Turns to wait before re-equipping.
  49.    
  50.   end # COMMAND_EQUIP
  51. end # YEA

  52. #==============================================================================
  53. # ▼ Editting anything past this point may potentially result in causing
  54. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  55. # halitosis so edit at your own risk.
  56. #==============================================================================

  57. #==============================================================================
  58. # ■ SceneManager
  59. #==============================================================================

  60. module SceneManager
  61.   
  62.   #--------------------------------------------------------------------------
  63.   # new method: self.force_recall
  64.   #--------------------------------------------------------------------------
  65.   def self.force_recall(scene_class)
  66.     @Scene = scene_class
  67.   end
  68.   
  69. end # SceneManager

  70. #==============================================================================
  71. # ■ Game_Battler
  72. #==============================================================================

  73. class Game_Battler < Game_BattlerBase
  74.   
  75.   #--------------------------------------------------------------------------
  76.   # alias method: on_battle_start
  77.   #--------------------------------------------------------------------------
  78.   alias game_battler_on_battle_start_ceq on_battle_start
  79.   def on_battle_start
  80.     game_battler_on_battle_start_ceq
  81.     reset_equip_cooldown
  82.   end
  83.   
  84.   #--------------------------------------------------------------------------
  85.   # new method: reset_equip_cooldown
  86.   #--------------------------------------------------------------------------
  87.   def reset_equip_cooldown
  88.     @equip_cooldown = 0
  89.   end
  90.   
  91.   #--------------------------------------------------------------------------
  92.   # alias method: on_turn_end
  93.   #--------------------------------------------------------------------------
  94.   alias game_battler_on_turn_end_ceq on_turn_end
  95.   def on_turn_end
  96.     game_battler_on_turn_end_ceq
  97.     update_equip_cooldown
  98.   end
  99.   
  100.   #--------------------------------------------------------------------------
  101.   # new method: update_equip_cooldown
  102.   #--------------------------------------------------------------------------
  103.   def update_equip_cooldown
  104.     reset_equip_cooldown if @equip_cooldown.nil?
  105.     @equip_cooldown = [@equip_cooldown - 1, 0].max
  106.   end
  107.   
  108.   #--------------------------------------------------------------------------
  109.   # new method: battle_equippable?
  110.   #--------------------------------------------------------------------------
  111.   def battle_equippable?
  112.     reset_equip_cooldown if @equip_cooldown.nil?
  113.     return @equip_cooldown <= 0
  114.   end
  115.   
  116.   #--------------------------------------------------------------------------
  117.   # new method: set_equip_cooldown
  118.   #--------------------------------------------------------------------------
  119.   def set_equip_cooldown
  120.     @equip_cooldown = YEA::COMMAND_EQUIP::EQUIP_COOLDOWN
  121.   end
  122.   
  123.   #--------------------------------------------------------------------------
  124.   # alias method: on_battle_end
  125.   #--------------------------------------------------------------------------
  126.   alias game_battler_on_battle_end_ceq on_battle_end
  127.   def on_battle_end
  128.     game_battler_on_battle_end_ceq
  129.     reset_equip_cooldown
  130.   end
  131.   
  132. end # Game_Battler

  133. #==============================================================================
  134. # ■ Window_EquipCommand
  135. #==============================================================================

  136. class Window_EquipCommand < Window_HorzCommand
  137.   
  138.   #--------------------------------------------------------------------------
  139.   # overwrite method: handle?
  140.   #--------------------------------------------------------------------------
  141.   def handle?(symbol)
  142.     if [:pageup, :pagedown].include?(symbol) && $game_party.in_battle
  143.       return false
  144.     end
  145.     return super(symbol)
  146.   end
  147.   
  148. end # Window_EquipCommand

  149. #==============================================================================
  150. # ■ Window_ActorCommand
  151. #==============================================================================

  152. class Window_ActorCommand < Window_Command
  153.   
  154.   #--------------------------------------------------------------------------
  155.   # alias method: make_command_list
  156.   #--------------------------------------------------------------------------
  157.   alias window_actorcommand_make_command_list_ceq make_command_list
  158.   def make_command_list
  159.     window_actorcommand_make_command_list_ceq
  160.     return unless @actor
  161.     return if $imported["YEA-BattleCommandList"]
  162.     add_equip_command
  163.   end
  164.   
  165.   #--------------------------------------------------------------------------
  166.   # new method: add_equip_command
  167.   #--------------------------------------------------------------------------
  168.   def add_equip_command
  169.     text = YEA::COMMAND_EQUIP::COMMAND_TEXT
  170.     add_command(text, :equip, @actor.battle_equippable?)
  171.   end
  172.   
  173. end # Window_ActorCommand

  174. #==============================================================================
  175. # ■ Scene_Battle
  176. #==============================================================================

  177. class Scene_Battle < Scene_Base
  178.   
  179.   #--------------------------------------------------------------------------
  180.   # alias method: create_actor_command_window
  181.   #--------------------------------------------------------------------------
  182.   alias create_actor_command_window_ceq create_actor_command_window
  183.   def create_actor_command_window
  184.     create_actor_command_window_ceq
  185.     @actor_command_window.set_handler(:equip, method(:command_equip))
  186.   end
  187.   
  188.   #--------------------------------------------------------------------------
  189.   # new method: command_equip
  190.   #--------------------------------------------------------------------------
  191.   def command_equip
  192.     Graphics.freeze
  193.     @info_viewport.visible = false
  194.     hide_extra_gauges if $imported["YEA-BattleEngine"]
  195.     SceneManager.snapshot_for_background
  196.     actor = $game_party.battle_members[@status_window.index]
  197.     $game_party.menu_actor = actor
  198.     previous_equips = actor.equips.clone
  199.     index = @actor_command_window.index
  200.     oy = @actor_command_window.oy
  201.     #---
  202.     SceneManager.call(Scene_Equip)
  203.     SceneManager.scene.main
  204.     SceneManager.force_recall(self)
  205.     #---
  206.     show_extra_gauges if $imported["YEA-BattleEngine"]
  207.     actor.set_equip_cooldown if previous_equips != actor.equips
  208.     @info_viewport.visible = true
  209.     @status_window.refresh
  210.     @actor_command_window.setup(actor)
  211.     @actor_command_window.select(index)
  212.     @actor_command_window.oy = oy
  213.     perform_transition
  214.   end
  215.   
  216. end # Scene_Battle

  217. #==============================================================================
  218. #
  219. # ▼ End of File
  220. #
  221. #==============================================================================
复制代码

评分

参与人数 1星屑 +150 收起 理由
taroxd + 150 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
186 小时
注册时间
2014-6-14
帖子
213
3
 楼主| 发表于 2014-8-1 14:32:37 | 只看该作者
本帖最后由 qq19750508 于 2014-8-1 14:34 编辑

@VIPArcher
@taroxd

点评

第一个我使用了链接>3<(别pia我呀)  发表于 2014-8-1 14:35
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
250
在线时间
233 小时
注册时间
2013-8-2
帖子
587
2
发表于 2014-8-1 14:20:55 | 只看该作者
不太明白楼主说的什么意思。。你是想在战斗的时候有一个更改装备的选项让你可以在战斗中更改装备?

点评

你可以@VIPArcher,让他给你脚本  发表于 2014-8-1 14:29
是的,关键是有没有此类型的脚本(需要在原始脚本进行更改也可以)  发表于 2014-8-1 14:26
我忘了,我要怎么遗忘。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-25 21:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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