Advertisement
Redylriws

Untitled

Dec 29th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. Code 1:
  2. def pbTrainerName(name=nil,outfit=0)
  3. if $PokemonGlobal.playerID<0
  4. pbChangePlayer(0)
  5. end
  6. trainertype=pbGetPlayerTrainerType
  7. trname=name
  8. $Trainer=PokeBattle_Trainer.new(trname,trainertype)
  9. $Trainer.outfit=outfit
  10. if trname==nil
  11. trname=pbEnterText(_INTL("Your name?"),0,7)
  12. gender=pbGetTrainerTypeGender(trainertype)
  13. if trname==""
  14. trname=pbSuggestTrainerName(gender)
  15. end
  16. end
  17. $Trainer=PokeBattle_Trainer.new(trname,trainertype)
  18. $PokemonBag=PokemonBag.new
  19. $PokemonTemp.begunNewGame=true
  20. end
  21.  
  22. Code 2:
  23. def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,nofadeout=false)
  24. ret=""
  25. if USEKEYBOARDTEXTENTRY
  26. pbFadeOutIn(99999,nofadeout){
  27. sscene=PokemonEntryScene.new
  28. sscreen=PokemonEntry.new(sscene)
  29. ret=sscreen.pbStartScreen(helptext,minlength,maxlength,initialText,mode,pokemon)
  30. }
  31. else
  32. pbFadeOutIn(99999,nofadeout){
  33. sscene=PokemonEntryScene2.new
  34. sscreen=PokemonEntry.new(sscene)
  35. ret=sscreen.pbStartScreen(helptext,minlength,maxlength,initialText,mode,pokemon)
  36. }
  37. end
  38. return ret
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement