Questo script mi serve davvero tanto! Ma mi dice errore di sintassi alla riga 40
qualcuno lo può aggiustare? Mi hanno detto che è stato preso da un progetto con uno script più grande quindi può darsi che manchi qualcosa...l dategli uno sguardo.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Regen Status Effect by Blizzard
# Version: 1.1b
# Type: Game Experience Improvement
# Date: 4.5.2006
# Date v1.1b: 12.1.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in 1.1b:
# - fixed glitches, improved code and made it possible to have Regen and
# Poison at the same time (they nullificate each other on the map, but not
# in battle)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
REGEN_ID = 18 # set this to the status effect ID that will be Regen
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# Game_Party
#==============================================================================
class Game_Party
alias check_map_slip_damage_regen_later check_map_slip_damage
def check_map_slip_damage
check_map_slip_damage_regen_later
@actors.each {|actor|
if actor.hp > 0 && actor.states.include?(REGEN_ID)
actor.hp += [actor.maxhp / 100, 1].max
end}
end
end
end
#==============================================================================
# Game_Battler
#==============================================================================
class Game_Battler
alias slip_damage_regen_later? slip_damage?
def slip_damage?
return true if @states.include?(REGEN_ID) && !$scene.is_a?(Scene_Map)
return slip_damage_regen_later?
end
alias slip_damage_effect_regen_later slip_damage_effect
def slip_damage_effect
if !@states.include?(REGEN_ID) && slip_damage?
slip_damage_effect_regen_later
elsif @states.include?(REGEN_ID)
dam = -self.maxhp / 10
if dam.abs > 0
amp = [dam.abs * 15 / 100, 1].max
dam -= rand(amp+1) + rand(amp+1) - amp
end
self.hp -= dam
self.damage = 0 if self.damage == nil
self.damage += dam
end
end
end
Question
Goofy !
Questo script mi serve davvero tanto! Ma mi dice errore di sintassi alla riga 40
qualcuno lo può aggiustare? Mi hanno detto che è stato preso da un progetto con uno script più grande quindi può darsi che manchi qualcosa...l dategli uno sguardo.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # Regen Status Effect by Blizzard # Version: 1.1b # Type: Game Experience Improvement # Date: 4.5.2006 # Date v1.1b: 12.1.2007 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # # new in 1.1b: # - fixed glitches, improved code and made it possible to have Regen and # Poison at the same time (they nullificate each other on the map, but not # in battle) #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: REGEN_ID = 18 # set this to the status effect ID that will be Regen #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: #============================================================================== # Game_Party #============================================================================== class Game_Party alias check_map_slip_damage_regen_later check_map_slip_damage def check_map_slip_damage check_map_slip_damage_regen_later @actors.each {|actor| if actor.hp > 0 && actor.states.include?(REGEN_ID) actor.hp += [actor.maxhp / 100, 1].max end} end end end #============================================================================== # Game_Battler #============================================================================== class Game_Battler alias slip_damage_regen_later? slip_damage? def slip_damage? return true if @states.include?(REGEN_ID) && !$scene.is_a?(Scene_Map) return slip_damage_regen_later? end alias slip_damage_effect_regen_later slip_damage_effect def slip_damage_effect if !@states.include?(REGEN_ID) && slip_damage? slip_damage_effect_regen_later elsif @states.include?(REGEN_ID) dam = -self.maxhp / 10 if dam.abs > 0 amp = [dam.abs * 15 / 100, 1].max dam -= rand(amp+1) + rand(amp+1) - amp end self.hp -= dam self.damage = 0 if self.damage == nil self.damage += dam end end endLink to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now