Advertisement
TechSkylander1518

Nickname from Party v19

Oct 5th, 2021
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.99 KB | None | 0 0
  1. #In UI_Party, find this section:
  2.       commands   = []
  3.       cmdSummary = -1
  4.       cmdDebug   = -1
  5.       cmdMoves   = [-1,-1,-1,-1]
  6.       cmdSwitch  = -1
  7.       cmdMail    = -1
  8.       cmdItem    = -1
  9.  
  10. #Add this line:
  11.       cmdRename  = -1
  12.  
  13. #Next, find this section.
  14.       commands[cmdSwitch = commands.length]       = _INTL("Switch") if @party.length>1
  15.       if !pkmn.egg?
  16.         if pkmn.mail
  17.           commands[cmdMail = commands.length]     = _INTL("Mail")
  18.         else
  19.           commands[cmdItem = commands.length]     = _INTL("Item")
  20.         end
  21.       end
  22.  
  23. #After that /first/ end, paste this:
  24.           commands[cmdRename = commands.length]     = _INTL("Rename")
  25.  
  26. #Now, locate this section further down:
  27.               if pbConfirm(_INTL("Would you like to switch the two items?"))
  28.                 newpkmn.setItem(item)
  29.                 pkmn.setItem(newitem)
  30.                 @scene.pbClearSwitching
  31.                 pbRefresh
  32.                 pbDisplay(_INTL("{1} was given the {2} to hold.",newpkmn.name,itemname))
  33.                 pbDisplay(_INTL("{1} was given the {2} to hold.",pkmn.name,newitemname))
  34.                 break
  35.               end
  36.             end
  37.           end
  38.         end
  39.  
  40. #After the /fourth/ end, add this:
  41.       elsif cmdRename>=0 && command==cmdRename
  42.         $game_variables[5]=pbMessageFreeText("#{pkmn.speciesName}'s nickname?",_INTL(""),false,Pokemon::MAX_NAME_SIZE)
  43.             if pbGet(5)==""
  44.               pkmn.name=pkmn.speciesName
  45.               pbSet(5,pkmn.name)
  46.             end
  47.         pkmn.name=pbGet(5)
  48.         pbDisplay(_INTL("{1} was renamed to {2}.",pkmn.speciesName,pkmn.name))
  49.  
  50. #If you'd like to use the cursor naming instead of the keyboard, change this line:
  51.         $game_variables[5]=pbMessageFreeText("#{pkmn.speciesName}'s nickname?",_INTL(""),false,Pokemon::MAX_NAME_SIZE)
  52.  
  53. #to
  54.         $game_variables[5]=pbEnterPokemonName(_INTL("{1}'s nickname?", pkmn.speciesName),
  55.                                  0, Pokemon::MAX_NAME_SIZE, "", pkmn)
  56.  
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement