View Single Post
  #18    
Old January 15th, 2011, 05:50 PM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
If in your version don't have the Gen4 attack, download the moves.txt in my above post. This function can make some moves to work.

In "PokeBattle_Move", in the end change

Code:
def PokeBattle_Move.pbFromPBMove(battle,move)
 move=PBMove.new(0) if !move
 movedata=PBMoveData.new(move.id)
 return eval(sprintf("PokeBattle_Move_%02X.new(battle,move)",
   movedata.function)) rescue PokeBattle_FailedMove.new(battle,move)
end
To:

Code:
def PokeBattle_Move.pbFromPBMove(battle,move)
 move=PBMove.new(0) if !move
 movedata=PBMoveData.new(move.id)
 className=sprintf("PokeBattle_Move_%02X",movedata.function)
 if Object.const_defined?(className)
  return Kernel.const_get(className).new(battle,move)
 else
  return PokeBattle_UnimplementedMove.new(battle,move)
 end
end
And around line 34 in "PokeBattle_MoveEffects" put

Code:
# Superclass for an unimplemented move. If it's a damaging move
# it has no additional effect. If it's a nondamaging move, it always fails.
class PokeBattle_UnimplementedMove < PokeBattle_Move
def pbEffect(attacker,opponent)
 if @basedamage>0
  return super(attacker,opponent)
 else
  @battle.pbDisplay("But it failed!")
  return -1
 end
end
end
Both codes are made by poccil.
The Double battle targets need to be redone

The pokemon.txt that I made in January (the one with pack) needs the Gen4 itens, see my topic http://www.pokecommunity.com/showthread.php?t=241133 for more info.

Quote:
Originally Posted by PietroMaker96 View Post
could you post a project with the kit already entered?

sorry for my inglish
Choose a version
__________________
Reply With Quote