Encontre este Script bastante útil que se supone genera una probabilidad del 50% de que un pokemon al ser derrotado de un item
Esto va en PokeBattle_Battle (lo rojo es lo que se agrega)
y esto va en
mi problema es que cuando gano la batalla no da el item :/ solo sale
"{1} picked up {2} from the pokemon!" siendo 1 el nombre del entrenador y 2 el del pokemon vencido. pero no da item ,no se si debo configurar el drope de los pokemones desde otro lado o hay algo en el script que tiene error :/
Cierren el post ya lo solucione xd, habia que cambiar @battlers.item!=0 por @battlers.item!=1 ademas de eliminar && !@opponent.
Asi logre que funcionara bien
y en el archivo pokemon.txt agregar
WildItemCommon=XXX
Donde XXX es el item que quieren que drop el pokemon
Esto va en PokeBattle_Battle (lo rojo es lo que se agrega)
@scene.pbEndBattle(@decision)
for i in @battlers
i.pbResetForm
end
for i in $Trainer.party
i.item=i.itemInitial
i.itemInitial=i.itemRecycle=0
end
return @decision
end
Wild pokemon drops item if defeated
def pbDropItem (i)
if rand(100)>50 && @battlers.item!=0 && !@opponent
$PokemonBag.pbStoreItem(@battlers.item)
pbDisplay(_INTL("{1} picked up {2} from the pokemon!", $Trainer.name, PBItems.getName(@battlers.item)))
end
end
end
y esto va en
# Finding all moves learned at this level
movelist=thispoke.getMoveList
for k in movelist
if k[0]==thispoke.level # Learned a new move
pbLearnMove(j,k[1])
end
end
end
end
end
end
end
end
pbDropItem (i)
# Now clear the participants array
@battlers.participants=[]
end
end
end
mi problema es que cuando gano la batalla no da el item :/ solo sale
"{1} picked up {2} from the pokemon!" siendo 1 el nombre del entrenador y 2 el del pokemon vencido. pero no da item ,no se si debo configurar el drope de los pokemones desde otro lado o hay algo en el script que tiene error :/
Cierren el post ya lo solucione xd, habia que cambiar @battlers.item!=0 por @battlers.item!=1 ademas de eliminar && !@opponent.
Asi logre que funcionara bien
y en el archivo pokemon.txt agregar
WildItemCommon=XXX
Donde XXX es el item que quieren que drop el pokemon