赞 | 153 |
VIP | 10 |
好人卡 | 39 |
积分 | 93 |
经验 | 146191 |
最后登录 | 2024-5-6 |
在线时间 | 2504 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 9280
- 在线时间
- 2504 小时
- 注册时间
- 2011-5-20
- 帖子
- 15389
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
- #==============================================================================
- # 本脚本作者hys111111,使用和转载请保留此信息
- #==============================================================================
- =begin
- for maps_id in 1..999
- if maps_id<=9
- map = load_data("Data/Map00#{maps_id}.rxdata")
- else
- if map_id<=99
- map = load_data("Data/Map0#{maps_id}.rxdata")
- else
- map = load_data("Data/Map#{maps_id}.rxdata")
- end
- end
- end
- =end
- map = load_data("Data/Map001.rxdata")
- copy = 0
- for event_map in 1..10
- for event_id in 1..10
- for event_x in 1..10
- for event_y in 1..10
- if event_map<=9
- if FileTest.exist?("Into/M00#{event_map}E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- for value in 1..map.events.size + 1
- if map.events[value] == nil
- map.events[value] = RPG::Event.new(event_x,event_y)
- map.events[value] = load_data("Into/M00#{event_map}E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- map.events[value].id = value
- File.delete("Into/M00#{event_map}E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- copy += 1
- break
- end
- end
- end
- else
- if
- if FileTest.exist?("Into/M0#{event_map}E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- for value in 1..map.events.size + 1
- if map.events[value] == nil
- map.events[value] = RPG::Event.new(event_x,event_y)
- map.events[value] = load_data("Into/M0#{event_map}E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- map.events[value].id = value
- File.delete("Into/M0#{event_map}E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- copy += 1
- break
- end
- end
- end
- else
- if FileTest.exist?("Into/M#{event_map}E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- for value in 1..map.events.size + 1
- if map.events[value] == nil
- map.events[value] = RPG::Event.new(event_x,event_y)
- map.events[value] = load_data("Into/E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- map.events[value].id = value
- File.delete("Into/M#{event_map}E#{event_id}X#{event_x}Y#{event_y}.rxdata")
- copy += 1
- break
- end
- end
- end
- end
- end
- end
- end
- end
- end
- if copy > 0
- save_data(map,"Data/Map001.rxdata")
- p "你成功导入#{copy}个事件,请重新打开工程。"
- exit
- end
复制代码 这个是读取事件的部分- #==============================================================================
- # 本脚本作者hys111111,使用和转载请保留此信息
- #==============================================================================
- class Dump_Event
- def initialize
- if $game_variables[2]<=9
- map = load_data("Data/Map00#{$game_variables[2]}.rxdata")
- else
- if $game_variables[2]<=99
- map = load_data("Data/Map0#{$game_variables[2]}.rxdata")
- else
- map = load_data("Data/Map#{$game_variables[2]}.rxdata")
- end
- end
- x=$game_map.events[$game_variables[1]].x
- y=$game_map.events[$game_variables[1]].y
- for e in 1..999
- p FileTest.exist?("Out/M#{$game_variables[2]}E#{e}X#{x}Y#{y}.rxdata")
- if $game_variables[2]<=9
- unless FileTest.exist?("Out/M00#{$game_variables[2]}E#{e}X#{x}Y#{y}.rxdata")
- break
- end
- else
- if $game_variables[2]<=99
- unless FileTest.exist?("Out/M0#{$game_variables[2]}E#{e}X#{x}Y#{y}.rxdata")
- break
- end
- else
- unless FileTest.exist?("Out/M#{$game_variables[2]}E#{e}X#{x}Y#{y}.rxdata")
- break
- end
- end
- end
- end
- if e == 999
- p "储存量过大"
- else
- if $game_variables[2]<=9
- save_data(map.events[$game_variables[1]],"Out/M00#{$game_variables[2]}E#{e}X#{x}Y#{y}.rxdata")
- map.events.delete($game_variables[1])
- save_data(map,"Data/Map#{$game_variables[2]}.rxdata")
- else
- if $game_variables[2]<=99
- save_data(map.events[$game_variables[1]],"Out/M0#{$game_variables[2]}E#{e}X#{x}Y#{y}.rxdata")
- map.events.delete($game_variables[1])
- save_data(map,"Data/Map#{$game_variables[2]}.rxdata")
- else
- save_data(map.events[$game_variables[1]],"Out/M#{$game_variables[2]}E#{e}X#{x}Y#{y}.rxdata")
- map.events.delete($game_variables[1])
- save_data(map,"Data/Map#{$game_variables[2]}.rxdata")
- end
- end
- p "打包成功,请在“Out”文件夹里查看。"
- exit
- end
- end
- end
复制代码 这个是保存事件的部分,简单说下BUG吧···打包事件的时候我打包3号事件结果把2号打包走了···包的是2号事件,但是文件确是3号事件的数据···
Data.rar
(162.89 KB, 下载次数: 9)
然后呢还原又还原不了超过1号地图的事件···而且X和Y超过10的没法还原,修改名称也不行啊@hys111111 求解释求指点···我这思路没问题的怎么还是有BUG··· |
|