#============================================================================== # ก Scan_States vol.1.00s #------------------------------------------------------------------------------ # --- 08/02/10 ----- vol.1.00 --> By mwhidesp # HP/MP‚ exp/gold # --- 08/04/14 ----- vol.1.00s ---> Mo hengmana # Monstre States and Item Drop #============================================================================== # ก Window_Help #============================================================================== class Window_Help < Window_Base if !$@;alias hidesp_scan_set_enemy set_enemy;end def set_enemy(enemy) if enemy.scan[1] == true self.contents.clear if $enemies_abc != nil self.contents.draw_text(4, 0, 120+120, 32,plus_name?(enemy)) else draw_actor_name(enemy, 4, 0) draw_actor_state(enemy, 140, 0) end draw_actor_hp(enemy, 284, 0) draw_actor_sp(enemy, 460, 0) @text = nil self.visible = true else hidesp_scan_set_enemy(enemy) end end end #============================================================================== # ก Game_Battler #============================================================================== class Game_Battler attr_accessor :scan # [‚‚โ‚ิ‚้]”ญ“ฎƒtƒ‰ƒO #-------------------------------------------------------------------------- # ก ƒIƒuƒWƒFƒNƒg‰Š๚‰ป #-------------------------------------------------------------------------- if !$@;alias hidesp_scan_initialize initialize;end def initialize #  Œณ‚ฬˆ—‚๐Œฤ‚ัo‚ต hidesp_scan_initialize @scan = [false,false] end #-------------------------------------------------------------------------- # ก ƒXƒLƒ‹‚ฬŒ๘‰ส“K—p #-------------------------------------------------------------------------- if !$@;alias hidesp_skill_effect_scan skill_effect;end def skill_effect(user, skill) if skill.name == "Cross Cut" self.scan[0] = true return true else hidesp_skill_effect_scan(user, skill) end end end #============================================================================== # ก Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ก ƒtƒŒ[ƒ€XV (ƒƒCƒ“ƒtƒF[ƒY ƒXƒeƒbƒv 5 : ƒ_ƒ[ƒW•\Žฆ) #-------------------------------------------------------------------------- if !$@;alias hidesp_scan_update_p4s5 update_phase4_step5;end def update_phase4_step5 if @target_battlers[0] == nil hidesp_scan_update_p4s5 return end if @target_battlers.size != 1 hidesp_scan_update_p4s5 return end if @target_battlers[0].scan[0] == true @help_window.visible = false @scan_window = Window_Scan.new(@target_battlers[0]) if $enemies_abc != nil # @help_window.set_text(@help_window.plus_name?(@target_battlers[0]) + "123",0) else # @help_window.set_text(@target_battlers[0].name + "456",0) end @help_window.back_opacity = 255 @wait_count = 9999 while @wait_count > 0 Graphics.update Input.update @wait_count -= 1 if Input.trigger?(Input::B) @wait_count = 0 end end @wait_count = 10 @help_window.back_opacity = 160 @scan_window.dispose @wait_count = 16 @target_battlers[0].scan[1] = true @target_battlers[0].scan[0] = false @phase4_step = 6 return else hidesp_scan_update_p4s5 return end end end #============================================================================== # ก [‚‚โ‚ิ‚้]‚ล•\Žฆ‚ท‚้ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE #============================================================================== class Window_Scan < Window_Base #-------------------------------------------------------------------------- # ก ƒIƒuƒWƒFƒNƒg‰Š๚‰ป #-------------------------------------------------------------------------- def initialize(user) super(0, 0, 640, 480 - 160) self.contents = Bitmap.new(width-32, height-32) self.back_opacity = 222 self.z = 9 refresh(user) end #-------------------------------------------------------------------------- # ก ƒŠƒtƒŒƒbƒVƒ… #-------------------------------------------------------------------------- def refresh(user) self.contents.clear self.contents.font.color = normal_color x,y = 320 ,0 #  ƒoƒgƒ‰[‰ๆ‘œ‚๐•`‰ๆ bitmap = RPG::Cache.battler(user.battler_name, user.battler_hue) cw,ch = bitmap.width,bitmap.height bitmap.width > self.width-32 ? px = 0 : px = ((self.width-48)/4) - (cw/2) bitmap.height > self.height-32 ? py = 0 : py = ((self.height-48)/2) - (ch/2) self.contents.blt(px,py, bitmap,Rect.new(0,0,cw,ch)) self.contents.draw_text(x -10, y, 150, 32, user.name.to_s,0) draw_actor_state(user, x + 150, y) draw_actor_hp(user, x -10, y+32, 144) draw_actor_sp(user, x + 150, y+32, 144) self.contents.font.color = system_color self.contents.draw_text(x, y +12+28*2, 42, 32, $data_system.words.atk.to_s,0) self.contents.draw_text(x, y +12+28*3, 42, 32, $data_system.words.pdef.to_s,0) self.contents.draw_text(x, y +12+28*4, 42, 32, $data_system.words.mdef.to_s,0) self.contents.draw_text(x+100, y +12+28*2, 42, 32, $data_system.words.str.to_s,0) self.contents.draw_text(x+100, y +12+28*3, 42, 32, $data_system.words.dex.to_s,0) self.contents.draw_text(x+100, y +12+28*4, 42, 32, 'EVA'.to_s,0) self.contents.draw_text(x+200, y +12+28*2, 42, 32, $data_system.words.agi.to_s,0) self.contents.draw_text(x+200, y +12+28*3, 42, 32, $data_system.words.int.to_s,0) self.contents.font.color = normal_color self.contents.draw_text(x+40, y +12+28*2, 42, 32, user.atk.to_s,2) self.contents.draw_text(x+40, y +12+28*3, 42, 32, user.pdef.to_s,2) self.contents.draw_text(x+40, y +12+28*4, 42, 32, user.mdef.to_s,2) self.contents.draw_text(x+140, y +12+28*2, 42, 32, user.str.to_s,2) self.contents.draw_text(x+140, y +12+28*3, 42, 32, user.dex.to_s,2) self.contents.draw_text(x+140, y +12+28*4, 42, 32, user.eva.to_s,2) self.contents.draw_text(x+240, y +12+28*2, 42, 32, user.agi.to_s,2) self.contents.draw_text(x+240, y +12+28*3, 42, 32, user.int.to_s,2) if user.is_a?(Game_Actor) elsif user.is_a?(Game_Enemy) if $data_enemies[user.id].item_id != 0 bitmap = RPG::Cache.icon($data_items[$data_enemies[user.id].item_id].icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x+50, 200 +4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x+80, 200 -4, 212, 32, $data_items[$data_enemies[user.id].item_id].name+" "+$data_enemies[user.id].treasure_prob.to_s + " %", 0) #nom end if $data_enemies[user.id].weapon_id != 0 bitmap = RPG::Cache.icon($data_weapons[$data_enemies[user.id].weapon_id].icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x+50, 200 +4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x +80, 200 -4, 212, 32, $data_weapons[$data_enemies[user.id].weapon_id].name+" "+$data_enemies[user.id].treasure_prob.to_s + " %", 0) #nom end if $data_enemies[user.id].armor_id != 0 bitmap = RPG::Cache.icon($data_armors[$data_enemies[user.id].armor_id].icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x+50, 200 +4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x +80, 200 -4, 212, 32, $data_armors[$data_enemies[user.id].armor_id].name+" "+$data_enemies[user.id].treasure_prob.to_s + " %", 0) #nom end self.contents.font.color = normal_color self.contents.draw_text(x+0, y+32*5, 110, 32, user.exp.to_s,2) self.contents.draw_text(x+160, y+32*5, 120, 32, user.gold.to_s,2) self.contents.font.color = system_color self.contents.draw_text(x, y+200 - 4, 64, 32, $data_system.words.item) self.contents.draw_text(x, y+32*5, 64, 32, "EXP") self.contents.draw_text(x+190, y+32*5, 128, 32, $data_system.words.gold) else p "Error!" ;Error! end self.contents.font.color = system_color self.contents.draw_text(0, 0,120, 32, "[X] ออก") self.contents.font.color = normal_color end end