UltimaForum

Wsparcie [VX] - Przedmiot na kolorowo

ishizaki1 - Nie 10 Paź, 2010 14:09
Temat postu: Przedmiot na kolorowo
Co zrobić aby nazwa przedmiotu była kolorowa ?
Marvolo37 - Nie 10 Paź, 2010 19:39

W Makerze są ustalone kolory. np. \n[2] - to kolor zielony itp.
\n[0] - to kolor biały. Więc daj np. \n[2]Ziółka
Problem z głowy

RATI - Nie 10 Paź, 2010 23:49

I znowu odkopałem swoje zbiory :P

Łap tu dość prosty skrypcik:

Spoiler:

Kod:
#==============================================================================
#  Colour Coded Items
#  Version: 1.0
#  Author: modern algebra (rmrk.net)
#  Date: January 27, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    This script allows you to set a special colour to any item, weapon or
#   armor in the party's possession. SO, in scenes like Item or Equip, these
#   items/weapons/armors would be drawn in whatever colour you specify
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    Place this above Main and below Materials in the Script Editor (F11)

#   To set a colour to an item, put any of the following codes into the notes
#  box of the item, weapon or armour:
#
#      \macolor[x]
#      \macolour[x]
#
#    where x is an integer between 0 and 32 - this will set it to the colour
#   that corresponds to the square in the Windowskin palette. Or you can use
#   the code:
#
#      \macolor[r, g, b]
#      \macolour[r, g, b]
#
#    where r is red, g is green, and b is blue. All of them must be between
#   0 and 255. Any colour you want can be made out of a combination of these
#   colours. [0, 0, 0] is BLACK, and [255, 255, 255] is WHITE, [255, 0, 0] is
#   RED, and etc... If you use this, the best way is to find the exact shade
#   you want in a picture editor program like MS Paint, and then check the
#   RGB of that colour.
#==============================================================================
# ** Window Base
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Summary of Changes:
#    aliased method - normal_color, draw_item_name
#==============================================================================

class Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Normal Color
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modrnlgbr_nrml_color_itm_colrcodes_943n5 normal_color
  def normal_color
    # If drawing an item name from Draw Item Name
    if @ma_drawing_item != nil
    # Check Item Note for colour code
      if @ma_drawing_item.note[/\\MACOLOU*R\[([,\d\s]*?)\]/i]
        if $1.include? (",")
          $1[/\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*/i]
          # If the specification is not valid
          if $1.nil? || $2.nil? || $3.nil?
            # Default to normal_colour
            colour = modrnlgbr_nrml_color_itm_colrcodes_943n5
          else
            colour = Color.new ($1.to_i, $2.to_i, $3.to_i)
          end
        else # If only an integer, get colour from text_color method
          colour = text_color ($1.to_i)
          # Default to normal colour
          colour = modrnlgbr_nrml_color_itm_colrcodes_943n5 if colour.alpha == 0
        end
        return colour
      end
    end
    return modrnlgbr_nrml_color_itm_colrcodes_943n5
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Item Name
  #     item    : Item (skill, weapon, armor are also possible)
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalg_itemcolours_drw_itm_nm_94b5 draw_item_name
  def draw_item_name(item, *args)
    @ma_drawing_item = item
    # Run Original Method
    modalg_itemcolours_drw_itm_nm_94b5 (item, *args)
    @ma_drawing_item = nil
  end
end



Instrukcje masz w nagłówku ale jakby coś było niezrozumiałe to wal ;)

ishizaki1 - Pon 11 Paź, 2010 12:49

Marvolo : Zrobiłem tak ale to nie działa
RATI : Wielkie Dzienx masz pomógł
Temat do zamknięcia

Agumon - Pon 11 Paź, 2010 20:12

ishizaki1 napisał/a:
Marvolo : Zrobiłem tak ale to nie działa


Jak to nie działa. Powinno działać. Jeżeli masz grafikę okienka to tam masz takie kolory i jak wpisujesz np. \c[6]Broń to ta "6" to 6 kolor znajdujący się na tej tabeli kolorów.

RATI - Pon 11 Paź, 2010 23:20

Ale on nie chce żeby nazwy przedmiotów były kolorowe podczas wyświetlania wiadomości, tylko żeby miały różne kolory w menu przedmiotów/ekwipunku...a to co podajecie tyczy się tylko okna wiadomości...
Agumon - Wto 12 Paź, 2010 17:26

RATI napisał/a:
Ale on nie chce żeby nazwy przedmiotów były kolorowe podczas wyświetlania wiadomości, tylko żeby miały różne kolory w menu przedmiotów/ekwipunku...a to co podajecie tyczy się tylko okna wiadomości...


aha a ja myślałem że mu chodzi w oknie wiadomości. A to sory


Powered by phpBB modified by Przemo © 2003 phpBB Group