#------------------------------------------------------------------------------#
# Nie edytuj kodu poniĹźej chyba Ĺźe wiesz co robisz! #
# #
#------------------------------------------------------------------------------#
module LNR
def get_single_for(note_field,tag_name)
lines = note_field.split("\n")
for line in lines
if line[0,1].eql?("<")
line2=line.split(/[<> ]/)
if line2[1].eql?(tag_name)
return line2[2]
end
end
end
end
end
#------------------------------------------------------------------------------#
class Window_Base < Window
include LNR
include IQC_Configs
def draw_item_name(item, x, y, enabled = true)
if item != nil
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
if item.note.include?("<IQC ")
quality = get_single_for(item.note,"IQC")
self.contents.font.color = text_color(IQC_quality.index(quality).to_i)
end
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 24, y, 172, WLH, item.name)
self.contents.font.color = normal_color
end
end
end
Pomógł: 20 razy Dołączył: 19 Mar 2010 Posty: 421 Skąd: Reykjavik
Wysłany: Wto 24 Sty, 2012 21:03
co do skryptu i jego przedstawienia chcÄ rzec tylko dwa zdania;
sam skrypt jest boski, legendarny oraz epicki!
a screen, ktĂłry tu daĹeĹ teĹź jest niezĹy
Pomógł: 45 razy Dołączył: 10 Sty 2011 Posty: 612 Skąd: mam wiedzieÄ?
Wysłany: Pon 23 Kwi, 2012 20:41
Podobny skrypt, zawierajÄ cy RGB:
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
________________________ I'm a tiger! I roar. I hunt, I climb, I eat, I wash, I sleep!
Gość, jeĹźeli pomogĹem daj "PomĂłgĹ"
Kurde! CiÄ gle jak to prĂłbujÄ naprawiÄ znajdujÄ siÄ nowy bĹÄ d!
________________________ JeĹli pomogĹem, daj
Spoiler:
POMĂGĹ
Uwielbiam siÄ bawiÄ na zdarzeniach w VX-ie... WiÄc jeĹli masz jakieĹ pytanie jak coĹ zrobiÄ na zdarzeniach to napisz. JeĹli bÄdÄ wiedziaĹ to odpowiem
Te linijki odpowiadajÄ kolorom: http://www.ultimateam.pl/...p?p=82475#82475 WiÄc jeĹźeli chcesz şóĹty, to wystarczy tam gdzie jest 14 sÄ '' takie znaki i tam wpisz np. 14 => "şóĹty", # i teraz robisz to co wczesniej tylko Ĺźe zamiast epic, wpisujesz şóĹty... Mam nadziejÄ Ĺźe pomogĹem.
________________________ JeĹli pomogĹem, daj
Spoiler:
POMĂGĹ
Uwielbiam siÄ bawiÄ na zdarzeniach w VX-ie... WiÄc jeĹli masz jakieĹ pytanie jak coĹ zrobiÄ na zdarzeniach to napisz. JeĹli bÄdÄ wiedziaĹ to odpowiem
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Nie możesz załączać plików na tym forum Możesz ściągać załączniki na tym forum