本帖最后由 枫の叶 于 2015-11-9 13:24 编辑
但是呢,这里有一个获取指定事件行走图文件名的方法,其他的显示什么的,就楼主自己去斟酌。
用法:Fy.get_ev_grp(地图ID, 事件ID, 页数)
module Fy def self.get_ev_grp(map_id, event_id, page) return "" unless FileTest.exist?(sprintf("Data/Map%03d.rxdata", map_id)) events = load_data(sprintf("Data/Map%03d.rxdata", map_id)).events return "" unless events.keys.include?(event_id) event = events[event_id] return "" if page > event.pages.size return event.pages[page-1].graphic.character_name end end
module Fy
def self.get_ev_grp(map_id, event_id, page)
return "" unless FileTest.exist?(sprintf("Data/Map%03d.rxdata", map_id))
events = load_data(sprintf("Data/Map%03d.rxdata", map_id)).events
return "" unless events.keys.include?(event_id)
event = events[event_id]
return "" if page > event.pages.size
return event.pages[page-1].graphic.character_name
end
end
|