CrowMakerVX

Untitled

Aug 2nd, 2012
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 6.33 KB | None | 0 0
  1. class Window_StatesCharacter < Window_Selectable
  2.  
  3.  def initialize(actor = $game_party.members[0])
  4.     super(0, 0, 200, 416)
  5.     @actor = actor
  6.     refresh
  7.   end
  8.  
  9.  
  10.  
  11.   def refresh
  12.     self.contents.clear
  13.     draw_actor_face(@actor, 0, 4)
  14.     draw_actor_graphic(@actor, 85, 100)
  15.     self.contents.font.color = power_up_color
  16.     self.contents.draw_text(8, 4, self.width, WLH, @actor.xstats.char)
  17.     self.contents.draw_text(85, 85, self.width, WLH, @actor.xstats.size)
  18.     self.contents.font.color = normal_color
  19.     self.contents.draw_text(80, 4, self.width, WLH, @actor.xstring.gender)
  20.     draw_actor_name(@actor, 4, 105)
  21.     self.contents.font.color = system_color
  22.     self.contents.draw_text(4, 135, self.width, WLH, "LV ")
  23.     self.contents.draw_text(24, 135, self.width, WLH, @actor.level)
  24.     self.contents.font.color = normal_color
  25.     draw_actor_class(@actor, 50, 135)
  26.     if @actor.xstring.race == "Fole"
  27.       self.contents.font.color = text_color(0)
  28.       self.contents.draw_text(4, 165, self.width, WLH, "FOLE")
  29.     elsif @actor.xstring.race == "Gray"
  30.       self.contents.draw_text(4, 165, self.width, WLH, "GRAY")
  31.       self.contents.font.color = text_color(15)
  32.     elsif @actor.xstring.race == "Vanian"
  33.       self.contents.draw_text(4, 165, self.width, WLH, "VANIAN")
  34.       self.contents.font.color = text_color(17)
  35.     end
  36.     self.contents.font.color = normal_color
  37.     self.contents.draw_text(4, 195, self.width, WLH, @actor.xstring.hometown)
  38.     self.contents.font.color = system_color
  39.     self.contents.draw_text(4, 225, self.width, WLH, @actor.xstring.move)
  40.     self.contents.font.color = normal_color
  41.     self.contents.draw_text(90, 225, self.width, WLH, @actor.xstats.tx)
  42.     if @actor.xstring.element == "FIRE"
  43.       self.contents.font.color = text_color(2)
  44.       self.contents.draw_text(4, 255, self.width, WLH, @actor.xstring.element)
  45.     elsif @actor.xstring.element == "EARTH"
  46.       self.contents.font.color = text_color(25)
  47.       self.contents.draw_text(4, 255, self.width, WLH, @actor.xstring.element)
  48.     elsif @actor.xstring.element == "WATER"
  49.       self.contents.font.color = text_color(23)
  50.       self.contents.draw_text(4, 255, self.width, WLH, @actor.xstring.element)
  51.     elsif @actor.xstring.element == "WIND"
  52.       self.contents.font.color = text_color(7)
  53.       self.contents.draw_text(4, 255, self.width, WLH, @actor.xstring.element)
  54.     elsif @actor.xstring.element == "DARK"
  55.       self.contents.font.color = text_color(15)
  56.       self.contents.draw_text(4, 255, self.width, WLH, @actor.xstring.element)
  57.     elsif @actor.xstring.element == "LIGHT"
  58.       self.contents.font.color = text_color(6)
  59.       self.contents.draw_text(4, 255, self.width, WLH, @actor.xstring.element)
  60.     elsif @actor.xstring.element == "STORM"
  61.       self.contents.font.color = text_color(17)
  62.       self.contents.draw_text(4, 255, self.width, WLH, @actor.xstring.element)
  63.     end
  64.     self.contents.font.color = system_color
  65.     self.contents.draw_text(4, 285, self.width, WLH, "AGE")
  66.     self.contents.font.color = normal_color
  67.     self.contents.draw_text(60, 285, self.width, WLH, @actor.xstats.age)
  68.     self.contents.font.color = system_color
  69.     self.contents.draw_text(4, 315, self.width, WLH, "HT")
  70.     self.contents.font.color = normal_color
  71.     self.contents.draw_text(60, 315, self.width, WLH, @actor.xstats.chhgt)
  72.     self.contents.font.color = system_color
  73.     self.contents.draw_text(4, 345, self.width, WLH, "WT")
  74.     self.contents.font.color =  normal_color
  75.     self.contents.draw_text(60, 345, self.width, WLH, @actor.xstats.chwgt)
  76.    
  77.   end
  78. end
  79.  
  80.  
  81. ################################################################################
  82. class Window_StatesVitals < Window_Base
  83.  
  84.   def initialize(actor = $game_party.members[0])
  85.     super(200, 0, 400, 120)
  86.     @actor = actor
  87.     refresh
  88.   end
  89.  
  90.   def refresh
  91.     draw_actor_hp(@actor, 5, 5)
  92.     if @actor.xstats.mgu > 0
  93.       draw_actor_mp(@actor, 5, 35)
  94.     end
  95.     self.contents.font.color = power_up_color
  96.     self.contents.draw_text(90, 65, self.width, WLH, "ACTIVE STATES")
  97.   end
  98. end
  99.  
  100. #################################################################################
  101. class Window_States < Window_Selectable
  102.  
  103.   def initialize
  104.     super(140, 120, 400, 300)
  105.     @actor = $game_party.members[0]
  106.     @column_max = 8
  107.     self.index = 0
  108.     refresh
  109.   end
  110.  
  111.   #Getting States
  112.   def active_states
  113.     @active_states = []
  114.     for active_state in @actor.states
  115.       @active_states.push(active_state)
  116.     end
  117.   end
  118.  
  119.   #Drawing Active State
  120.   def draw_active_state
  121.     rect = item_rect(index)
  122.     self.contents.clear_rect(rect)
  123.     state = @active_states[index]
  124.     draw_actor_state(@actor, rect.x, rect.y )
  125.   end
  126.    
  127.      
  128.      
  129.   #Refresh
  130.   def refresh
  131.     active_states
  132.     @item_max = @active_states.size
  133.     for i in 0...@item_max
  134.       draw_active_state[i]
  135.     end
  136.   end
  137. end
  138.  
  139. #################################################################################
  140.  
  141.  class Window_StatesInfo < Window_Base
  142.  
  143.  def initialize
  144.     super(415, 230, 120, 160)
  145.     refresh
  146.   end
  147.  
  148.   def refresh
  149.     self.contents.font.color = system_color
  150.     self.contents.draw_text(0, 4, self.width, WLH, "Controls:")
  151.     self.contents.font.color = normal_color
  152.     self.contents.draw_text(0, 20, 90, WLH, "Q for IMM EFX")
  153.     self.contents.draw_text(0, 50, 90, WLH, "Z to EXAMINE")
  154.     self.contents.draw_text(0, 80, 90, WLH, "B to Exit")
  155.   end
  156. end
  157.  
  158. ##################################################################################
  159. class Scene_NqStates < Scene_Base
  160.  
  161.   def start
  162. super
  163. create_menu_background
  164. @window_sv = Window_StatesVitals.new
  165. @window_sc = Window_StatesCharacter.new()
  166. @window_states = Window_States.new
  167. @window_si = Window_StatesInfo.new
  168. end
  169.  
  170. def update
  171. super
  172. update_menu_background
  173. @window_sc.refresh
  174. @window_states.refresh
  175. @window_sv.refresh
  176. @window_si.refresh
  177. if Input.trigger?(Input::B)
  178. Sound.play_cancel
  179. $scene = Scene_Map.new
  180. elsif Input.trigger?(Input::R)
  181.   Sound.play_buzzer
  182. elsif Input.trigger?(Input::L)
  183.   Sound.play_decision
  184.   $scene = Scene_NqImmunityEffects.new
  185. elsif Input.trigger?(Input::C)
  186.   Sound.play_decision
  187.   $scene = Scene_StateExamine.new
  188. end
  189. end
  190.  
  191. def terminate
  192. super
  193. @window_sv.dispose
  194. @window_sc.dispose
  195. @window_states.dispose
  196. @window_si.dispose
  197. dispose_menu_background
  198. end
  199.  
  200. end
Advertisement
Add Comment
Please, Sign In to add comment