Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.

Share | 
 

 [ASK]Error Script Item Encyclopedia

Topik sebelumnya Topik selanjutnya Go down 
[ASK]Error Script Item Encyclopedia Empty2012-08-08, 00:30
Post[ASK]Error Script Item Encyclopedia
#1
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

[ASK]Error Script Item Encyclopedia Vide
all, sya baru dapet script ensiklopedia untuk item buatan White Demon, yg di translate sama Elemental Crisis. Nah, masalahnya itu bermula saat saya mau keluar dari Scene nya ensiklopedia, pas saya tekan X (B), malah keluar dari game. Dimanakah kesalahan dri script itu? :hmm: Btw, ini skripnya.
Code:
#==============================================================================
# ■ RGSS3 Item Encyclopedia Ver 1.00 Encyclopedia Script
#------------------------------------------------------------------------------
#  Author:
#    White Demon / White Mage http://izumiwhite.web.fc2.com/
#
#  Translated By:
#    Elemental Crisis http://RPGMakerVXAce.com
#
#  Terms of Use:
#    Only available to registered users of RPG Maker VX Ace.
#    There is no need to report on usage or to display copyright attribution.
#    Feel free to modify.
#    Author not responsible for any problems caused by using this script.
#==============================================================================

#==============================================================================
# ■ WD_itemdictionary
#------------------------------------------------------------------------------
#  Common methods for encyclopedia items.
#==============================================================================

module WD_itemdictionary
  def i_dictionary_switch_on(id)
    $game_system.i_dic_sw = [] if $game_system.i_dic_sw == nil
    $game_system.i_dic_sw[id] = false if $game_system.i_dic_sw[id] == nil
    $game_system.i_dic_sw[id] = true
  end
  def i_dictionary_switch_off(id)
    $game_system.i_dic_sw = [] if $game_system.i_dic_sw == nil
    $game_system.i_dic_sw[id] = false if $game_system.i_dic_sw[id] == nil
    $game_system.i_dic_sw[id] = false
  end
  def i_dictionary_switch_on?(id)
    $game_system.i_dic_sw = [] if $game_system.i_dic_sw == nil
    $game_system.i_dic_sw[id] = false if $game_system.i_dic_sw[id] == nil
    return $game_system.i_dic_sw[id]
  end
  def w_dictionary_switch_on(id)
    $game_system.w_dic_sw = [] if $game_system.w_dic_sw == nil
    $game_system.w_dic_sw[id] = false if $game_system.w_dic_sw[id] == nil
    $game_system.w_dic_sw[id] = true
  end
  def w_dictionary_switch_off(id)
    $game_system.w_dic_sw = [] if $game_system.w_dic_sw == nil
    $game_system.w_dic_sw[id] = false if $game_system.w_dic_sw[id] == nil
    $game_system.w_dic_sw[id] = false
  end
  def w_dictionary_switch_on?(id)
    $game_system.w_dic_sw = [] if $game_system.w_dic_sw == nil
    $game_system.w_dic_sw[id] = false if $game_system.w_dic_sw[id] == nil
    return $game_system.w_dic_sw[id]
  end
  def a_dictionary_switch_on(id)
    $game_system.a_dic_sw = [] if $game_system.a_dic_sw == nil
    $game_system.a_dic_sw[id] = false if $game_system.a_dic_sw[id] == nil
    $game_system.a_dic_sw[id] = true
  end
  def a_dictionary_switch_off(id)
    $game_system.a_dic_sw = [] if $game_system.a_dic_sw == nil
    $game_system.a_dic_sw[id] = false if $game_system.a_dic_sw[id] == nil
    $game_system.a_dic_sw[id] = false
  end
  def a_dictionary_switch_on?(id)
    $game_system.a_dic_sw = [] if $game_system.a_dic_sw == nil
    $game_system.a_dic_sw[id] = false if $game_system.a_dic_sw[id] == nil
    return $game_system.a_dic_sw[id]
  end
  def t_dictionary_switch_on(item)
    if item.is_a?(RPG::Item)
      i_dictionary_switch_on(item.id)
    end
    if item.is_a?(RPG::Weapon)
      w_dictionary_switch_on(item.id)
    end
    if item.is_a?(RPG::Armor)
      a_dictionary_switch_on(item.id)
    end
  end
  def t_dictionary_switch_on?(item)
    if item.is_a?(RPG::Item)
      return i_dictionary_switch_on?(item.id)
    end
    if item.is_a?(RPG::Weapon)
      return w_dictionary_switch_on?(item.id)
    end
    if item.is_a?(RPG::Armor)
      return a_dictionary_switch_on?(item.id)
    end
  end
  def print_dictionary?(item)
    if item != nil
      if item.name.size > 0
        hantei = /<Exclude>/ =~ item.note
        if hantei == nil
          return true
        end
      end
    end
    return false
  end
  def item_dictionary_perfection
    dic_max = 0
    dic_num = 0
    $data_items.each do |item|
      if print_dictionary?(item)
        dic_max += 1
        if i_dictionary_switch_on?(item.id) == true
          dic_num += 1
        end
      end
    end
    $data_weapons.each do |item|
      if print_dictionary?(item)
        dic_max += 1
        if w_dictionary_switch_on?(item.id) == true
          dic_num += 1
        end
      end
    end
    $data_armors.each do |item|
      if print_dictionary?(item)
        dic_max += 1
        if a_dictionary_switch_on?(item.id) == true
          dic_num += 1
        end
      end
    end
    return (100*dic_num)/dic_max
  end
end

class Game_Interpreter
  include WD_itemdictionary
end

class Game_System
  #--------------------------------------------------------------------------
  # ● Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :i_dic_sw
  attr_accessor :w_dic_sw
  attr_accessor :a_dic_sw
  #--------------------------------------------------------------------------
  # ● Object Initialization
  #--------------------------------------------------------------------------
  alias wd_orig_initialize001 initialize
  def initialize
    wd_orig_initialize001
    @i_dic_sw = []
    @w_dic_sw = []
    @a_dic_sw = []
  end
end

class Game_Party < Game_Unit
  include WD_itemdictionary
  #--------------------------------------------------------------------------
  # ● Items Increased (Decreased)
  #    include_equip : Includes Equipment
  #--------------------------------------------------------------------------
  alias wd_orig_gain_item001 gain_item
  def gain_item(item, amount, include_equip = false)   
    wd_orig_gain_item001(item, amount, include_equip = false)
    if amount > 0
      t_dictionary_switch_on(item)
    end
  end
end


#==============================================================================
# ■ Scene_ItemDictionary
#------------------------------------------------------------------------------
#  Class for processing items.
#==============================================================================

class Scene_ItemDictionary < Scene_ItemBase
  #--------------------------------------------------------------------------
  # ● Start
  #--------------------------------------------------------------------------
  def start
    super
    create_help_window
    create_category_window
    create_status_window
    create_item_window
    create_perfection_window
  end
  #--------------------------------------------------------------------------
  # ● Create Category Window
  #--------------------------------------------------------------------------
  def create_category_window
    @category_window = Window_ItemCategory.new
    @category_window.viewport = @viewport
    @category_window.help_window = @help_window
    @category_window.y = @help_window.height
    @category_window.set_handler(:ok,    method(:on_category_ok))
    @category_window.set_handler(:cancel, method(:return_scene))
  end
  #--------------------------------------------------------------------------
  # ● Create Item Window
  #--------------------------------------------------------------------------
  def create_item_window
    wy = @category_window.y + @category_window.height
    wh = Graphics.height - wy - 48
    @item_window = Window_ItemDictionaryList.new(Graphics.width-172-48, wy, 172+48, wh)
    @item_window.viewport = @viewport
    @item_window.help_window = @help_window
    @item_window.status_window = @status_window
    @item_window.set_handler(:cancel, method(:on_item_cancel))
    @category_window.item_window = @item_window
  end
  #--------------------------------------------------------------------------
  # ● Create Status Window
  #--------------------------------------------------------------------------
  def create_status_window
    wy = @category_window.y + @category_window.height
    wh = Graphics.height - wy
    @status_window = Window_ItemDictionaryStatus.new(0, wy, Graphics.width-172-48, wh)
    @status_window.viewport = @viewport
    @status_window.set_item(nil)
  end
  #--------------------------------------------------------------------------
  # ● Create Completion Percent Window
  #--------------------------------------------------------------------------
  def create_perfection_window
    wy = @item_window.y + @item_window.height
    wh = 48
    @perfection_window = Window_ItemDictionaryPerfection.new(Graphics.width-172-48, wy, 172+48, wh)
    @perfection_window.viewport = @viewport
  end
  #--------------------------------------------------------------------------
  # ● Category [Decision]
  #--------------------------------------------------------------------------
  def on_category_ok
    @item_window.activate
    @item_window.select_last
  end
  #--------------------------------------------------------------------------
  # ● Item [Cancellation]
  #--------------------------------------------------------------------------
  def on_item_cancel
    @item_window.unselect
    @category_window.activate
    @status_window.set_item(nil)
  end
end


#==============================================================================
# ■ Window_ItemDictionaryList
#------------------------------------------------------------------------------
#  Class for displaying all items in the encyclopedia.
#==============================================================================

class Window_ItemDictionaryList < Window_Selectable
  include WD_itemdictionary
  #--------------------------------------------------------------------------
  # ● Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    @category = :none
    @data = []
  end
  #--------------------------------------------------------------------------
  # ● Set Category
  #--------------------------------------------------------------------------
  def category=(category)
    return if @category == category
    @category = category
    refresh
    self.oy = 0
  end
  #--------------------------------------------------------------------------
  # ● GetNumber Of Digits
  #--------------------------------------------------------------------------
  def col_max
    return 1
  end
  #--------------------------------------------------------------------------
  # ● Get Number Of Items
  #--------------------------------------------------------------------------
  def item_max
    @data ? @data.size : 1
  end
  #--------------------------------------------------------------------------
  # ● Get Item
  #--------------------------------------------------------------------------
  def item
    @data && index >= 0 ? @data[index] : nil
  end
  #--------------------------------------------------------------------------
  # ● Get Enabled State Of Current Selection
  #--------------------------------------------------------------------------
  def current_item_enabled?
    enable?(@data[index])
  end
  #--------------------------------------------------------------------------
  # ● Include Items/Weapons/Armor
  #--------------------------------------------------------------------------
  def include?(item)
    case @category
    when :item
      item.is_a?(RPG::Item) && !item.key_item?
    when :key_item
      item.is_a?(RPG::Item) && item.key_item?
    else
      false
    end
  end
  #--------------------------------------------------------------------------
  # ● Include Items From List
  #--------------------------------------------------------------------------
  def make_item_list
    @data = []
    $data_items.each do |item|
      if print_dictionary?(item)
        @data.push(item) if include?(item)
      end
    end
    @data.push(nil) if include?(nil)
  end
  #--------------------------------------------------------------------------
  # ● Return To Last Selected Position
  #--------------------------------------------------------------------------
  def select_last
    select(0)
  end
  #--------------------------------------------------------------------------
  # ● Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    if item
      rect = item_rect(index)
      rect.width -= 4
      if t_dictionary_switch_on?(item)
        change_color(normal_color, true)
        draw_item_name(item, rect.x, rect.y, true)
      else
        change_color(normal_color, false)
        draw_text(rect.x + 24, rect.y, 172, line_height, "???????")
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● Update Help Text
  #--------------------------------------------------------------------------
  def update_help
    if t_dictionary_switch_on?(item)
      @help_window.set_item(item)
      @status_window.set_item(item, @index, true)
    else
      @help_window.set_text("???????")
      @status_window.set_item(item, @index, false)
    end
  end
  #--------------------------------------------------------------------------
  # ● Refresh
  #--------------------------------------------------------------------------
  def refresh
    make_item_list
    create_contents
    draw_all_items
  end
  #--------------------------------------------------------------------------
  # ● Status Window Setting
  #--------------------------------------------------------------------------
  def status_window=(status_window)
    @status_window = status_window
  end
end

#==============================================================================
# ■ Window_ItemDictionaryPerfection
#------------------------------------------------------------------------------
#  Class for displaying the current encyclopedia completion percent.
#==============================================================================

class Window_ItemDictionaryPerfection < Window_Selectable
  include WD_itemdictionary
  #--------------------------------------------------------------------------
  # ● Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    refresh(width)
  end
  #--------------------------------------------------------------------------
  # ● Refresh
  #--------------------------------------------------------------------------
  def refresh(width)
    contents.clear
    draw_text(0, 0, width-24, line_height, "Complete: #{item_dictionary_perfection} %", 1)
  end
end


#==============================================================================
# ■ Window_ItemDictionaryStatus
#------------------------------------------------------------------------------
#  Class for displaying the details of an item in the encyclopedia.
#==============================================================================

class Window_ItemDictionaryStatus < Window_Selectable
  include WD_itemdictionary
  #--------------------------------------------------------------------------
  # ● Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    @item = nil
    refresh
  end
  #--------------------------------------------------------------------------
  # ● Item Settings
  #--------------------------------------------------------------------------
  def set_item(item, index=-1, print=false)
    return if ((@item == item) and (@index == index))
    @item = item
    @index = index
    @print = print
    refresh
  end
  #--------------------------------------------------------------------------
  # ● Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    contents.font.size = 24

    if @print

      if @item.is_a?(RPG::Item)
        if WD_itemdictionary_layout::I_id_display
          text1  = sprintf("%0#{WD_itemdictionary_layout::I_id_display_digit}d",@index+1)
          x      = WD_itemdictionary_layout::I_id_display_x
          y      = WD_itemdictionary_layout::I_id_display_y
          width  = WD_itemdictionary_layout::I_id_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
        if WD_itemdictionary_layout::I_name_display
          x      = WD_itemdictionary_layout::I_name_display_x
          y      = WD_itemdictionary_layout::I_name_display_y
          draw_item_name(@item, x, y, true)
        end
        font_size = WD_itemdictionary_layout::C_font_size
        contents.font.size = font_size
        if WD_itemdictionary_layout::I_price_display
          text1  = WD_itemdictionary_layout::I_price_display_text1
          text2  = @item.price
          text3  = Vocab::currency_unit
          x      = WD_itemdictionary_layout::I_price_display_x
          y      = WD_itemdictionary_layout::I_price_display_y
          width  = WD_itemdictionary_layout::I_price_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          cx = text_size(Vocab::currency_unit).width
          change_color(normal_color)
          draw_text(x, y, width - cx - 2, font_size, text2, 2)
          change_color(system_color)
          draw_text(x, y, width, font_size, text3, 2)
          change_color(normal_color)
        end
        if WD_itemdictionary_layout::I_occasion_display
          text1  = WD_itemdictionary_layout::I_occasion_display_text1
          text2  = WD_itemdictionary_layout::I_occasion_display_text2
          text3  = WD_itemdictionary_layout::I_occasion_display_text3
          text4  = WD_itemdictionary_layout::I_occasion_display_text4
          text5  = WD_itemdictionary_layout::I_occasion_display_text5
          x      = WD_itemdictionary_layout::I_occasion_display_x
          y      = WD_itemdictionary_layout::I_occasion_display_y
          width  = WD_itemdictionary_layout::I_occasion_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          case @item.occasion
          when 0
            draw_text(x, y, width, font_size, text2, 2)
          when 1
            draw_text(x, y, width, font_size, text3, 2)
          when 2
            draw_text(x, y, width, font_size, text4, 2)
          when 3
            draw_text(x, y, width, font_size, text5, 2)
          end
        end
        if WD_itemdictionary_layout::I_consumable_display
          text1  = WD_itemdictionary_layout::I_consumable_display_text1
          text2  = WD_itemdictionary_layout::I_consumable_display_text2
          text3  = WD_itemdictionary_layout::I_consumable_display_text3
          x      = WD_itemdictionary_layout::I_consumable_display_x
          y      = WD_itemdictionary_layout::I_consumable_display_y
          width  = WD_itemdictionary_layout::I_consumable_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          if @item.consumable
            draw_text(x, y, width, font_size, text2, 2)
          else
            draw_text(x, y, width, font_size, text3, 2)
          end
        end 
        if WD_itemdictionary_layout::I_option_display
          text1  = WD_itemdictionary_layout::I_option_display_text1
          text2  = WD_itemdictionary_layout::I_option_display_text2
          x      = WD_itemdictionary_layout::I_option_display_x
          y      = WD_itemdictionary_layout::I_option_display_y
          width  = WD_itemdictionary_layout::I_option_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          i = 0
          @item.note.scan(/<Note:(.*)>/){|matched|
            i += 1
            self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
          }
          if i == 0
            self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
          end
        end

      elsif @item.is_a?(RPG::Weapon)
        if WD_itemdictionary_layout::W_id_display
          text1  = sprintf("%0#{WD_itemdictionary_layout::W_id_display_digit}d",@index+1)
          x      = WD_itemdictionary_layout::W_id_display_x
          y      = WD_itemdictionary_layout::W_id_display_y
          width  = WD_itemdictionary_layout::W_id_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
        if WD_itemdictionary_layout::W_name_display
          x      = WD_itemdictionary_layout::W_name_display_x
          y      = WD_itemdictionary_layout::W_name_display_y
          draw_item_name(@item, x, y, true)
        end
        font_size = WD_itemdictionary_layout::C_font_size
        contents.font.size = font_size
        if WD_itemdictionary_layout::W_type_display
          text1  = WD_itemdictionary_layout::W_type_display_text1
          text2  = $data_system.weapon_types[@item.wtype_id]
          x      = WD_itemdictionary_layout::W_type_display_x
          y      = WD_itemdictionary_layout::W_type_display_y
          width  = WD_itemdictionary_layout::W_type_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_price_display
          text1  = WD_itemdictionary_layout::W_price_display_text1
          text2  = @item.price
          text3  = Vocab::currency_unit
          x      = WD_itemdictionary_layout::W_price_display_x
          y      = WD_itemdictionary_layout::W_price_display_y
          width  = WD_itemdictionary_layout::W_price_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          cx = text_size(Vocab::currency_unit).width
          change_color(normal_color)
          draw_text(x, y, width - cx - 2, font_size, text2, 2)
          change_color(system_color)
          draw_text(x, y, width, font_size, text3, 2)
          change_color(normal_color)
        end
        if WD_itemdictionary_layout::W_atk_display
          text1  = Vocab::param(2)
          text2  = @item.params[2]
          x      = WD_itemdictionary_layout::W_atk_display_x
          y      = WD_itemdictionary_layout::W_atk_display_y
          width  = WD_itemdictionary_layout::W_atk_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_def_display
          text1  = Vocab::param(3)
          text2  = @item.params[3]
          x      = WD_itemdictionary_layout::W_def_display_x
          y      = WD_itemdictionary_layout::W_def_display_y
          width  = WD_itemdictionary_layout::W_def_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_mat_display
          text1  = Vocab::param(4)
          text2  = @item.params[4]
          x      = WD_itemdictionary_layout::W_mat_display_x
          y      = WD_itemdictionary_layout::W_mat_display_y
          width  = WD_itemdictionary_layout::W_mat_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_mdf_display
          text1  = Vocab::param(5)
          text2  = @item.params[5]
          x      = WD_itemdictionary_layout::W_mdf_display_x
          y      = WD_itemdictionary_layout::W_mdf_display_y
          width  = WD_itemdictionary_layout::W_mdf_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_agi_display
          text1  = Vocab::param(6)
          text2  = @item.params[6]
          x      = WD_itemdictionary_layout::W_agi_display_x
          y      = WD_itemdictionary_layout::W_agi_display_y
          width  = WD_itemdictionary_layout::W_agi_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_luk_display
          text1  = Vocab::param(7)
          text2  = @item.params[7]
          x      = WD_itemdictionary_layout::W_luk_display_x
          y      = WD_itemdictionary_layout::W_luk_display_y
          width  = WD_itemdictionary_layout::W_luk_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_mhp_display
          text1  = Vocab::param(0)
          text2  = @item.params[0]
          x      = WD_itemdictionary_layout::W_mhp_display_x
          y      = WD_itemdictionary_layout::W_mhp_display_y
          width  = WD_itemdictionary_layout::W_mhp_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_mmp_display
          text1  = Vocab::param(1)
          text2  = @item.params[1]
          x      = WD_itemdictionary_layout::W_mmp_display_x
          y      = WD_itemdictionary_layout::W_mmp_display_y
          width  = WD_itemdictionary_layout::W_mmp_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::W_option_display
          text1  = WD_itemdictionary_layout::W_option_display_text1
          text2  = WD_itemdictionary_layout::W_option_display_text2
          x      = WD_itemdictionary_layout::W_option_display_x
          y      = WD_itemdictionary_layout::W_option_display_y
          width  = WD_itemdictionary_layout::W_option_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          i = 0
          @item.note.scan(/<Note:(.*)>/){|matched|
            i += 1
            self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
          }
          if i == 0
            self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
          end
        end

      elsif @item.is_a?(RPG::Armor)
        if WD_itemdictionary_layout::A_id_display
          text1  = sprintf("%0#{WD_itemdictionary_layout::A_id_display_digit}d",@index+1)
          x      = WD_itemdictionary_layout::A_id_display_x
          y      = WD_itemdictionary_layout::A_id_display_y
          width  = WD_itemdictionary_layout::A_id_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
        if WD_itemdictionary_layout::A_name_display
          x      = WD_itemdictionary_layout::A_name_display_x
          y      = WD_itemdictionary_layout::A_name_display_y
          draw_item_name(@item, x, y, true)
        end
        font_size = WD_itemdictionary_layout::C_font_size
        contents.font.size = font_size
        if WD_itemdictionary_layout::A_type_display
          text1  = WD_itemdictionary_layout::A_type_display_text1
          text2  = $data_system.armor_types[@item.atype_id]
          x      = WD_itemdictionary_layout::A_type_display_x
          y      = WD_itemdictionary_layout::A_type_display_y
          width  = WD_itemdictionary_layout::A_type_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_price_display
          text1  = WD_itemdictionary_layout::A_price_display_text1
          text2  = @item.price
          text3  = Vocab::currency_unit
          x      = WD_itemdictionary_layout::A_price_display_x
          y      = WD_itemdictionary_layout::A_price_display_y
          width  = WD_itemdictionary_layout::A_price_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          cx = text_size(Vocab::currency_unit).width
          change_color(normal_color)
          draw_text(x, y, width - cx - 2, font_size, text2, 2)
          change_color(system_color)
          draw_text(x, y, width, font_size, text3, 2)
          change_color(normal_color)
        end
        if WD_itemdictionary_layout::A_atk_display
          text1  = Vocab::param(2)
          text2  = @item.params[2]
          x      = WD_itemdictionary_layout::A_atk_display_x
          y      = WD_itemdictionary_layout::A_atk_display_y
          width  = WD_itemdictionary_layout::A_atk_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_def_display
          text1  = Vocab::param(3)
          text2  = @item.params[3]
          x      = WD_itemdictionary_layout::A_def_display_x
          y      = WD_itemdictionary_layout::A_def_display_y
          width  = WD_itemdictionary_layout::A_def_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_mat_display
          text1  = Vocab::param(4)
          text2  = @item.params[4]
          x      = WD_itemdictionary_layout::A_mat_display_x
          y      = WD_itemdictionary_layout::A_mat_display_y
          width  = WD_itemdictionary_layout::A_mat_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_mdf_display
          text1  = Vocab::param(5)
          text2  = @item.params[5]
          x      = WD_itemdictionary_layout::A_mdf_display_x
          y      = WD_itemdictionary_layout::A_mdf_display_y
          width  = WD_itemdictionary_layout::A_mdf_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_agi_display
          text1  = Vocab::param(6)
          text2  = @item.params[6]
          x      = WD_itemdictionary_layout::A_agi_display_x
          y      = WD_itemdictionary_layout::A_agi_display_y
          width  = WD_itemdictionary_layout::A_agi_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_luk_display
          text1  = Vocab::param(7)
          text2  = @item.params[7]
          x      = WD_itemdictionary_layout::A_luk_display_x
          y      = WD_itemdictionary_layout::A_luk_display_y
          width  = WD_itemdictionary_layout::A_luk_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_mhp_display
          text1  = Vocab::param(0)
          text2  = @item.params[0]
          x      = WD_itemdictionary_layout::A_mhp_display_x
          y      = WD_itemdictionary_layout::A_mhp_display_y
          width  = WD_itemdictionary_layout::A_mhp_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_mmp_display
          text1  = Vocab::param(1)
          text2  = @item.params[1]
          x      = WD_itemdictionary_layout::A_mmp_display_x
          y      = WD_itemdictionary_layout::A_mmp_display_y
          width  = WD_itemdictionary_layout::A_mmp_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          draw_text(x, y, width, font_size, text2, 2)
        end
        if WD_itemdictionary_layout::A_option_display
          text1  = WD_itemdictionary_layout::A_option_display_text1
          text2  = WD_itemdictionary_layout::A_option_display_text2
          x      = WD_itemdictionary_layout::A_option_display_x
          y      = WD_itemdictionary_layout::A_option_display_y
          width  = WD_itemdictionary_layout::A_option_display_width
          change_color(system_color)
          draw_text(x, y, width, font_size, text1, 0)
          change_color(normal_color)
          i = 0
          @item.note.scan(/<Note:(.*)>/){|matched|
            i += 1
            self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
          }
          if i == 0
            self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
          end
        end

      end

    elsif @item != nil
      if @item.is_a?(RPG::Item)
        if WD_itemdictionary_layout::I_id_display
          text1  = sprintf("%0#{WD_itemdictionary_layout::I_id_display_digit}d",@index+1)
          x      = WD_itemdictionary_layout::I_id_display_x
          y      = WD_itemdictionary_layout::I_id_display_y
          width  = WD_itemdictionary_layout::I_id_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
        if WD_itemdictionary_layout::I_name_display
          text1  = "- No Data -"
          x      = WD_itemdictionary_layout::I_name_display_x
          y      = WD_itemdictionary_layout::I_name_display_y
          width  = WD_itemdictionary_layout::I_name_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
      end
      if @item.is_a?(RPG::Weapon)
        if WD_itemdictionary_layout::W_id_display
          text1  = sprintf("%0#{WD_itemdictionary_layout::W_id_display_digit}d",@index+1)
          x      = WD_itemdictionary_layout::W_id_display_x
          y      = WD_itemdictionary_layout::W_id_display_y
          width  = WD_itemdictionary_layout::W_id_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
        if WD_itemdictionary_layout::W_name_display
          text1  = "- No Data -"
          x      = WD_itemdictionary_layout::W_name_display_x
          y      = WD_itemdictionary_layout::W_name_display_y
          width  = WD_itemdictionary_layout::W_name_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
      end
      if @item.is_a?(RPG::Armor)
        if WD_itemdictionary_layout::A_id_display
          text1  = sprintf("%0#{WD_itemdictionary_layout::A_id_display_digit}d",@index+1)
          x      = WD_itemdictionary_layout::A_id_display_x
          y      = WD_itemdictionary_layout::A_id_display_y
          width  = WD_itemdictionary_layout::A_id_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
        if WD_itemdictionary_layout::A_name_display
          text1  = "- No Data -"
          x      = WD_itemdictionary_layout::A_name_display_x
          y      = WD_itemdictionary_layout::A_name_display_y
          width  = WD_itemdictionary_layout::A_name_display_width
          height = line_height
          draw_text(x, y, width, height, text1, 0)
        end
      end

    end
  end
end
[ASK]Error Script Item Encyclopedia Empty2012-08-08, 07:22
PostRe: [ASK]Error Script Item Encyclopedia
#2
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

[ASK]Error Script Item Encyclopedia Vide
klo aku coba sih lancar :ngacay2:
cara manggil scene di VXA dah tau kan?
[ASK]Error Script Item Encyclopedia Empty2012-08-08, 07:30
PostRe: [ASK]Error Script Item Encyclopedia
#3
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

[ASK]Error Script Item Encyclopedia Vide
@lukas udah sih, tpi pas mau kembali ke scene map nya itu lho, dia malah keluar game :hmm:
[ASK]Error Script Item Encyclopedia Empty2012-08-08, 07:33
PostRe: [ASK]Error Script Item Encyclopedia
#4
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

[ASK]Error Script Item Encyclopedia Vide
engga kok, aku bisa :ngacay2:
coba cari method² yg di pake, sapa tau ada yg ga kompatible sama script lainya :ngacay2:
[ASK]Error Script Item Encyclopedia Empty2012-08-08, 07:42
PostRe: [ASK]Error Script Item Encyclopedia
#5
aidilriski 
Senior
Senior
aidilriski

Level 5
Posts : 643
Thanked : 2
Engine : Multi-Engine User
Type : Mapper

[ASK]Error Script Item Encyclopedia Vide
sip deh :thumbup: Udad solped, klo saya sih, bikin method baru ke scene_map, itu sih saya, what abot you? :kabur:
[ASK]Error Script Item Encyclopedia Empty2012-08-08, 07:47
PostRe: [ASK]Error Script Item Encyclopedia
#6
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

[ASK]Error Script Item Encyclopedia Vide
aku ga ngubah apa² :ngacay2:
[ASK]Error Script Item Encyclopedia Empty
PostRe: [ASK]Error Script Item Encyclopedia
#7
Sponsored content 




[ASK]Error Script Item Encyclopedia Vide
 

[ASK]Error Script Item Encyclopedia

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMVX Ace Scripts :: RGSS3 Support-