class Scene_Map
alias old_update update
def update
$size = $game_party.instance_variable_get("@items").size+1
$newid = $game_map.map_id
if $newid != $game_map.map_id
$newid = $game_map.map_id
end
old_update
end
end
class Game_Variables
def initialize
@data = []
end
def [](variable_id)
if variable_id <= 50000000 and @data[variable_id] != nil
return @data[variable_id]
else
return 0
end
end
def []=(variable_id, value)
if variable_id <= 50000000
@data[variable_id] = value
end
end
end
class Game_Switches
def initialize
@data = []
end
def [](switch_id)
if switch_id <= 50000000 and @data[switch_id] != nil
return @data[switch_id]
else
return false
end
end
def []=(switch_id, value)
if switch_id <= 50000000
@data[switch_id] = value
end
end
end
class Scene_Title
alias smn_main main
def main
$data_mapinfos = load_data("Data/MapInfos.rxdata")
smn_main
end
end
class Game_Party
attr_reader(:items)
attr_reader :item
attr_reader :id
alias old_initialize initialize
def initialize
@item = item
@id = id
old_initialize
end
end
class Interpreter
def command_355
script = @list[@index].parameters[0] + "\n"
loop do
if @list[@index+1].code == 655 or @list[@index+1].code == 355
script += @list[@index+1].parameters[0] + "\n"
else
break
end
@index += 1
end
result = eval(script)
if result == false
return false
end
return true
end
end
def make_fly_1(n)
r = rand(5)
id = $size+460
$data_items[id].name = "飞行旗@飞行旗1"
if r == 0
$data_items[id].icon_name = "飞行旗1"
end
if r == 1
$data_items[id].icon_name = "飞行旗2"
end
if r == 2
$data_items[id].icon_name = "飞行旗3"
end
if r == 3
$data_items[id].icon_name = "飞行旗4"
end
if r == 4
$data_items[id].icon_name = "飞行旗5"
end
$data_items[id].description = "未标记"
$data_items[id].scope = 0
$data_items[id].occasion = 2
$data_items[id].consumable = false
$data_items[id].common_event_id = 999
$data_items[id].element_set = [121]
$data_items[id].hit = 100
$game_party.gain_item(id,n)
end
def make_fly_2(n)
r = rand(3)
id = $size+460
$data_items[id].name = "高级飞行旗@高级飞行旗"
if r == 0
$data_items[id].icon_name = "高级飞行旗"
end
if r == 1
$data_items[id].icon_name = "高级飞行旗1"
end
if r == 2
$data_items[id].icon_name = "高级飞行旗1"
end
$data_items[id].description = "未标记"
$data_items[id].scope = 0
$data_items[id].occasion = 2
$data_items[id].consumable = false
$data_items[id].common_event_id = 999
$data_items[id].element_set = [121]
$data_items[id].hit = 100
#$data_items[id].element_set.include = (11)
#$data_items[i].element_set.i ?(11)
$game_party.gain_item(id,n)
end
def make_fly_3(n)
r = rand(3)
id = $size+460
$data_items[id].name = "推背图@藏宝图"
if r == 0
$data_items[id].icon_name = "推背图"
end
if r == 1
$data_items[id].icon_name = "推背图"
end
if r == 2
$data_items[id].icon_name = "推背图"
end
$data_items[id].description = "未标记"
$data_items[id].scope = 0
$data_items[id].occasion = 2
$data_items[id].consumable = false
$data_items[id].common_event_id = 999
$data_items[id].element_set = [121]
$data_items[id].hit = 100
$game_party.gain_item(id,n)
end