# Actor Stat Window

Aug 5th, 2012
861
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. #Actor Stat Window
2. #----------#
3. #Features: Let's show a fancy window showing an actor and his stats!
4. #
5. #Usage:   Don't make a mistake!
6. #   @(varname) = W_Merc.new(actor id)
7. #   @(varname).dispose
8. #
9. #Examples: @mew = W_Merc.new(1)
10. #          Random Text Box <<
11. #          @mew.dispose
12. #
13. #   If you don't call that dispose, that window won't go away and you will
14. #   be quite a sad kitty.
15. #
16. #----------#
17. #-- Script by: V.M of D.T
18. #
19. #- Questions or comments can be:
20. #    given by email: sumptuaryspade@live.ca
22. #   All my other scripts and projects can be found here: http://daimonioustails.weebly.com/
23. #
24. #--- Free to use in any project, commercial or non-commercial, with credit given
25. # - - Though a donation's always a nice way to say thank you~ (I also accept actual thank you's)
26.
27. class W_Merc < Window_Base
28.   WLH = 24
29.   def initialize(actor, x = 5, y = 5)
30.     super(5, 5, 96*2 - WLH,96 + WLH * 7)
31.     self.z = 255
32.     @actor = \$game_actors[actor]
33.     refresh
34.   end
35.   def refresh
36.     draw_actor_face(@actor, 0, WLH)
37.     draw_actor_name(@actor, 0, 0)
38.     draw_actor_nickname(@actor, 0, 96 + WLH)
39.     draw_actor_level(@actor, 0, 96 + WLH * 2)
40.     draw_actor_class(@actor, 0, 96 + WLH * 3)
41.     draw_actor_hp(@actor, 0, 96 + WLH * 4)
42.     draw_actor_mp(@actor, 0, 96 + WLH * 5)
43.   end
44. end
RAW Paste Data