Project1
标题:
关于任务查看系统缩减版的小白问题
[打印本页]
作者:
panhengyi123
时间:
2012-2-12 20:35
标题:
关于任务查看系统缩减版的小白问题
我把主站上的任务查看系统缩减版插入进去以后菜单界面上面没有查看任务这一栏。还缺什么???这么添加??? dsu_plus_rewardpost_czw
作者:
2719358
时间:
2012-2-13 08:13
一片空白,什么都没找到……
你这个脚本在哪里,请贴出来
作者:
panhengyi123
时间:
2012-2-13 13:44
#==============================================================================
# Game_System
#------------------------------------------------------------------------------
# 添加内容
#==============================================================================
class Game_System
attr_accessor :mission #现在执行的任务
attr_accessor :partmission
alias carol3_ini initialize
def initialize
carol3_ini
@mission = ""
@partmission = []
end
end
#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
# 处理标题画面的类。
#==============================================================================
class Scene_Title
alias carol3_title1 main
def main
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
$任务 = ""
$支线 = nil
$支线完成 = nil
carol3_title1
end
end
class Scene_Map
alias carol3_update update
def update
carol3_update
if $支线 != nil
for i in 0...$game_system.partmission.size
if $game_system.partmission[i] == $支线
$支线 = nil
break
end
end
if $支线 != nil
$game_system.partmission.push($支线)
$支线 = nil
end
end
if $支线完成 != nil
for i in 0...$game_system.partmission.size
if $game_system.partmission[i] == $支线完成
$game_system.partmission.delete($game_system.partmission[i])
break
end
end
$支线完成 = nil
end
end
end
#==============================================================================
# ■ Game_Map
#------------------------------------------------------------------------------
# 处理地图的类。包含卷动以及可以通行的判断功能。
# 本类的实例请参考 $game_map 。
#==============================================================================
class Game_Map
def name
return $map_infos[@map_id]
end
end
#==============================================================================
# Window_RecordBook
#------------------------------------------------------------------------------
# 菜单界面表示信息的窗口
#==============================================================================
class Window_RecordBook < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
if $任务 == ""
$任务 = $game_system.mission
else
$game_system.mission = $任务
end
refresh
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.font.size = 20
cx = self.contents.text_size("现在地点").width + 24
self.contents.draw_text(4, 0, cx, 24, "现在地点")
self.contents.font.color = normal_color
self.contents.draw_text(4 + cx, 0, 444 - cx, 24, $game_map.name.to_s)
self.contents.font.color = system_color
cx = self.contents.text_size("主线任务").width + 24
self.contents.draw_text(4, 32, cx, 24, "主线任务")
self.contents.font.color = Color.new(240,250,75,255)
self.contents.draw_text(4 + cx, 32, 444 - cx, 24, $game_system.mission.to_s)
self.contents.font.color = system_color
cx = self.contents.text_size("支线任务").width + 24
self.contents.draw_text(4, 96, cx, 24, "支线任务")
self.contents.font.color = normal_color
for i in 0...$game_system.partmission.size
self.contents.draw_text(4 + cx, 96 + i * 32, 444 - cx, 24, $game_system.partmission[i].to_s)
end
end
end
#----------------------------------------------------------------------------
# ● 任务书调用场景!调用方法:$scene=Scene_RecordBook.new
#----------------------------------------------------------------------------
class Scene_RecordBook
def main
@command_window = Window_RecordBook.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
@command_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
end
end
复制代码
‘‘
然后就是什么都没有
──panhengyi123于2012-2-13 13:44补充以上内容’’
‘‘
不会用饿。。。。郁闷这是原网址
http://www.66rpg.com/articles/3203
──panhengyi123于2012-2-13 13:45补充以上内容’’
作者:
羞射了
时间:
2012-2-13 13:49
你仔细看下117行写的啥? 任务书调用场景!
$scene=Scene_RecordBook.new
如果你不会改脚本,你先在地图里建立个事件,在事件里运行这句就能看到效果了。
作者:
panhengyi123
时间:
2012-2-13 13:59
那个可以再菜单上架吗???帮我改下。经验好商量
‘‘
谢谢了。不用了给发咯
──panhengyi123于2012-2-13 14:36补充以上内容’’
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1