赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 11111 |
最后登录 | 2015-1-27 |
在线时间 | 19 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 19 小时
- 注册时间
- 2007-12-30
- 帖子
- 89
|
怎么才能更改得到物品或者对话时的背景图?
得到物品,显示图片。 对话?你指头像? 那个也是显示图片。
还有就是他们的任务怎么弄的?
简易任务脚本
- #添加主线任务的方法 : 在事件中代入脚本: $任务 = "这里写你的任务" (注意输入的时候引号不要丢.)
- #添加支线任务的方法 : 在事件中代入脚本: $支线 = "这里写你的任务" 完成任务的时候输入脚本: $支线完成 = "这里任务与添加时务必一样" (这里输入脚本里的任务名称务必与添加时一至,否则不起任何效果.)
- #注意:添加多个支线任务时,中间必须有对话或者其他事件隔开,不能都密密麻麻写在一起,否则只会读取最后一个任务。
- #==============================================================================
- # 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
复制代码
需要公共事件+物品呼叫出来,适合新手。
显示得到什么物品的脚本誰有的话发給我.
得到物品脚本
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。
- # 开关定义:
- $不显示金钱窗口 = 41
- $不显示物品窗口 = 42
- $不显示武器窗口 = 43
- $不显示防具窗口 = 44
- # 以上开关,当打开的时候,获得物品将不会提示,比如默认打开41号开关,获得金钱不再提示
- # ————————————————————————————————————
- class Interpreter
- #--------------------------------------------------------------------------
- # ● 增减金钱
- #--------------------------------------------------------------------------
- def command_125
- value = operate_value(@parameters[0], @parameters[1], @parameters[2])
- $game_party.gain_gold(value)
- if $game_switches[$不显示金钱窗口]==false
- carol3_66RPG = Window_Base.new((640-160)/2,128,180,100)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.draw_text(0,0,240,32,"获得金钱:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"006-System06",80,100)
- else
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去金钱:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"005-System05",80,100)
- end
- carol3_66RPG.contents.draw_text(0,32,240,32,value.abs.to_s)
- carol3_66RPG.contents.draw_text(0,32,140,32, $data_system.words.gold,2)
- carol3_66RPG.opacity = 160
- for i in 0..30
- Graphics.update
- end
- for i in 0..10
- carol3_66RPG.opacity -= 30
- carol3_66RPG.contents_opacity -= 30
- Graphics.update
- end
- carol3_66RPG.dispose
- end
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减物品
- #--------------------------------------------------------------------------
- def command_126
- value = operate_value(@parameters[1], @parameters[2], @parameters[3])
- $game_party.gain_item(@parameters[0], value)
- if $game_switches[$不显示物品窗口]==false
- carol3_66RPG_item = $data_items[@parameters[0]]
- carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"006-System06",80,100)
- else
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"005-System05",80,100)
- end
- carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
- carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
- carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
- carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
- carol3_66RPG.opacity = 160
- for i in 0..30
- Graphics.update
- end
- for i in 0..10
- carol3_66RPG.opacity -= 30
- carol3_66RPG.contents_opacity -= 30
- Graphics.update
- end
- carol3_66RPG.dispose
- end
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减武器
- #--------------------------------------------------------------------------
- def command_127
- value = operate_value(@parameters[1], @parameters[2], @parameters[3])
- $game_party.gain_weapon(@parameters[0], value)
- if $game_switches[$不显示武器窗口]==false
- carol3_66RPG_item = $data_weapons[@parameters[0]]
- carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"006-System06",80,100)
- else
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"005-System05",80,100)
- end
- carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
- carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
- carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
- carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
- carol3_66RPG.opacity = 160
- for i in 0..30
- Graphics.update
- end
- for i in 0..10
- carol3_66RPG.opacity -= 30
- carol3_66RPG.contents_opacity -= 30
- Graphics.update
- end
- carol3_66RPG.dispose
- end
- return true
- end
- #--------------------------------------------------------------------------
- # ● 增减防具
- #--------------------------------------------------------------------------
- def command_128
- value = operate_value(@parameters[1], @parameters[2], @parameters[3])
- $game_party.gain_armor(@parameters[0], value)
- if $game_switches[$不显示防具窗口]==false
- carol3_66RPG_item = $data_armors[@parameters[0]]
- carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
- carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
- if value >= 0
- carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"006-System06",80,100)
- else
- carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")
- #——声效,可以自己改
- Audio.se_play("Audio/SE/"+"005-System05",80,100)
- end
- carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
- carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
- carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
- carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
- carol3_66RPG.opacity = 160
- for i in 0..30
- Graphics.update
- end
- for i in 0..10
- carol3_66RPG.opacity -= 30
- carol3_66RPG.contents_opacity -= 30
- Graphics.update
- end
- carol3_66RPG.dispose
- end
- return true
- end
- end
-
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
复制代码
|
|