Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** TK - Class Icon
- #------------------------------------------------------------------------------
- # Autor: Takkun (a.k.a Faalco)
- # Create: 06/02/2018
- # Version: 1.0a
- #==============================================================================
- # * Instructions & Info:
- # -----------------------------------------------------------------------------
- # Paste the script above the main of your project, and make the necessary
- # settings.
- #
- # This script (Only the TK - Class Icon) can be used for commercial and
- # non-commercial purposes, credits are welcome but not required.
- #
- # Any problems before the script can be taken on the topics of the same or by
- # personal message us forums in which I participate.
- #
- #==============================================================================
- ($imported ||= {})["TK - Class Icon"] = true
- #==============================================================================
- # ** RPG::Class
- #------------------------------------------------------------------------------
- # The data class for class.
- #==============================================================================
- module RPG
- class Class < BaseItem
- #--------------------------------------------------------------------------
- # * Class Icon
- #--------------------------------------------------------------------------
- def class_icon
- return @class_icon unless @class_icon.nil?
- load_notetag_class_icon
- return @class_icon
- end
- #--------------------------------------------------------------------------
- # * Load Note
- #--------------------------------------------------------------------------
- def load_notetag_class_icon
- regex =/<icon:(\d+)>/i
- @class_icon = self.note =~ regex ? $1.downcase : 143
- end
- end
- end
- #==============================================================================
- # ** Window_Base
- #------------------------------------------------------------------------------
- # This is a super class of all windows within the game.
- #==============================================================================
- class Window_Base < Window
- #--------------------------------------------------------------------------
- # * Draw Class
- #--------------------------------------------------------------------------
- def draw_actor_class(actor, x, y, width = 112)
- change_color(normal_color)
- draw_icon($data_classes[actor.class.id].class_icon.to_i, x, y)
- draw_text(x + 25, y, width, line_height, actor.class.name)
- end
- end
Add Comment
Please, Sign In to add comment