注册会员 登录
Project1 返回首页

夜狠简单的个人空间 https://rpg.blue/?299141 [收藏] [复制] [分享] [RSS]

日志

【XP】调试模式下按S键显示地图上含增减道具指令的事件

已有 237 次阅读2016-12-1 16:38 |个人分类:XP脚本| 道具

#任意地图的任意事件 -> 事件 -> 脚本 -> Reisen::MapCommonEvent.new
#调试模式下按S键显示地图上含增减道具指令的事件  by 买买提
class Game_Player < Game_Character
  alias old_161201_update update
  def update
    old_161201_update
    # 调试模式为 OFF 并且 按下 S 键的情况下
    Reisen::MapCommonEvent.new if Input.press?(Input::Y)
  end
end
module Reisen
  Animation_plus=598#增加道具播放的动画id
  Animation_sub=599#减少道具播放的动画id
  Animation_unknown=600#不方便准确判断得失的动画id
  class MapCommonEvent
    def initialize
       @map=$game_map
       write_event;$game_player.animation_id =597
    end
    def write_event
    @map.events.each {|key,value|next if !value.list 
    value.list.each{|list|@plus=Animation_plus
    @sub=Animation_sub;@unknown=Animation_unknown
     case list.code
     when 125..128#钱、物品、武器、防具,因变量操作判断复杂.视为未知情况
       i=list.code>125 ?1:0;animation_id=list.parameters[i]<1 ? 
       (list.parameters[i+1]<1 ?(list.parameters[i+2]>0 ?@plus:@sub):@unknown):
       (list.parameters[i+1]<1 ?(list.parameters[i+2]<0 ?@plus:@sub):@unknown)
       $game_map.events[key].animation_id = animation_id
     when 655,355  # 脚本事件
       list.parameters.each { |parameter|
       $game_map.events[key].animation_id = @unknown if 
       parameter =~ /\s*\S*(gain_item[(])/  or
       parameter =~ /\s*\S*(gain_gold[(])/  or
       parameter =~ /\s*\S*(gain_armor[(])/ or
       parameter =~ /\s*\S*(gain_weapon[(])/ }
     end}}
   end
  end
end

鸡蛋

鲜花

评论 (0 个评论)

facelist doodle 涂鸦笔

您需要登录后才可以评论 登录 | 注册会员

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-19 10:15

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

返回顶部