| 
 
| 赞 | 274 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 153 |  
| 经验 | 515 |  
| 最后登录 | 2025-10-8 |  
| 在线时间 | 2108 小时 |  
 Lv4.逐梦者 
	梦石1 星屑14293 在线时间2108 小时注册时间2017-9-28帖子663 | 
| 复制代码# =============================================================================
# TheoAllen - 添加公共事件到菜单中
# Version : 1.0
# Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
# (This script documentation is written in informal indonesian language)
# =============================================================================
($imported ||= {})[:Theo_CMev] = true
# =============================================================================
# Change Logs:
# -----------------------------------------------------------------------------
# 2013.11.14 - Finished script
# =============================================================================
=begin
  介绍:
  该脚本可让你添加指定公共事件到菜单选项中
  
  使用方法:
  插入到插件脚本之下,Main之上
  编辑下方设定
  
  使用条款:
  署名脚本作者, TheoAllen. 你可以自由编辑此脚本,只要你不声明你是脚本的原作者
  如果你想用此脚本于商业游戏,请和我共享收益.别忘了给我一份免费的游戏拷贝.  
=end
# =============================================================================
# 设定部分
# =============================================================================
module Theo
  module CMev
  # ---------------------------------------------------------------------------
    List = {  # <-- 别碰这个
  # ---------------------------------------------------------------------------
  # 格式
  # "选项名称" => [公共事件ID, 开关ID],
  # 
  # 介绍 :
  # - 公共事件ID  >> 数据库中的公共事件ID
  # - 开关ID >> 当对应ID的开关打开时,该选项禁止使用
  #
  # 例如:
  # "变身" => [1,1]
  #
  # 意思是,会新增一个“变身”选项到菜单选项中,该选项会执行1号公共事件
  # 且当1号开关打开时,这个选项就会被禁止使用
  # ---------------------------------------------------------------------------
    "目标" => [19,32],
    "邮箱" => [67,212],
#~     "布阵" => [52,183],
    
  # 请仿照上方格式添加
  
  # ---------------------------------------------------------------------------
  } # <-- 别碰这个
  # ---------------------------------------------------------------------------
  end
end
# =============================================================================
# Akhir dari konfigurasi
# =============================================================================
class Window_MenuCommand < Window_Command
  
  alias theo_cmev_ori_command add_original_commands
  def add_original_commands
    theo_cmev_ori_command
    Theo::CMev::List.each do |cmn, ev|
      add_command(cmn, :ok, !$game_switches[ev[1]], ev[0])
    end
  end
  
end
class Scene_Menu < Scene_MenuBase
  
  alias theo_cmev_cmd_window create_command_window
  def create_command_window
    theo_cmev_cmd_window
    @command_window.set_handler(:ok, method(:execute_common_event))
  end
  
  def execute_common_event
    event_id = @command_window.current_ext
    $game_temp.reserve_common_event(event_id)
    SceneManager.clear
    SceneManager.goto(Scene_Map)
  end
  
end
 | 
 评分
查看全部评分
 |