• 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.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Trade Back Guy

v21.1 Trade Back Guy 1.0

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
This is possibly compatible with more than just 21.1

First time using Giphy so if the video breaks im sorry!


anyways inside the script called "005_UI_Trading" at the bottom just add
Ruby:
Expand Collapse Copy
def pbTradeBackGuy(npc_name = _INTL("Tradeback NPC"))
  # Filter: non-egg can also add && !pkmn.shadow?
  able_proc = proc { |pkmn| pkmn && !pkmn.egg? }
  # Open the party picker with the filter.
  scene  = PokemonParty_Scene.new
  screen = PokemonPartyScreen.new(scene, $player.party)
  idx = screen.pbChooseAblePokemon(able_proc, false)   # <- correct API
  return false if idx.nil? || idx < 0
  mon = $player.party[idx]
  return false if !mon || mon.egg?
  # Save original owner so we can give it back after the “tradeback”
  original_owner = mon.owner.clone
  pbStartTrade(idx, mon, mon.name, npc_name, 0)
  # Restore original owner (since it’s a trade-back)
  $player.party[idx].owner = original_owner
  return true
end

Now in an npc add a new script and put inside it "pbTradeBackGuy()"
Or Optionally add a name for the trade-back guy like this "pbTradeBackGuy("His Name")" and boom guy will trade back whatever you trade to him (having him require an item or some money will keep him from abuse)
Credits
InTheLight
Author
InTheLight
Views
579
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from InTheLight

Back
Top