Phangon

Icone das Classes

Aug 11th, 2018
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. #==============================================================================
  2. # ** TK - Class Icon
  3. #------------------------------------------------------------------------------
  4. # Autor: Takkun (a.k.a Faalco)
  5. # Create: 06/02/2018
  6. # Version: 1.0a
  7. #==============================================================================
  8. # * Instructions & Info:
  9. # -----------------------------------------------------------------------------
  10. # Paste the script above the main of your project, and make the necessary
  11. # settings.
  12. #
  13. # This script (Only the TK - Class Icon) can be used for commercial and
  14. # non-commercial purposes, credits are welcome but not required.
  15. #
  16. # Any problems before the script can be taken on the topics of the same or by
  17. # personal message us forums in which I participate.
  18. #
  19. #==============================================================================
  20. ($imported ||= {})["TK - Class Icon"] = true
  21. #==============================================================================
  22. # ** RPG::Class
  23. #------------------------------------------------------------------------------
  24. # The data class for class.
  25. #==============================================================================
  26.  
  27. module RPG
  28. class Class < BaseItem
  29. #--------------------------------------------------------------------------
  30. # * Class Icon
  31. #--------------------------------------------------------------------------
  32. def class_icon
  33. return @class_icon unless @class_icon.nil?
  34. load_notetag_class_icon
  35. return @class_icon
  36. end
  37. #--------------------------------------------------------------------------
  38. # * Load Note
  39. #--------------------------------------------------------------------------
  40. def load_notetag_class_icon
  41. regex =/<icon:(\d+)>/i
  42. @class_icon = self.note =~ regex ? $1.downcase : 143
  43. end
  44. end
  45. end
  46. #==============================================================================
  47. # ** Window_Base
  48. #------------------------------------------------------------------------------
  49. # This is a super class of all windows within the game.
  50. #==============================================================================
  51.  
  52. class Window_Base < Window
  53. #--------------------------------------------------------------------------
  54. # * Draw Class
  55. #--------------------------------------------------------------------------
  56. def draw_actor_class(actor, x, y, width = 112)
  57. change_color(normal_color)
  58. draw_icon($data_classes[actor.class.id].class_icon.to_i, x, y)
  59. draw_text(x + 25, y, width, line_height, actor.class.name)
  60. end
  61. end
Add Comment
Please, Sign In to add comment