• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Resource Advanced HM Items 1.0.0

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
31
Hi! I'd just like to say that, although I am not OP, I have used this script and managed to do a "Teleport" item.
For anyone who wants to use it just go to "Config.rb" file and add a new entry for a TELEPOR_CONFIG
Code:
Expand Collapse Copy
}
TELEPORT_CONFIG = {
    :internal_name      => :TELEPORTITEM,
    :active             => true,
    :needed_badge       => 0,
    :needed_switches    => [],
    :use_in_debug       => false
}

Then go to "ItemHandler.rb" and add a new entry for an "Item_Teleport" and then add the code for the item after
Code:
Expand Collapse Copy
Item_RockSmash = AdvancedHMItems::ROCKSMASH_CONFIG
Item_Cut = AdvancedHMItems::CUT_CONFIG
Item_Strength = AdvancedHMItems::STRENGTH_CONFIG
Item_Surf = AdvancedHMItems::SURF_CONFIG
Item_Fly = AdvancedHMItems::FLY_CONFIG
Item_Headbutt = AdvancedHMItems::HEADBUTT_CONFIG
Item_Flash = AdvancedHMItems::FLASH_CONFIG
#This is where you add the Teleport Item
Item_Teleport = AdvancedHMItems::TELEPORT_CONFIG
Code:
Expand Collapse Copy
#===========================================
# Teleport                      
#===========================================

if Item_Teleport[:active]

  HiddenMoveHandlers::CanUseMove.delete(:TELEPORT)
  HiddenMoveHandlers::UseMove.delete(:TELEPORT)
 
  def canUseMoveTeleport?
       if !GameData::MapMetadata.exists?($game_map.map_id) ||
          !GameData::MapMetadata.get($game_map.map_id).outdoor_map
         pbMessage(_INTL("Can't use that here."))
         return false
       end
       healing = $PokemonGlobal.healingSpot
       healing = GameData::Metadata.get.home if !healing   # Home
       if !healing
         pbMessage(_INTL("Can't use that here."))
         return false
       end
       if $game_player.pbHasDependentEvents?
         pbMessage(_INTL("{1} can't be used when you have someone with you.", GameData::Item.get(Item_Teleport[:internal_name]).name))
         return false
       end
       return true
     end

def confirmUseMoveTeleport
   healing = $PokemonGlobal.healingSpot
   healing = GameData::Metadata.get.home if !healing   # Home
   return false if !healing
   mapname = pbGetMapNameFromId(healing[0])
   return pbConfirmMessage(_INTL("Want to warp to the last used healing spot in {1}?",mapname))
end

def useMoveTeleport
   healing = $PokemonGlobal.healingSpot
   healing = GameData::Metadata.get.home if !healing   # Home
   return false if !healing
   if !pbHiddenMoveAnimation(nil)
     pbMessage(_INTL("{1} used {2}!, $Trainer.name, GameData::Item.get(Item_Teleport[:internal_name]).name))    
   end
   pbFadeOutIn {
     $game_temp.player_new_map_id    = healing[0]
     $game_temp.player_new_x         = healing[1]
     $game_temp.player_new_y         = healing[2]
     $game_temp.player_new_direction = 2
     pbCancelVehicles
     $scene.transfer_player
     $game_map.autoplay
     $game_map.refresh
   }
   pbEraseEscapePoint
   return true
end
 
  ItemHandlers::UseFromBag.add(Item_Teleport[:internal_name], proc do |item|
   next canUseMoveTeleport? ? 2 : 0
end)

ItemHandlers::UseInField.add(Item_Teleport[:internal_name], proc do |item|
   useMoveTeleport if confirmUseMoveTeleport
end)

end

If you haven't altered the plugin yourself I will leave a link to a version of the Plugin with the Teleport code:
I get the message that it can't be used here no matter where I am on the map
 

Mashirosakura

With my wishes frozen in time and long forgotten
Discord Mod
Is a V20 updated planned or do I have do so myself (or someone else likewise)?
Probably yourself. Moyo's profile shows they haven't been online since September.
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
31
Is your map metadata set to outdoors?
Yes. It's the strangest thing. I can use all the other hm items but fly. I know for a fact it's not the gym badge requirement either, as the only requirement in my game is that you have the item.
 

Bergium

Bergium#0216
Member
Joined
Jun 11, 2019
Posts
74
Yes. It's the strangest thing. I can use all the other hm items but fly. I know for a fact it's not the gym badge requirement either, as the only requirement in my game is that you have the item.
What version are you running it on?
 

Bergium

Bergium#0216
Member
Joined
Jun 11, 2019
Posts
74
How is the fly item not working?
Is it when you used the item from the bag
Or when you use it from fields?
 

lilBigBagel

Rookie
Member
Joined
Feb 26, 2021
Posts
7
Any plans to have this on v17.2? The version available is unfinished and has several HMs not available, flash is the only one I could think of off the top of my head (there are several others however)
 

AenaonDogsky

Arbiter of Doggos
Member
Joined
Dec 12, 2017
Posts
511
Any plans to have this on v17.2? The version available is unfinished and has several HMs not available, flash is the only one I could think of off the top of my head (there are several others however)
Here, take a look at this Thread from Derfischae for 17.2
It's pretty plug & play, read through it carefully.
 

The6thGym

Rookie
Member
Joined
Aug 11, 2024
Posts
4
How do I use fly as an item? Whenever I try to use it, I'm told it 'can't be used here' The same is also true for using flash as an item
You might not have the map metadata set correctly for the game to recognize the items as usable in the area.
 
Back
Top