没啥技术含量,高手54吧~
就是用事件制作暗雷遇敌,效果和真的暗雷看上去是一样的.
作用:
可以在战斗胜利后(暗雷)任意调用公共事件,比如说战斗后随机获得很多宝物,战斗胜利后
回复HP/SP,与精英怪物战斗可以回复更多的HP/SP,以及随机获得经验奖励,学习敌人技能等.
并且可以与其他地图的暗雷混合使用.
优点:操作性强,不需要脚本.并且能针对不同敌人而造出不同效果,任意调用不同数量的公共事件.
缺点:事件的通用缺点----比较麻烦.
另外,这个工程需要用到66的获得物品提示脚本,修改了一下贴出来(增加了些功能):
- # ————————————————————————————————————# 本脚本来自www.66rpg.com,转载请保留此信息# ———————————————————————————————————— # 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。# 新增获得经验值提示,喝水后回复提示和增减等级提示.# 开关定义:$不显示金钱窗口 = 3$不显示物品窗口 = 3$不显示武器窗口 = 3$不显示防具窗口 = 3# 以上开关,当打开的时候,获得物品将不会提示,比如默认打开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 def command_315 # 获取操作值 value = operate_value(@parameters[1], @parameters[2], @parameters[3]) # 处理重复 iterate_actor(@parameters[0]) do |actor| # 更改角色 EXP actor.exp += value end 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, "exp",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 return true end def command_314 # 处理重复 iterate_actor(@parameters[0]) do |actor| # 角色全回复 actor.recover_all end carol3_66RPG = Window_Base.new((640-160)/2,128,120,60) carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32) carol3_66RPG.contents.draw_text(0,0,240,32,"完全恢复") #——声效,可以自己改 Audio.se_play("Audio/SE/"+"105-Heal01",80,100) 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 # 继续 return true end def command_316 # 获取操作值 value = operate_value(@parameters[1], @parameters[2], @parameters[3]) # 处理重复 iterate_actor(@parameters[0]) do |actor| # 更改角色的等级 actor.level += value end 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, "级",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 # 继续 return true endend复制代码
复制代码截图:
在指定地点插入你想要的公共事件:
目前在范例里制做了5个公共事件,第5个是驱魔香,对于这种事件暗雷的遇敌,驱魔香的用法
有点不同:(30秒内不遇敌)
范例工程:
本帖来自P1论坛作者夏季冰川,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:
https://rpg.blue/forum.php?mod=viewthread&tid=137116 若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。