Nicolas Admin
Messages : 606 Date d'inscription : 02/08/2010 Age : 28 Localisation : Popian
| Sujet: Vie/magie perso sur la map Dim 19 Sep - 15:07 | |
| [url] http://www.megaupload.com/?d=F7Q4XC6T|[/irl]ça vous intéresse alors voila le script (pas besoin d'une démo pour si peu ...) J'oubliai, il est de Shanghai - Spoiler:
#=============================================================================== # # Shanghai Simple Script - Map Status Window # Last Date Updated: 2010.05.09 # Level: Easy # # This is a script that makes the party window appear on the map when the player # presses the S button. It disappears once the player presses any other button # and reappears once the S button is pressed again. #=============================================================================== # Instructions # ----------------------------------------------------------------------------- # To install this script, open up your script editor and copy/paste this script # to an open slot below ▼ Materials but above ▼ Main. Remember to save. #=============================================================================== $imported = {} if $imported == nil $imported["MapStatusWindow"] = true #============================================================================== # ** Window_MapStatusWindow #============================================================================== class Window_MapStatusWindow < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize total_width = $game_party.members.size * 96 super(0, 0, total_width, WLH*4+32) self.x = (Graphics.width - total_width)/2 self.y = Graphics.height-WLH*4-32 @spacing = 0 @column_max = $game_party.members.size self.openness = 0 refresh end #-------------------------------------------------------------------------- # * Get rectangle for displaying items #-------------------------------------------------------------------------- def item_rect(index) rect = Rect.new(0, 0, 0, 0) rect.width = (contents.width + @spacing) / @column_max - @spacing rect.height = contents.height rect.x = index % @column_max * (rect.width + @spacing) rect.y = index / @column_max * WLH return rect end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear @data = $game_party.members @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # * Draw Item #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) actor = @data[index] draw_actor_face(actor, rect.x+2, rect.y, [92, rect.width].min) draw_actor_name(actor, rect.x+2, rect.y) draw_actor_state(actor, rect.x, rect.y + WLH, rect.width) draw_actor_hp(actor, rect.x+2, rect.y + WLH*2, rect.width-4) draw_actor_mp(actor, rect.x+2, rect.y + WLH*3, rect.width-4) end end #============================================================================== # ** Scene_Map #============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- alias start_sss_map_status_window start unless $@ def start start_sss_map_status_window @map_status_window = Window_MapStatusWindow.new end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- alias terminate_sss_map_status_window terminate unless $@ def terminate @map_status_window.dispose terminate_sss_map_status_window end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- alias update_sss_map_status_window update unless $@ def update update_sss_map_status_window unless $game_message.visible update_map_status_window end end #-------------------------------------------------------------------------- # * Update Map Status Window #-------------------------------------------------------------------------- def update_map_status_window @map_status_window.update if Input.trigger?(Input::Y) and Input.dir8 == 0 return if @map_status_window.openness > 0 return if $game_map.interpreter.running? Sound.play_decision @map_status_window.refresh @map_status_window.open elsif Input.dir8 > 0 or $game_map.interpreter.running? @map_status_window.close end end end #=============================================================================== # # END OF FILE # #===============================================================================
| |
|