Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o tema • Voltar para a ficha do tema
ajuda, script de dano que interfere no chat!netplay master 4.7
Aldeia RPG :: RPG Maker :: Rpg Maker XP :: Dúvidas e pedidos
Página 1 de 1
ajuda, script de dano que interfere no chat!netplay master 4.7
olá povo do aldeia, eu uso e netplay master 4.7 e inseri 2 scrips que mudam a forma como o dano é apresentado, dano display e dano gravidade, mas ao coloca-los percebi que eles influenciaram diretamente no chat, o chat tbm virou balãoozinho que sofre o efeito da gravidade, se que alguém de bom coração poderia adapta-lo ou me ensinar como usa-lo sem influenciar o chat? eu tento estudar um pouquinho de rgss mas não tenho muito tempo, e tenho mulher, filhos, trabalho e escola!
se puderem ficarei muito agradecido!
scripts
se puderem ficarei muito agradecido!
scripts
- Dano Display:
- ################################################################################
################################### XMS ########################################
################################################################################
=begin
DAMAGE DISPLAY
--------------------------------------------------------------------------------
Script criado pelo site XMS.
Created by XMS site.
Tradução e tutorial por Moghunter.
--------------------------------------------------------------------------------
FUNÇÃO
Permite customizar a forma que o dano é apresentado, podendo modificar
o tipo de fonte, tamanho, cor, etc...
CUSTOMIZAÇÃO
=end
#-------------------------------------------------------------------------------
module XRXS_DamageSettings
#Tempo em que vai ficar o dano(número) na tela.
DURATION = 40
#Nome do dano critico.
CRITICAL_STRING = "CRÍTICO"
#Tamanho da Fonte do dano critico.
CRITICAL_FONT_SIZE = 15
#Cor do dano crítico.
CRITICAL_FONT_COLOR = Color.new(255, 200, 168)
#Cor do dano normal.
DEFAULT_COLOR = Color.new(255, 200, 168)
#Cor da energia recuperada.
DEFAULT_MINUS = Color.new(176, 255, 144)
#Cor do dano de SP.
SPDAMAGE_COLOR = Color.new(255, 176, 144)
#Cor do SP recuperado.
SPDAMAGE_MINUS = Color.new(0, 250, 255)
SPECIAL_COLOR_SETS =
#Definição do nome da experiência.
{"Xp"=>Color.new(0, 255, 164),
#Definição do nome do dinheiro.
"$"=>Color.new(255, 255, 32),
#Definição do nome do LV-UP.
"Level up!"=>Color.new(255, 255, 0)
}
def self.font
font = Font.new
font.name = "Georgia"#Nome da fonte.
font.size = 15 #Tamanho da fonte.
font.bold = true #Contorno da fonte.
font.italic = true #Fonte em estilo Itálico.
return font
end
end
#-------------------------------------------------------------------------------
module XRXS_DamageSettings
def self.color(value_string)
for key in SPECIAL_COLOR_SETS.keys.sort!
return SPECIAL_COLOR_SETS[key] unless value_string.scan(key).empty?
end
unless value_string.scan("SP").empty?
value = (value_string.sub("SP"){""}).to_i
color = (value >= 0 ? SPDAMAGE_COLOR : SPDAMAGE_MINUS)
value_string.gsub!("-") {""}
return color
end
value = (value_string).to_i
color = (value >= 0 ? DEFAULT_COLOR : DEFAULT_MINUS)
return color
end
end
module RPG
class Sprite < ::Sprite
def damage(value, critical)
dispose_damage
font = XRXS_DamageSettings.font
color = XRXS_DamageSettings.color(value.to_s)
if value.is_a?(Numeric)
damage_string = value.abs.to_s
else
damage_string = value.to_s
end
bitmap = Bitmap.new(160, 48)
bitmap.font = font
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1)
bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1)
bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1)
bitmap.font.color = color
bitmap.draw_text(0, 12, 160, 36, damage_string, 1)
if critical
critical_string = XRXS_DamageSettings::CRITICAL_STRING
bitmap.font.size = XRXS_DamageSettings::CRITICAL_FONT_SIZE
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 20, critical_string, 1)
bitmap.draw_text(+1, -1, 160, 20, critical_string, 1)
bitmap.draw_text(-1, +1, 160, 20, critical_string, 1)
bitmap.draw_text(+1, +1, 160, 20, critical_string, 1)
bitmap.font.color = XRXS_DamageSettings::CRITICAL_FONT_COLOR
bitmap.draw_text(0, 0, 160, 20, critical_string, 1)
end
@_damage_sprite = ::Sprite.new(self.viewport)
@_damage_sprite.bitmap = bitmap
@_damage_sprite.ox = 80
@_damage_sprite.oy = 20
@_damage_sprite.x = self.x
@_damage_sprite.y = self.y - self.oy / 2
@_damage_sprite.z = 3000
@_damage_duration = XRXS_DamageSettings::DURATION
end
end
end
class Game_Battler
attr_accessor :damage_sp
end
class Sprite_Battler < RPG::Sprite
alias xrxs62_update update
def update
if @battler != nil and @battler_visible and
@battler.damage_pop and @battler.damage_sp != nil and
(@battler.damage == nil or @battler.damage == "")
value = @battler.damage_sp
dispose_damage
damage_string = $data_system.words.sp + " " + value.to_s
damage(damage_string, @battler.critical)
@battler.damage_sp = nil
@battler.critical = false
@battler.damage_pop = false
end
xrxs62_update
end
end
- Dano Gravidade:
- ################################################################################
################################### XMS ########################################
################################################################################
=begin
Gravity Effect
--------------------------------------------------------------------------------
Script criado pelo site XMS.
Created by XMS site.
Tradução e tutorial por Moghunter.
--------------------------------------------------------------------------------
FUNÇÃO
Permite que a apresentação do dano tenha o efeito de gravidade.
CUSTOMIZAÇÃO
=end
#-------------------------------------------------------------------------------
module XRXS_DAMAGE
def damage_x_init_velocity
#Quantidade de direções que o dano poderá pular.
return 1.2 * (rand(5) - 2)
end
def damage_y_init_velocity
#Velocidade do dano.
return 10
end
#Força da gravidade.
GRAVITY = 0.98
end
#-------------------------------------------------------------------------------
module XRXS_DAMAGE
def update
super
@damage_sprites = [] if @damage_sprites.nil?
@damage_durations = [] if @damage_durations.nil?
if @_damage_sprite != nil and @_damage_sprite.visible
x = damage_x_init_velocity
y = damage_y_init_velocity
d = @_damage_duration
@damage_sprites.push(Sprite_Damage.new(@_damage_sprite, x, y, d))
@_damage_sprite.visible = false
end
for damage_sprite in @damage_sprites
damage_sprite.update
end
for i in 0...@damage_sprites.size
@damage_sprites[i] = nil if @damage_sprites[i].disposed?
end
@damage_sprites.compact!
end
def dispose
super
if @damage_sprites != nil
for damage_sprite in @damage_sprites
damage_sprite.dispose
end
end
end
end
class RPG::Sprite < Sprite
include XRXS_DAMAGE
end
class Sprite_Damage < Sprite
def initialize(sprite, init_x_speed, init_y_speed, duration)
super(nil)
self.bitmap = sprite.bitmap.dup unless sprite.bitmap.nil?
self.opacity = sprite.opacity
self.x = sprite.x
self.y = sprite.y
self.z = sprite.z
self.ox = sprite.ox
self.oy = sprite.oy
@now_x_speed = init_x_speed
@now_y_speed = init_y_speed
@potential_x_energy = 0.0
@potential_y_energy = 0.0
@duration = duration
end
def update
super
n = self.oy + @now_y_speed
if n <= 0
@now_y_speed *= -1
@now_y_speed /= 2
@now_x_speed /= 2
end
self.oy = [n, 0].max
@potential_y_energy += XRXS_DAMAGE::GRAVITY
speed = @potential_y_energy.floor
@now_y_speed -= speed
@potential_y_energy -= speed
@potential_x_energy += @now_x_speed
speed = @potential_x_energy.floor
self.ox += speed
@potential_x_energy -= speed
@duration -= 1
if @duration == 0
self.dispose
end
end
end
thiagus- Semi-Experiente
- Mensagens : 144
Créditos : 9
Tópicos semelhantes
» [Ajuda]Script do Netplay Master v2
» [Netplay Master 3] Chat
» Cor da fonte do chat no Netplay Master v4.9
» Desativar chat no NetPlay Master v5
» [Resolvido]Chat no NetPlay Master v3
» [Netplay Master 3] Chat
» Cor da fonte do chat no Netplay Master v4.9
» Desativar chat no NetPlay Master v5
» [Resolvido]Chat no NetPlay Master v3
Aldeia RPG :: RPG Maker :: Rpg Maker XP :: Dúvidas e pedidos
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos