赞 | 2 |
VIP | 15 |
好人卡 | 41 |
积分 | 33 |
经验 | 128560 |
最后登录 | 2024-4-2 |
在线时间 | 1120 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3298
- 在线时间
- 1120 小时
- 注册时间
- 2009-4-15
- 帖子
- 815
|
35113329 发表于 2015-2-28 09:47
话说设定初期任务的开关是打开的前提下怎么游戏里的任务列表还是一片空白?话说在事件里call_guild打开还 ...
改好了,但是声明如下:
1.你给我的脚本应该是主站那个超级集合,我下了你的脚本,但是没有素材,所以一进去就报错,所以我没能测试使用结果,有问题你就回复我。
2.脚本我只改了“任务系统公会”这个脚本,其他地方没改,改动的地方我加了很明显的符号。
3.图片放在Graphics/system这个文件夹下
4.图片名必须为taskboard,你给我的图片是jpg的,我没能测试VA能不能直接显示JPG,我一般都是用PNG的。
5.因为没得测试,有些窗口我不知道是干嘛的,为了显示图片,我把他们的透明度改为0了,如果你发现哪个窗口是需要显示默认那种框框的,找到那个窗口,把我加的那句透明度为0的代码删掉就可以了。
脚本如下:- #==============================================================================
- # ■ VXAce-RGSS3-4-gld 任务系统【公会】 by Claimh 汉化:疾风怒涛
- #------------------------------------------------------------------------------
- #【事件脚本操作】
- #◆公会呼出办法
- # call_guild(公会ID)
- # ・普通的公会的公会ID为0或直接省略。
- # ・可以设定只能由特定公会发布的任务,运用时请对公会ID请设置合适的标志值。
- # 除了可以添加普通公会任务外,StGuild类可中特别指定某任务由某特定公会发布。
- #==============================================================================
- class Scene_Guild < Scene_MenuBase
- #--------------------------------------------------------------------------
- # ● 准备
- #--------------------------------------------------------------------------
- def prepare(id=0)
- @id = id
- end
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- ##############################tan12345改动开始
- create_scene_bg
- ##############################tan12345改动结束
- create_cation_window
- create_cmd_window
- create_list_window
- create_info_window
- create_rank_window
- create_select_window
- create_result_window
- setup_windows
- end
- ##############################tan12345改动开始
- #--------------------------------------------------------------------------
- # ● 背景图片生成
- #--------------------------------------------------------------------------
- def create_scene_bg
- @bg_sprite = Sprite.new
- @bg_sprite.bitmap = Cache.system("taskboard")
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- @bg_sprite.update
- end
- #--------------------------------------------------------------------------
- # ● 释放所有窗口
- #--------------------------------------------------------------------------
- def dispose_all_windows
- super
- @bg_sprite.dispose
- end
- ##############################tan12345改动结束
- #--------------------------------------------------------------------------
- # ● 命令窗口生成
- #--------------------------------------------------------------------------
- def create_cmd_window
- @cmd = Window_GuildCmd.new
- ##############################tan12345改动开始
- #这句话是用来使窗口变透明,以便显示背景图片
- @cmd.opacity = 0
- ##############################tan12345改动结束
- @cmd.set_handler(:ok, method(:cmd_ok))
- @cmd.set_handler(:cancel, method(:return_scene))
- end
- #--------------------------------------------------------------------------
- # ● 列表窗口生成
- #--------------------------------------------------------------------------
- def create_list_window
- @list = Window_QuestList.new(-1, @id)
- ##############################tan12345改动开始
- #这句话是用来使窗口变透明,以便显示背景图片
- @list.opacity = 0
- ##############################tan12345改动结束
- @list.set_handler(:ok, method(:list_ok))
- @list.set_handler(:cancel, method(:list_cancel))
- @list.set_handler(:cation, method(:list_cation))
- end
- #--------------------------------------------------------------------------
- # ● Info窗口生成
- #--------------------------------------------------------------------------
- def create_info_window
- @info = Window_QuestInfo.new
- ##############################tan12345改动开始
- #这句话是用来使窗口变透明,以便显示背景图片
- @info.opacity = 0
- ##############################tan12345改动结束
- end
- #----------------------------------------------------------------------------
- # ● Rank窗口生成
- #----------------------------------------------------------------------------
- def create_rank_window
- @rank = Window_QuestRank.new(true)
- ##############################tan12345改动开始
- #这句话是用来使窗口变透明,以便显示背景图片
- @rank.opacity = 0
- ##############################tan12345改动结束
- end
- #----------------------------------------------------------------------------
- # ● 选择窗口生成
- #----------------------------------------------------------------------------
- def create_select_window
- @select = Window_GuildSelect.new
- ##############################tan12345改动开始
- #这句话是用来使窗口变透明,以便显示背景图片
- @select.opacity = 0
- ##############################tan12345改动结束
- @select.set_handler(:ok, method(:select_ok))
- @select.set_handler(:cancel, method(:select_cancel))
- end
- #----------------------------------------------------------------------------
- # ● 警告窗口生成
- #----------------------------------------------------------------------------
- def create_cation_window
- @cation = Window_GuildCation.new
- ##############################tan12345改动开始
- #这句话是用来使窗口变透明,以便显示背景图片
- @cation.opacity = 0
- ##############################tan12345改动结束
- @cation.set_handler(:ok, method(:cation_cancel))
- @cation.set_handler(:cancel, method(:cation_cancel))
- end
- #----------------------------------------------------------------------------
- # ● 结果窗口生成
- #----------------------------------------------------------------------------
- def create_result_window
- @result = Window_QuestResult.new
- ##############################tan12345改动开始
- #这句话是用来使窗口变透明,以便显示背景图片
- @result.opacity = 0
- ##############################tan12345改动结束
- @result.set_handler(:ok, method(:result_cancel))
- @result.set_handler(:cancel, method(:result_cancel))
- end
- #----------------------------------------------------------------------------
- # ● 设置
- #----------------------------------------------------------------------------
- def setup_windows
- @list.help_window = @info
- @cmd.help_window = @list
- @cmd.activate
- if Quest::GUILD_LIST.size <= 1
- @cmd.hide
- @cmd.deactivate
- @list.activate
- end
- end
- #----------------------------------------------------------------------------
- # ● 种类选择
- #----------------------------------------------------------------------------
- def cmd_ok
- case Quest::GUILD_LIST[@cmd.index]
- when Quest::REPORT, Quest::SHOP; @list.activate
- when Quest::EXIT; return_scene
- end
- end
- #----------------------------------------------------------------------------
- # ● 列表选择取消
- #----------------------------------------------------------------------------
- def list_cancel
- @cmd.activate
- return_scene if Quest::GUILD_LIST.size <= 1
- end
- #----------------------------------------------------------------------------
- # ● 选择不可警告
- #----------------------------------------------------------------------------
- def list_cation
- @list.deactivate
- if Quest::GUILD_LIST[@cmd.index] == Quest::SHOP and $game_system.quest.over_playing?
- @cation.set_text("进行中的任务数\\n已达上限数")
- else
- @cation.set_text(@list.cause)
- cation_cancel unless @cation.active
- end
- end
- #----------------------------------------------------------------------------
- # ● 表选择
- #----------------------------------------------------------------------------
- def list_ok
- @select.select_start(Quest::GUILD_LIST[@cmd.index])
- end
- #----------------------------------------------------------------------------
- # ● 警告取消
- #----------------------------------------------------------------------------
- def cation_cancel
- @cation.hide
- @list.activate
- end
- #----------------------------------------------------------------------------
- # ● Y/N选择取消
- #----------------------------------------------------------------------------
- def select_cancel
- @list.activate
- @select.hide
- end
- #----------------------------------------------------------------------------
- # ● Y/N选择
- #----------------------------------------------------------------------------
- def select_ok
- case @select.index
- when 0
- case Quest::GUILD_LIST[@cmd.index]
- when Quest::REPORT; quest_report
- when Quest::SHOP; quest_start
- else; p "异常: Scene_Guild.update_select#{Quest::GUILD_LIST[@cmd.index]}"
- end
- else
- @list.activate
- end
- @select.hide
- end
- #----------------------------------------------------------------------------
- # ● 框架更新
- #----------------------------------------------------------------------------
- def result_cancel
- @result.hide
- @list.data_refresh(Quest::REPORT, true, @list.index)
- @list.activate
- end
- #----------------------------------------------------------------------------
- # ● 任务接受
- #----------------------------------------------------------------------------
- def quest_start
- if @list.current_item.commission > 0 # 缴纳手续费的场合Shop-SE
- Sound.play_shop
- else
- Sound.play_ok
- end
- @list.quest_start
- @rank.refresh
- @list.activate
- end
- #----------------------------------------------------------------------------
- # ● 任务报告
- #----------------------------------------------------------------------------
- def quest_report
- if @list.quest_clear?(@list.index)
- @list.quest_clear
- refresh_result
- elsif @list.quest_fail?(@list.index)
- @list.quest_fail
- refresh_result
- else
- Sound.play_buzzer
- @cation.set_text(@list.cause)
- end
- end
- def refresh_result
- @result.refresh(@list.current_item)
- @result.show
- @result.activate
- @rank.refresh
- end
- end
- class Window_GuildCmd < Window_Selectable
- #--------------------------------------------------------------------------
- # ● object初期化
- #--------------------------------------------------------------------------
- def initialize
- @commands = Quest.guild_name
- super(0, 0, Graphics.width, fitting_height(1))
- refresh
- self.index = 0
- end
- #--------------------------------------------------------------------------
- # ● 位数取得
- #--------------------------------------------------------------------------
- def col_max
- @commands.size
- end
- #--------------------------------------------------------------------------
- # ● 项目数取得
- #--------------------------------------------------------------------------
- def item_max
- @commands.size
- end
- #--------------------------------------------------------------------------
- # ● 项目描画
- #--------------------------------------------------------------------------
- def draw_item(index)
- draw_text(item_rect_for_text(index), @commands[index], 1)
- end
- #--------------------------------------------------------------------------
- # ● 帮助文本更新
- #--------------------------------------------------------------------------
- def update_help
- @help_window.data_refresh(Quest::GUILD_LIST[@index])
- @help_window.update_help
- end
- end
- class Window_GuildCation < Window_Selectable
- #--------------------------------------------------------------------------
- # ● object初期化
- #--------------------------------------------------------------------------
- def initialize
- super(200, 200, Graphics.width-200-32, fitting_height(2))
- self.z = 500
- hide
- self.pause = true
- end
- #--------------------------------------------------------------------------
- # ● 文本表示
- #--------------------------------------------------------------------------
- def set_text(text)
- return if text == ""
- self.contents.clear
- Quest.draw_quest_text(self.contents, 0, 0, contents_width, line_height, text)
- show
- activate
- end
- end
- class Window_GuildSelect < Window_Selectable
- #--------------------------------------------------------------------------
- # ● object初期化
- #--------------------------------------------------------------------------
- def initialize
- super(200, 200, Graphics.width-200-32, fitting_height(2))
- self.z = 500
- hide
- end
- #--------------------------------------------------------------------------
- # ● 位数取得
- #--------------------------------------------------------------------------
- def col_max
- return 2
- end
- #--------------------------------------------------------------------------
- # ● 项目数取得
- #--------------------------------------------------------------------------
- def item_max
- return 2
- end
- #--------------------------------------------------------------------------
- # ● 任务接受
- #--------------------------------------------------------------------------
- def select_start(type)
- case type
- when Quest::REPORT; text = "你要报告这个任务吗??"
- when Quest::SHOP; text = "你要接受这个任务吗?"
- else; return
- end
-
- self.index = 1
- self.contents.clear
-
- draw_text(0, 0, contents_width, line_height, text)
- draw_text(item_rect_for_text(0), "是", 1)
- draw_text(item_rect_for_text(1), "否", 1)
- activate.show
- end
- #--------------------------------------------------------------------------
- # ● 项目描画矩形取得
- #--------------------------------------------------------------------------
- def item_rect(index)
- rect = Rect.new
- rect.width = item_width
- rect.height = item_height
- rect.x = index % col_max * (item_width + spacing)
- rect.y = index / col_max * item_height + item_height
- rect
- end
- end
复制代码 |
|