- 13
- Posts
- 7
- Years
- Seen Dec 25, 2019
I need some help with the item Adrenaline Orb and the gold/silver bottle caps, I'm new here so I want some help here please
# Intimidate
if self.hasWorkingAbility(:INTIMIDATE) && onactive
PBDebug.log("[Ability triggered] #{pbThis}'s Intimidate")
@battle.pbDisplayEffect(self)
for i in 0...4
if pbIsOpposing?(i) && [email protected][i].fainted?
@battle.battlers[i].pbReduceAttackStatIntimidate(self)
end
[COLOR="red"]if @battle.battlers[i].hasWorkingItem(:ADRENALINEORB) && [email protected][i].fainted?
if [email protected][i].pbTooHigh?(PBStats::SPEED)
if @battle.battlers[i].pbIncreaseStatWithCause(PBStats::SPEED,1,@battle.battlers[i],PBItems.getName(@battle.battlers[i].item))
@battle.battlers[i].pbConsumeItem
end
end
end[/COLOR]
end
end
return false if fainted?
if effects[PBEffects::Substitute]>0
@battle.pbDisplay(_INTL("{1}'s substitute protected it from {2}'s {3}!",
pbThis,opponent.pbThis(true),PBAbilities.getName(opponent.ability)))
return false
end
if !opponent.hasWorkingAbility(:CONTRARY)
if pbOwnSide.effects[PBEffects::Mist]>0
@battle.pbDisplay(_INTL("{1} is protected from {2}'s {3} by Mist!",
pbThis,opponent.pbThis(true),PBAbilities.getName(opponent.ability)))
[COLOR="Red"]if hasWorkingItem(:ADRENALINEORB)
if !self.pbTooHigh?(PBStats::SPEED)
if pbIncreaseStatWithCause(PBStats::SPEED,1,self,PBItems.getName(self.item))
self.pbConsumeItem
end
end[/COLOR]
end
return false
end
if hasWorkingAbility(:CLEARBODY) || hasWorkingAbility(:WHITESMOKE) ||
hasWorkingAbility(:FULLMETALBODY) || hasWorkingAbility(:HYPERCUTTER) ||
(hasWorkingAbility(:FLOWERVEIL) && pbHasType?(:GRASS))
abilityname=PBAbilities.getName(self.ability)
oppabilityname=PBAbilities.getName(opponent.ability)
@battle.pbDisplay(_INTL("{1}'s {2} prevented {3}'s {4} from working!",
pbThis,abilityname,opponent.pbThis(true),oppabilityname))
[COLOR="Red"]if hasWorkingItem(:ADRENALINEORB)
if !self.pbTooHigh?(PBStats::SPEED)
if pbIncreaseStatWithCause(PBStats::SPEED,1,self,PBItems.getName(self.item))
self.pbConsumeItem
end
end
end[/COLOR]
return false
end
end
return pbReduceStatWithCause(PBStats::ATTACK,1,opponent,PBAbilities.getName(opponent.ability))
end
And about "gold/silver bottle caps", what you script them? What functions they have? I did read in bulbapedia and they is just for Hyper Training.
The golden and silver bottle caps are for maximize the ivs (in silver bottle cap's case it can boost one iv at the maximum but this only can happen if you pokemon is level 100 and the golden bottle cap is the same but with all the stats)
You can do it. To Silver Bottle Caps check how MOODY ability, Debug_Pokemon and Day Care script works and make a script for item in ItemEffect. If you finish to Silver you will find a way for Golden.
I think is better just create a NPC:
https://www.youtube.com/watch?v=Qd-37wOMLX4
[COLOR="Red"]# Same as pbChoosePokemon, but choose only Pokémons lvl 100 and prevents choosing other pokemons.
def pbChooseBottle(variableNumber,nameVarNumber)
pbChoosePokemon(variableNumber,nameVarNumber,proc {|poke|
!poke.egg? && poke.level>99
})
end[/COLOR]
# Same as pbChoosePokemon, but prevents choosing an egg or a Shadow Pokémon.
def pbChooseTradablePokemon(variableNumber,nameVarNumber,ableProc=nil,allowIneligible=false)
chosen = 0
pbFadeOutIn(99999){
scene = PokemonParty_Scene.new
screen = PokemonPartyScreen.new(scene,$Trainer.party)
if ableProc
chosen=screen.pbChooseTradablePokemon(ableProc,allowIneligible)
else
screen.pbStartScene(_INTL("Choose a Pokémon."),false)
chosen = screen.pbChoosePokemon
screen.pbEndScene
end
}
pbSet(variableNumber,chosen)
if chosen>=0
pbSet(nameVarNumber,$Trainer.party[chosen].name)
else
pbSet(nameVarNumber,"")
end
end