赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 8559 |
最后登录 | 2015-8-26 |
在线时间 | 439 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 439 小时
- 注册时间
- 2013-3-2
- 帖子
- 710
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
从天干宝典里挖出来的脚本,也把查看等级设置成最高了
可是敌人显示的资料都是????
请问大神们,要怎么设置才对
- #==============================================================================
- # 探查技能 BY绿发的Eclair
- #------------------------------------------------------------------------------
- # 使用方法:在数据库中设定一个叫“探查”的状态(想要用别的名字在下面改啦~)
- # 然后把想要做成有探查效果的特技或物品附加这个状态。就这样简单~~
- # 修改自然属性的个数在第16行。
- #==============================================================================
- # 探查技能加强 BY snstar2006
- #------------------------------------------------------------------------------
- # 加强部分:
- # 1. 敌人的属性为[王]的话,HP和SP不会显示,直到HP少於一半才会显示。
- # 2. 用变数做技能等级,可以直接用事件升级、降级。
- # 3. 可以设置不同能力所需要的等级。等级不够时显示为????。
- # 4. 设置为四格掉宝内的宝物看不见。
- #==============================================================================
- $探查状态名 = "探查" # 探查状态的名字
- $eye_level = 1 # 探查技能等级的变数ID
- $头目属性名 = "王"
- # 探查能力的等级
- $eye_level_ability = [0, 1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, 12, 13, 14]
- # 依次为:
- # 0->名称 、1->HP+SP、2->HP+SP Max、3->种族、
- # 4->经验 、5->金钱 、6->掉落物 、7->攻击、
- # 8->物防 、9->魔防 、10->力量 、11->灵巧、
- # 12->速度、13->魔力、14->属性有效度
- $text_4_unknown = "????" # 未知时的文字
- class Window_cateyes < Window_Base
- def initialize
- super(120,40,400,400)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.visible = false
- self.z = 9999
- self.back_opacity = 160 #信息窗口的透明度
- [url=home.php?mod=space&uid=12971]@element[/url] = 8 #自然属性个数
- [url=home.php?mod=space&uid=29967]@Race[/url] = 8
- end
- def set_target(target)
- self.contents.clear
- self.visible = true
- @target = target
-
- if $game_variables[$eye_level] >= $eye_level_ability[0]
- self.contents.draw_text(10,10,360-32,32,"#{@target.name}",0)
- else
- self.contents.draw_text(10,10,360-32,32,$text_4_unknown,0)
- end
-
-
- # 描绘种族
- self.contents.font.color = system_color
- self.contents.draw_text(10,100,180,32,"种族",0)
- self.contents.font.color = normal_color
- for i in @element + 1..@element+1+@race
- if @target.element_rate(i) > 100
- race = $data_system.elements[i]
- break
- end
- end
-
- # 獲取是否為頭目
- for i in @element + 2 + @race..$data_system.elements.size
- unless $data_system.elements[i] == $头目属性名
- # 检验是否显示HP/SP
- if (@target.hp)<=(@target.maxhp/2)
- @show_hsp = true
- else
- @show_hsp = false
- end
- else
- @show_hsp = true
- end
- end
-
- # 描绘HP
- draw_actor_hp(@target,10,100 - 32 - 25,160)
- # 描绘SP
- draw_actor_sp(@target,10,100 - 32,160)
-
-
- if $game_variables[$eye_level] >= $eye_level_ability[3]
- self.contents.draw_text(70,100,100,32,race,2)
- else
- self.contents.draw_text(70,100,100,32,$text_4_unknown,2)
- end
-
- # 目标是敌方角色的场合
- if @target.is_a?(Game_Enemy)
- # 描绘经验
- self.contents.font.color = system_color
- self.contents.draw_text(190,100 - 32 - 25,180-32,32,"经验",0)
- self.contents.font.color = normal_color
- if $game_variables[$eye_level] >= $eye_level_ability[4]
- self.contents.draw_text(190,100 - 32 - 25,180 - 32,32,"#{@target.exp}",2)
- else
- self.contents.draw_text(190,100 - 32 - 25,180 - 32,32,$text_4_unknown,2)
- end
- # 描绘金钱
- self.contents.font.color = system_color
- self.contents.draw_text(190,100 - 32 ,180-32,32,$data_system.words.gold,0)
- self.contents.font.color = normal_color
- if $game_variables[$eye_level] >= $eye_level_ability[5]
- self.contents.draw_text(190,100 - 32,180-32,32,"#{@target.gold}",2)
- else
- self.contents.draw_text(190,100 - 32,180-32,32,$text_4_unknown,2)
- end
- # 描绘掉落物
- self.contents.font.color = system_color
- self.contents.draw_text(190,100 ,180,32,"携带",0)
- self.contents.font.color = normal_color
- if $game_variables[$eye_level] >= $eye_level_ability[6]
- if (target.item_id > 0 or target.weapon_id != 0 or target.armor_id != 0)
- draw_item_name($data_items[@target.item_id],197,57 + 25 + 25 + 25) if @target.item_id > 0
- draw_item_name($data_weapons[@target.weapon_id],197,57 + 25 + 25 + 25) if @target.weapon_id > 0
- draw_item_name($data_armors[@target.armor_id],197,57 + 25 + 25 + 25) if @target.armor_id > 0
- else
- self.contents.draw_text(190,57+75,180-32,32,"无",2)
- end
- else
- self.contents.draw_text(197,57 + 75,180-32,32,$text_4_unknown,2)
- end
- end
-
- # 描绘攻击
- if $game_variables[$eye_level] >= $eye_level_ability[7]
- draw_actor_parameter(@target, 10, 112 + 20, 0)
- else
- draw_actor_parameter_u(10, 112 + 20, 0)
- end
- # 描绘物理防御
- if $game_variables[$eye_level] >= $eye_level_ability[8]
- draw_actor_parameter(@target, 10, 144 + 20, 1)
- else
- draw_actor_parameter_u(10, 144 + 20, 1)
- end
- # 描绘魔法防御
- if $game_variables[$eye_level] >= $eye_level_ability[9]
- draw_actor_parameter(@target, 10, 176 + 20, 2)
- else
- draw_actor_parameter_u(10, 176 + 20, 2)
- end
- # 描绘力量
- if $game_variables[$eye_level] >= $eye_level_ability[10]
- draw_actor_parameter(@target, 10, 208 + 20, 3)
- else
- draw_actor_parameter_u(10, 208 + 20, 3)
- end
- # 描绘灵巧
- if $game_variables[$eye_level] >= $eye_level_ability[11]
- draw_actor_parameter(@target, 10, 240 + 20, 4)
- else
- draw_actor_parameter_u(10, 240 + 20, 4)
- end
- # 描绘速度
- if $game_variables[$eye_level] >= $eye_level_ability[12]
- draw_actor_parameter(@target, 10, 272 + 20, 5)
- else
- draw_actor_parameter_u(10, 272 + 20, 5)
- end
- # 描绘魔力
- if $game_variables[$eye_level] >= $eye_level_ability[13]
- draw_actor_parameter(@target, 10, 304 + 20, 6)
- else
- draw_actor_parameter_u(10, 304 + 20, 6)
- end
-
- # 描绘属性抵抗度
- self.contents.font.color = system_color
- self.contents.draw_text(190,153 + 12,180,32,"属性抵抗",0)
- self.contents.font.color = normal_color
- num = @element_max == 0 ? $data_system.elements.size : @element_max
- y = 0
- weaker = ""
- weak = ""
- resist = ""
- guard = ""
- recover = ""
- race = ""
- for i in 1..@element
- case @target.element_rate(i)
- when 151..200
- weaker += $data_system.elements[i]
- when 101..150
- weak += $data_system.elements[i]
- when 1..99
- resist += $data_system.elements[i]
- when 0
- guard += $data_system.elements[i]
- when -200..-1
- recover += $data_system.elements[i]
- end
- end
- if $game_variables[$eye_level] >= $eye_level_ability[14]
- if weaker != ""
- weaker += "超弱"
- self.contents.draw_text(190,153 + 32+ 12,180,32,weaker,0)
- y += 1
- end
- if weak != ""
- weak += "弱点"
- self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,weak,0)
- y += 1
- end
- if resist != ""
- resist += "抵抗"
- self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,resist,0)
- y += 1
- end
- if guard != ""
- guard += "无效"
- self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,guard,0)
- y += 1
- end
- if recover != ""
- recover += "吸收"
- self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,recover,0)
- end
- else
- self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,$text_4_unknown,0)
- end
-
- end
- def draw_item_name(item, x, y)
- if item == nil
- return
- end
- bitmap = RPG::Cache.icon(item.icon_name)
- self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 28, y, 150, 32, item.name)
- end
-
- def draw_actor_parameter_u(x, y, type)
- case type
- when 0
- parameter_name = $data_system.words.atk
- when 1
- parameter_name = $data_system.words.pdef
- when 2
- parameter_name = $data_system.words.mdef
- when 3
- parameter_name = $data_system.words.str
- when 4
- parameter_name = $data_system.words.dex
- when 5
- parameter_name = $data_system.words.agi
- when 6
- parameter_name = $data_system.words.int
- end
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 120, 32, parameter_name)
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 120, y, 36, 32, $text_4_unknown, 2)
- end
- def draw_actor_hp(actor, x, y, width = 144)
- # Draw "HP" text string
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
- # Calculate if there is draw space for MaxHP
- if width - 32 >= 108
- hp_x = x + width - 108
- flag = true
- elsif width - 32 >= 48
- hp_x = x + width - 48
- flag = false
- end
- # Draw HP
- self.contents.font.color = actor.hp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
- if $game_variables[$eye_level] >= $eye_level_ability[1] and @show_hsp
- self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
- else
- self.contents.draw_text(hp_x, y, 48, 32, $text_4_unknown, 2)
- end
- # Draw MaxHP
- if flag
- self.contents.font.color = normal_color
- self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
- if $game_variables[$eye_level] >= $eye_level_ability[2] and @show_hsp
- self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
- else
- self.contents.draw_text(hp_x + 60, y, 48, 32, $text_4_unknown)
- end
- end
- end
- def draw_actor_sp(actor, x, y, width = 144)
- # Draw "SP" text string
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
- # Calculate if there is draw space for MaxHP
- if width - 32 >= 108
- sp_x = x + width - 108
- flag = true
- elsif width - 32 >= 48
- sp_x = x + width - 48
- flag = false
- end
- # Draw SP
- self.contents.font.color = actor.sp == 0 ? knockout_color :
- actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
- if $game_variables[$eye_level] >= $eye_level_ability[1] and @show_hsp
- self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
- else
- self.contents.draw_text(sp_x, y, 48, 32, $text_4_unknown, 2)
- end
- # Draw MaxSP
- if flag
- self.contents.font.color = normal_color
- self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
- if $game_variables[$eye_level] >= $eye_level_ability[2] and @show_hsp
- self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
- else
- self.contents.draw_text(sp_x + 60, y, 48, 32, $text_4_unknown)
- end
- end
- end
- end
- class Scene_Battle
- alias update_phase4_step5_eclair2 :update_phase4_step5
- def update_phase4_step5
- for i in 1..$data_states.size - 1
- if $data_states[i].name == $探查状态名
- $探查状态ID = i
- break
- end
- end
- if (@active_battler.current_action.kind == 1 and $data_skills[@active_battler.current_action.skill_id].plus_state_set.include?($探查状态ID)) or (@active_battler.current_action.kind == 2 and $data_items[@active_battler.current_action.skill_id].plus_state_set.include?($探查状态ID))
- @eye_window = Window_cateyes.new
- for target in @target_battlers
- target.damage = ""
- @eye_window.set_target(target)
- for i in 0...120
- Input.update
- @eye_window.update
- Graphics.update
- @spriteset.update
- if Input.trigger?(Input::C) or Input.trigger?(Input::B)
- $game_system.se_play($data_system.decision_se)
- break
- end
- end
- end
- @eye_window.dispose
- @eye_window = nil
- end
- update_phase4_step5_eclair2
- end
- end
- #==============================================================================
- # 探查技能 BY绿发的Eclair
- # 加強 BY snstar2006
- #==============================================================================
复制代码 |
|