Eu usei esse script aqui para netplay master v4 veja mas ta dando erro:
Veja a imagem:
Por favor alguem resolvar
- Código:
# Creado por: Luca
# V do Netplay: 3.0
module Configurar_Quests
#
# A imagem dos icones debe ir na pasta icones, e os icones debem estar em
# uma so imagem um do lado do outro.
#
# 1º Icone: Nova quest.
# 2º Icone: Quest em progreso.
# 3º Icone: Quest completa.
#
SPRITE_ICONS = "Icons_Quests" # Nome da imagem na pasta Icons
#
# A = Id da quest.
# B = Id do evento.
# C = Id do mapa.
# D = Id do interruptor.
#
# EVENT_QUEST = {A => [B, C, D]}
EVENT_QUEST = {
1 => [12, 6, 1029],
2 => [20, 6, 1032]
}
end
class Sprite_Character < RPG::Sprite
alias quest_icons_rpg_sprite_sprite_character_update update
def update
quest_icons_rpg_sprite_sprite_character_update
if @character.is_a?(Game_Event)
for qs in 0..Configurar_Quests::MISSION.size
quest = Configurar_Quests::MISSION[qs]
if quest.nil? or $game_party.actors[0].level < quest[5]
next
end
event_quest = Configurar_Quests::EVENT_QUEST[qs]
next if event_quest.nil?
if $game_map.map_id == event_quest[1]
event = $game_map.events[event_quest[0]]
if @character.id == event.id and @sprite_quest_icon.nil? and
@icon != -1
create_quest_icon_sprite
end
if $game_switches[Configurar_Quests::MISSION_START[qs][0]] and
!$game_switches[quest[4]]
@icon = 1
end
if @icon == 1 and $game_switches[quest[4]]
@icon = 2
end
if @icon == 2 and $game_switches[event_quest[2]]
@icon = -1
end
end
end
update_quest_icon_sprite
end
end
def create_quest_icon_sprite
b = Bitmap.new("Graphics/Icons/" + Configurar_Quests::SPRITE_ICONS)
bitmap = Bitmap.new(b.width, b.height)
@sprite_quest_icon = Sprite.new(self.viewport)
@sprite_quest_icon.bitmap = bitmap
@sprite_quest_icon.x = self.x - (@character.width / 2)
@sprite_quest_icon.y = (self.y - @character.height) - b.height
@sprite_quest_icon.y -= @_text_display.bitmap.height unless @_text_display.nil?
@sprite_quest_icon.z = 30001
@sprite_quest_icon.visible = self.visible
@icon = 0
@old_icon = 0
@last_icon_x = 0
@last_icon_y = 0
refresh_quest_icon_sprite
end
def refresh_quest_icon_sprite
return if @sprite_quest_icon.nil?
@sprite_quest_icon.bitmap.clear
b = Bitmap.new("Graphics/Icons/" + Configurar_Quests::SPRITE_ICONS)
width = b.width / 3
height = b.height
rect = Rect.new(@icon * width, 0, width, height)
@sprite_quest_icon.bitmap.blt(0, 0, b, rect)
@old_icon = @icon
@sprite_quest_icon.x = self.x - (@character.width / 2)
@sprite_quest_icon.y = (self.y - @character.height) - height
@sprite_quest_icon.y -= @_text_display.bitmap.height unless @_text_display.nil?
@last_icon_x = @sprite_quest_icon.x
@last_icon_y = @sprite_quest_icon.y
end
def dispose_sprite_quest_icon
unless @sprite_quest_icon.nil?
@sprite_quest_icon.bitmap.clear
@sprite_quest_icon.dispose
@sprite_quest_icon = nil
end
end
def update_quest_icon_sprite
if @sprite_quest_icon.nil? or @icon == -1
dispose_sprite_quest_icon
return
end
@sprite_quest_icon.update
if @icon != @old_icon or @last_icon_x != @character.x or @last_icon_y != @character.y
refresh_quest_icon_sprite
end
end
end
class Game_Character
def width
return RPG::Cache.character(@character_name, @character_hue).width / 4
end
def height
return RPG::Cache.character(@character_name, @character_hue).height / 4
end
end
Veja a imagem:
Por favor alguem resolvar