Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o tema • Voltar para a ficha do tema
Item Types +
2 participantes
Aldeia RPG :: RPG Maker :: Rpg Maker XP :: Scripts
Página 1 de 1
Item Types +
Bom dia pessoal, hoje eu trago meu primeiro script plug and play.
Eu queria receber um pouco de feed back e também postar ele pra quem precisar de algum sistema como esse.
Descrição:
O script permite agrupar Items, Armas, e Equipamento em 3 categorias diferentes Rare, Epic e Legend.
Cada tipo tem uma cor diferente que sera mostrada na janela de Items, Equip e Status.
Alem disso na janela Equip, cuando for trocar de equip se alguma das stas melhora o numero da stat fica verde, se caso contrario fica vermelho
E por ultimo na janela Status se o personajem tiver um arma ou cualquer equip que melhorar a STR, DEX, AGI ou INT o valor do stat ficara verde.
Imagens:
Items:
Equip:
Status:
Script:
Nao esqueça de botar os creds no seu projeto se decidir usar o script nele!
Para usar e só criar um novo script acima de Main e colar ele com cualquer nome
Eu queria receber um pouco de feed back e também postar ele pra quem precisar de algum sistema como esse.
Descrição:
O script permite agrupar Items, Armas, e Equipamento em 3 categorias diferentes Rare, Epic e Legend.
Cada tipo tem uma cor diferente que sera mostrada na janela de Items, Equip e Status.
Alem disso na janela Equip, cuando for trocar de equip se alguma das stas melhora o numero da stat fica verde, se caso contrario fica vermelho
E por ultimo na janela Status se o personajem tiver um arma ou cualquer equip que melhorar a STR, DEX, AGI ou INT o valor do stat ficara verde.
Imagens:
Items:
- Spoiler:
Equip:
- Spoiler:
Status:
- Spoiler:
Script:
- Código:
#-----------------------------------------------------------------------------
# Item Type +
# Credits: AvilaMn
#-----------------------------------------------------------------------------
# Configuração:
# Adicionar o ID do item, arma ou equipe desejado no tipo desejado
# Item Tipo Raro = RARE_ITEMS = [ID, ...]
#-----------------------------------------------------------------------------
module Item_Type
# ITEMS
RARE_ITEMS = [2]
EPIC_ITEMS = [3]
LEGEND_ITEMS = [4]
# ARMAS
RARE_WEAPONS = [2]
EPIC_WEAPONS = [3]
LEGEND_WEAPONS= [4]
# ARMADURAS, JOYAS, ESCUDOS
RARE_ARMORS = [2]
EPIC_ARMORS = [3]
LEGEND_ARMORS = [4]
end
# Agrego colores a Windows Base
class Window_Base
#--------------------------------------------------------------------------
# *** Colores personalizados
# Si desejar mudar a cor que representa cada tipo de item
# devera mudar os valores RGB dentro das parentese desejada
# rare_color e rare_disabled_color = RARE_ITEMS
#--------------------------------------------------------------------------
# Raro = Lima || Configuracion: Color.new(R, G, B, Opacidad)
def rare_color
return Color.new(181, 230, 29, 255)
end
def rare_disabled_color
return Color.new(181, 230, 29, 128)
end
# Epico = Morado
def epic_color
return Color.new(163, 73, 164, 255)
end
def epic_disabled_color
return Color.new(163, 73, 164, 128)
end
# Legendario = Dorado
def legend_color
return Color.new(255, 201, 14, 255)
end
def legend_disabled_color
return Color.new(255, 201, 14, 128)
end
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Nao mexa em baixo
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# Corrijo draw_item_name
def draw_item_name(item, x, y, type)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
case type
when 0
if Item_Type::RARE_WEAPONS.include?(item.id)
self.contents.font.color = rare_color
end
if Item_Type::EPIC_WEAPONS.include?(item.id)
self.contents.font.color = epic_color
end
if Item_Type::LEGEND_WEAPONS.include?(item.id)
self.contents.font.color = legend_color
end
when 1
if Item_Type::RARE_ARMORS.include?(item.id)
self.contents.font.color = rare_color
end
if Item_Type::EPIC_ARMORS.include?(item.id)
self.contents.font.color = epic_color
end
if Item_Type::LEGEND_ARMORS.include?(item.id)
self.contents.font.color = legend_color
end
end
self.contents.draw_text(x + 28, y, 212, 32, item.name)
end
# Corrijo draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = $data_system.words.mdef
parameter_value = actor.mdef
when 3
parameter_name = $data_system.words.str
parameter_value = actor.str
when 4
parameter_name = $data_system.words.dex
parameter_value = actor.dex
when 5
parameter_name = $data_system.words.agi
parameter_value = actor.agi
when 6
parameter_name = $data_system.words.int
parameter_value = actor.int
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
case type
when 3
if @actor.weapon_id > 0
if $data_weapons[@actor.weapon_id].str_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor1_id > 0
if $data_armors[@actor.armor1_id].str_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor2_id > 0
if $data_armors[@actor.armor2_id].str_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor3_id > 0
if $data_armors[@actor.armor3_id].str_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor4_id > 0
if $data_armors[@actor.armor4_id].str_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
when 4
if @actor.weapon_id > 0
if $data_weapons[@actor.weapon_id].dex_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor1_id > 0
if $data_armors[@actor.armor1_id].dex_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor2_id > 0
if $data_armors[@actor.armor2_id].dex_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor3_id > 0
if $data_armors[@actor.armor3_id].dex_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor4_id > 0
if $data_armors[@actor.armor4_id].dex_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
when 5
if @actor.weapon_id > 0
if $data_weapons[@actor.weapon_id].agi_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor1_id > 0
if $data_armors[@actor.armor1_id].agi_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor2_id > 0
if $data_armors[@actor.armor2_id].agi_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor3_id > 0
if $data_armors[@actor.armor3_id].agi_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor4_id > 0
if $data_armors[@actor.armor4_id].agi_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
when 6
if @actor.weapon_id > 0
if $data_weapons[@actor.weapon_id].int_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor1_id > 0
if $data_armors[@actor.armor1_id].int_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor2_id > 0
if $data_armors[@actor.armor2_id].int_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor3_id > 0
if $data_armors[@actor.armor3_id].int_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
if @actor.armor4_id > 0
if $data_armors[@actor.armor4_id].int_plus > 0
self.contents.font.color = Color.new(128, 255, 128, 255)
end
end
end
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
end
end
# Corrijo el Draw Item dandole colores distintos segun el tipo del item
class Window_Item
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
# ITEMS
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
if Item_Type::RARE_ITEMS.include?(item.id)
self.contents.font.color = rare_color
end
if Item_Type::EPIC_ITEMS.include?(item.id)
self.contents.font.color = epic_color
end
if Item_Type::LEGEND_ITEMS.include?(item.id)
self.contents.font.color = legend_color
end
else
self.contents.font.color = disabled_color
if Item_Type::RARE_ITEMS.include?(item.id)
self.contents.font.color = rare_disabled_color
end
if Item_Type::EPIC_ITEMS.include?(item.id)
self.contents.font.color = epic_disabled_color
end
if Item_Type::LEGEND_ITEMS.include?(item.id)
self.contents.font.color = legend_disabled_color
end
end
# WEAPONS
if item.is_a?(RPG::Weapon)
self.contents.font.color = normal_color
if Item_Type::RARE_WEAPONS.include?(item.id)
self.contents.font.color = rare_color
end
if Item_Type::EPIC_WEAPONS.include?(item.id)
self.contents.font.color = epic_color
end
if Item_Type::LEGEND_WEAPONS.include?(item.id)
self.contents.font.color = legend_color
end
end
# ARMORS
if item.is_a?(RPG::Armor)
self.contents.font.color = normal_color
if Item_Type::RARE_ARMORS.include?(item.id)
self.contents.font.color = rare_color
end
if Item_Type::EPIC_ARMORS.include?(item.id)
self.contents.font.color = epic_color
end
if Item_Type::LEGEND_ARMORS.include?(item.id)
self.contents.font.color = legend_color
end
end
#
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
end
# Corrijo el Window_EquipLeft
# Cuando se selecciona un item que da mas stats el valor queda verde
# Cuando se selecciona un item que da menos stats el valor queda rojo
class Window_EquipLeft
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
parameter1 = @actor.atk
parameter2 = @actor.pdef
parameter3 = @actor.mdef
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 4, 32)
draw_actor_parameter(@actor, 4, 64, 0)
draw_actor_parameter(@actor, 4, 96, 1)
draw_actor_parameter(@actor, 4, 128, 2)
if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 64, 40, 32, "->", 1)
self.contents.font.color = normal_color
if parameter1 < @new_atk
self.contents.font.color = Color.new(128, 255, 128, 255)
end
if parameter1 > @new_atk
self.contents.font.color = Color.new(255, 128, 128, 255)
end
self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
end
if @new_pdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 96, 40, 32, "->", 1)
self.contents.font.color = normal_color
if parameter2 < @new_pdef
self.contents.font.color = Color.new(128, 255, 128, 255)
end
if parameter2 > @new_pdef
self.contents.font.color = Color.new(255, 128, 128, 255)
end
self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
end
if @new_mdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 128, 40, 32, "->", 1)
self.contents.font.color = normal_color
if parameter3 < @new_mdef
self.contents.font.color = Color.new(128, 255, 128, 255)
end
if parameter3 > @new_mdef
self.contents.font.color = Color.new(255, 128, 128, 255)
end
self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
end
end
end
# Corrijo Window_EquipRight
class Window_EquipRight
def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
draw_item_name(@data[0], 92, 32 * 0, 0)
draw_item_name(@data[1], 92, 32 * 1, 1)
draw_item_name(@data[2], 92, 32 * 2, 1)
draw_item_name(@data[3], 92, 32 * 3, 1)
draw_item_name(@data[4], 92, 32 * 4, 1)
end
end
# Corrijo Window_EquipItem
class Window_EquipItem
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
if item.is_a?(RPG::Weapon)
if Item_Type::RARE_WEAPONS.include?(item.id)
self.contents.font.color = rare_color
end
if Item_Type::EPIC_WEAPONS.include?(item.id)
self.contents.font.color = epic_color
end
if Item_Type::LEGEND_WEAPONS.include?(item.id)
self.contents.font.color = legend_color
end
end
if item.is_a?(RPG::Armor)
if Item_Type::RARE_ARMORS.include?(item.id)
self.contents.font.color = rare_color
end
if Item_Type::EPIC_ARMORS.include?(item.id)
self.contents.font.color = epic_color
end
if Item_Type::LEGEND_ARMORS.include?(item.id)
self.contents.font.color = legend_color
end
end
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
end
# Corrijo Window_Status
class Window_Status
def refresh
self.contents.clear
draw_actor_graphic(@actor, 40, 112)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 4 + 144, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
draw_actor_parameter(@actor, 96, 192, 0)
draw_actor_parameter(@actor, 96, 224, 1)
draw_actor_parameter(@actor, 96, 256, 2)
draw_actor_parameter(@actor, 96, 304, 3)
draw_actor_parameter(@actor, 96, 336, 4)
draw_actor_parameter(@actor, 96, 368, 5)
draw_actor_parameter(@actor, 96, 400, 6)
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 80, 32, "Exp")
self.contents.draw_text(320, 80, 80, 32, "Sig. Nivel")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 160, 96, 32, "Equipamento")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208, 0)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256, 1)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304, 1)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352, 1)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400, 1)
end
def dummy
self.contents.font.color = system_color
self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144, 0)
draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208, 1)
draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272, 1)
draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336, 1)
draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400, 1)
end
end
Nao esqueça de botar os creds no seu projeto se decidir usar o script nele!
Para usar e só criar um novo script acima de Main e colar ele com cualquer nome
AvilaMn- Novato
- Mensagens : 4
Créditos : 2
Valentine, OFWGKTA e ageter0 gostam desta mensagem
Re: Item Types +
Apesar de o RMXP não ser mais o meu preferido devido a modificações que acompanham os mais novos RMVXACE e RMMV gostei do script, e porque esta identado nos comentários em espanhol?
OFWGKTA- Experiente
- Mensagens : 408
Créditos : 27
Ficha do personagem
Nível: 1
Experiência:
(5/50)
Vida:
(30/30)
Re: Item Types +
Godzilla escreveu:Apesar de o RMXP não ser mais o meu preferido devido a modificações que acompanham os mais novos RMVXACE e RMMV gostei do script, e porque esta identado nos comentários em espanhol?
Obrigado
Os comentários estão em espanhol porque eu sou Uruguayo, nao br.
Eu expliquei isso na minha presentação no forum, eu entendo português mas minha língua natal e espanhol
Eu traduzi com ajuda do Google as configurações do script porque o forum e br
AvilaMn- Novato
- Mensagens : 4
Créditos : 2
ageter0 gosta desta mensagem
Tópicos semelhantes
» pegar item e por item no inventário por comando
» Item por lv 1.2
» Animations E item
» Item PopUp 1.10
» Level-Item
» Item por lv 1.2
» Animations E item
» Item PopUp 1.10
» Level-Item
Aldeia RPG :: RPG Maker :: Rpg Maker XP :: Scripts
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos