Usa el siguiente:
# Código Original por Help-14
#Rediseñado por Eduardobra
Default_Following_Pokemon_Number = 0
Common_Event = 3
Current_Following_Variable = 26
Walking_Time_Variable = 27
Happier_After = 60
Animation_Come_Out = 45
Animation_Come_In = 46
Emo_Happy = 47
Emo_Normal = 48
Emo_Hate = 49
Water_Pokemon_Can_Surf = true
def FollowingMoveRoute(commands,waitComplete=false)
$PokemonTemp.dependentEvents.SetMoveRoute(commands,waitComplete)
end
class DependentEvents
def change_following_pokemon
if $game_variables[Current_Following_Variable]+1==$Trainer.party.length+1
$game_variables[Current_Following_Variable]=0
else
$game_variables[Current_Following_Variable]+=1
end
if $game_variables[Current_Following_Variable]==$Trainer.party.length
remove_sprite(true)
else
if $Trainer.party[$game_variables[Current_Following_Variable]].isShiny?
shiny=true
else
shiny=false
end
change_sprite($Trainer.party[$game_variables[Current_Following_Variable]].species, shiny, true)
end
end
def refresh_sprite(menu=nil)
if $Trainer.party.length!=$game_variables[Current_Following_Variable]
if $Trainer.party.length-1<$game_variables[Current_Following_Variable]
$game_variables[Current_Following_Variable]=0
end
if $Trainer.party[$game_variables[Current_Following_Variable]].isShiny?
shiny=true
else
shiny=false
end
change_sprite($Trainer.party[$game_variables[Current_Following_Variable]].species, shiny, false)
end
end
def change_sprite(id, shiny=nil, animation=nil)
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
if events && events[8]=="Dependent"
if shiny==true
events[6]=sprintf("%03ds",id)
@realEvents.character_name=sprintf("%03ds",id)
else
events[6]=sprintf("%03d",id)
@realEvents.character_name=sprintf("%03d",id)
end
if animation==true
$scene.spriteset.addUserAnimation(Animation_Come_Out,@realEvents.x,@realEvents.y)
end
$game_variables[Walking_Time_Variable]=0
end
end
end
def remove_sprite(animation=nil)
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
if events && events[8]=="Dependent"
events[6]=sprintf("nil")
@realEvents.character_name=sprintf("nil")
if animation==true
$scene.spriteset.addUserAnimation(Animation_Come_In,@realEvents.x,@realEvents.y)
end
$game_variables[Current_Following_Variable]=$Trainer.party.length
$game_variables[Walking_Time_Variable]=0
end
end
end
def check_surf(animation=nil)
if Water_Pokemon_Can_Surf == true and $game_variables[Current_Following_Variable]!=$Trainer.party.length
if $Trainer.party[$game_variables[Current_Following_Variable]].type1!="WATER" or
$Trainer.party[$game_variables[Current_Following_Variable]].type2!="WATER"
remove_sprite(false)
end
else
remove_sprite(false)
end
end
def check_faint
if $Trainer.party[$game_variables[Current_Following_Variable]].hp<=0
for i in 0..$Trainer.party.length-1
if $Trainer.party.hp>0
found=true
$game_variables[Current_Following_Variable]=i
refresh_sprite(true)
break
end
end
if !found
remove_sprite
end
end
end
def talk_pokemon
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
if events && events[8]=="Dependent"
pos_x=@realEvents.x
pos_y=@realEvents.y
end
end
pbPlayCry($Trainer.party[$game_variables[Current_Following_Variable]].species)
if $game_variables[Current_Following_Variable]!=6
if $Trainer.party[$game_variables[Current_Following_Variable]].happiness>0 &&
$Trainer.party[$game_variables[Current_Following_Variable]].happiness<=50
$scene.spriteset.addUserAnimation(Emo_Hate, pos_x, pos_y)
Kernel.pbMessage(_INTL("{1} odia estar con {2}.",$Trainer.party[$game_variables[Current_Following_Variable]].name,$Trainer.name))
elsif $Trainer.party[$game_variables[Current_Following_Variable]].happiness>50 &&
$Trainer.party[$game_variables[Current_Following_Variable]].happiness<=150
$scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y)
Kernel.pbMessage(_INTL("{1} no está feliz de estar junto a {2}.",$Trainer.party[$game_variables[Current_Following_Variable]].name,$Trainer.name))
else
$scene.spriteset.addUserAnimation(Emo_Happy, pos_x, pos_y)
Kernel.pbMessage(_INTL("{1} está feliz de estar junto a {2}.",$Trainer.party[$game_variables[Current_Following_Variable]].name,$Trainer.name))
end
end
end
def SetMoveRoute(commands,waitComplete=false)
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
if events && events[8]=="Dependent"
pbMoveRoute(@realEvents,commands,waitComplete)
end
end
end
end
#----------------------------------------------------------------------------
# Game_System
#----------------------------------------------------------------------------
class Game_System
alias up update
def update
add_following_time
up
end
def add_following_time
if $game_variables[2]==true
$game_variables[Walking_Time_Variable]+=1 if $game_variables[Walking_Time_Variable]!=$Trainer.party.length
if $game_variables[Walking_Time_Variable]==Happier_After*Graphics.frame_rate
$Trainer.party[$game_variables[Current_Following_Variable]].happiness+=1
$game_variables[Walking_Time_Variable]=0
end
end
end
end
def pbEndBattle(result)
@abortable=false
pbShowWindow(BLANK)
$game_system.bgm_fade(1.0)
pbFadeOutAndHide [MENTION=24071]Sprite[/MENTION]s)
[MENTION=24071]Sprite[/MENTION]skin.dispose
pbDisposeSprites
$PokemonTemp.dependentEvents.check_faint
end
def Kernel.pbSurf
if $DEBUG || $Trainer.badges
movefinder=Kernel.pbCheckMove(PBMoves::SURF)
if $DEBUG || movefinder
if Kernel.pbConfirmMessage(_INTL("El agua luce muy bien... ¿Quieres usar surf?"))
speciesname=!movefinder ? PBSpecies.getName(0) : movefinder.name
Kernel.pbMessage(_INTL("{1} utilizó Surf!",speciesname))
pbHiddenMoveAnimation(movefinder)
surfbgm=pbGetMetadata(0,MetadataSurfBGM)
$PokemonTemp.dependentEvents.check_surf
if surfbgm
pbCueBGM(surfbgm,0.5)
end
Kernel.pbCancelVehicles
$PokemonGlobal.surfing=true
$PokemonEncounters.clearStepCount
Kernel.pbJumpToward
Kernel.pbUpdateVehicle
$game_player.check_event_trigger_here([1,2])
return true
end
end
end
return false
end
def pbEndSurf(xOffset,yOffset)
return false if !$PokemonGlobal.surfing
x=$game_player.x
y=$game_player.y
currentTag=$game_map.terrain_tag(x,y)
facingTag=Kernel.pbFacingTerrainTag
if pbIsWaterTag?(currentTag)&&!pbIsWaterTag?(facingTag)
if Kernel.pbJumpToward
Kernel.pbCancelVehicles
$game_map.autoplayAsCue
increase_steps
result=$game_player.check_event_trigger_here([1,2])
Kernel.pbOnStepTaken(result)
$PokemonTemp.dependentEvents.refresh_sprite
end
return true
end
return false
end
def Kernel.pbCanUseHiddenMove?(pkmn,move)
case move
when PBMoves::FLY
if !$DEBUG && !$Trainer.badges
Kernel.pbMessage(_INTL("Necesitas otra medalla."))
return false
end
if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
Kernel.pbMessage(_INTL("Aqui no funciona."))
return false
end
return true
when PBMoves::CUT
if !$DEBUG && !$Trainer.badges
Kernel.pbMessage(_INTL("Necesitas otra medalla."))
return false
end
facingEvent=$game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Tree"
Kernel.pbMessage(_INTL("No puedes utilizarlo aqui."))
return false
end
return true
when PBMoves::HEADBUTT
facingEvent=$game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="HeadbuttTree"
Kernel.pbMessage(_INTL("Aqui no puede usarse."))
return false
end
return true
when PBMoves::SURF
terrain=Kernel.pbFacingTerrainTag
if !$DEBUG && !$Trainer.badges
Kernel.pbMessage(_INTL("Necesitas otra medalla."))
return false
end
if $PokemonGlobal.surfing
Kernel.pbMessage(_INTL("Ya estás surfeando."))
return false
end
terrain=Kernel.pbFacingTerrainTag
if pbGetMetadata($game_map.map_id,MetadataBicycleAlways)
Kernel.pbMessage(_INTL("Disfruta el paseo!"))
return false
end
if !pbIsWaterTag?(terrain)
Kernel.pbMessage(_INTL("Aqui no puedes surfear!"))
return false
end
return true
when PBMoves::STRENGTH
if !$DEBUG && !$Trainer.badges
Kernel.pbMessage(_INTL("Necesitas otra medalla."))
return false
end
facingEvent=$game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Boulder"
Kernel.pbMessage(_INTL("No puede usarse aqui."))
return false
end
return true
when PBMoves::ROCKSMASH
terrain=Kernel.pbFacingTerrainTag
if !$DEBUG && !$Trainer.badges
Kernel.pbMessage(_INTL("Necesitas otra medalla."))
return false
end
facingEvent=$game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Rock"
Kernel.pbMessage(_INTL("No puede usarse aqui."))
return false
end
return true
when PBMoves::FLASH
if !$DEBUG && !$Trainer.badges
Kernel.pbMessage(_INTL("Necesitas otra medalla."))
return false
end
if !pbGetMetadata($game_map.map_id,MetadataDarkMap)
Kernel.pbMessage(_INTL("Aqui no funciona."))
return false
end
if $PokemonGlobal.flashUsed
Kernel.pbMessage(_INTL("Ya está en uso."))
return false
end
return true
when PBMoves::WATERFALL
if !$DEBUG && !$Trainer.badges
Kernel.pbMessage(_INTL("Necesitas otra medalla."))
return false
end
terrain=Kernel.pbFacingTerrainTag
if terrain!=PBTerrain::Waterfall
Kernel.pbMessage(_INTL("No puedes usarlo aqui."))
return false
end
return true
when PBMoves::DIVE
if !$DEBUG && !$Trainer.badges
Kernel.pbMessage(_INTL("Necesitas otra medalla."))
return false
end
if $PokemonGlobal.diving
return true
end
if $game_player.terrain_tag!=PBTerrain::DeepWater
Kernel.pbMessage(_INTL("No puedes usarlo aqui."))
return false
end
if !pbGetMetadata($game_map.map_id,MetadataDiveMap)
Kernel.pbMessage(_INTL("No puedes usarlo aqui."))
return false
end
return true
when PBMoves::TELEPORT
if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
Kernel.pbMessage(_INTL("No puedes usarlo aqui."))
return false
end
healing=$PokemonGlobal.healingSpot
if !healing
healing=pbGetMetadata(0,MetadataHome)
end
if healing
mapname=pbGetMapNameFromId(healing[0])
if Kernel.pbConfirmMessage(_INTL("¿Quieres volver al ultimo punto de restauración {1}?",mapname))
return true
end
return false
else
Kernel.pbMessage(_INTL("No puedes usarlo aqui."))
return false
end
when PBMoves::DIG
escape=pbGetMetadata($game_map.map_id,MetadataEscapePoint)
if !escape
Kernel.pbMessage(_INTL("No puedes usarlo aqui."))
return false
end
if $game_player.pbHasDependentEvents?
Kernel.pbMessage(_INTL("No puedes usarlo cuando alguien te acompaña."))
return false
end
mapname=pbGetMapNameFromId(escape[0])
if Kernel.pbConfirmMessage(_INTL("¿Quieres escapar y volver a {1}?",mapname))
return true
end
return false
when PBMoves::SWEETSCENT
return true
else
return HiddenMoveHandlers.triggerCanUseMove(move,pkmn)
end
return false
end
Agrega el siguiente en la linea 3123 del script de almacenamiento pokémon:
$PokemonTemp.dependentEvents.refresh_sprite(true)
También agregalo en la linea 1986 dentro del script del Equipo Pokémon
Agrega esto en un evento de proceso paralelo en cada 1/4 de mapa.
$PokemonTemp.dependentEvents.refresh_sprite
Para agregar a tu pokémon, usa el siguiente código:
Kernel.pbAddDependency2(EvID, "Dependent", ECom)
$PokemonTemp.dependentEvents.refresh_sprite
Si lo haces correctamente, debería funcionarte.