function pokemonreturn takesinteger playerslot,integer pkcondition returnsnothing//if condition is 0 no one cares. If its 1, both players return pkmn.//Timer defeat for wild pokemon cannot happen here because endbattle deals with that.//Timer defeat for pokemontrainer fights however, is dealt with, here.set udg_TempInt3 = playernumberid( udg_Playerhero[ playerslot ])callDisplayTextToForce(GetPlayersAll(),("TempInt3 is "+I2S( udg_TempInt3 )))if(( udg_Playerhero[ playerslot ]== udg_PokemonTrainer[ playerslot ])and( pkcondition !=1))then// Should never get here, even by timer defeat.callDisplayTextToForce(GetPlayersAll(),"Map error 8")endifif(( udg_ReturnPreventerCondition[ playerslot ]==false)or( pkcondition ==1))then// this bool is to prevent retarded/abuse esc spams.if( udg_Playerhero[ playerslot ]== udg_PokemonTeam[ udg_Activepokemon[ playerslot ]])then//Timerdefeat for VersusPlayerslot[playerslot], but playerslot player may also have not an pokemon outside. This is done so it doesnt bug.if( udg_HP[ AIslot( playerslot )]!=0)then// detects wild pkmn fightcallUnitRemoveAbilityBJ('A01R', udg_Playerhero[ playerslot ])// removes catch pokemon skillendifset udg_TempRect = playeritemrects( playerslot )set udg_TempX =GetRectCenterX( udg_TempRect )set udg_TempY =GetRectCenterY( udg_TempRect )callSetUnitX( udg_Playerhero[ playerslot ], udg_TempX )callSetUnitY( udg_Playerhero[ playerslot ], udg_TempY )// puts the pokemon "back to its ball"up to hereset udg_NoPokemon[ playerslot ]=trueset udg_NoPokemonInt[ playerslot ]=10callSetTextTagPosUnitBJ( udg_NoPokemonText[ playerslot ], udg_Playerhero[ playerslot ],0)// moves dat floating textcallSetTextTagTextBJ( udg_NoPokemonText[ playerslot ],I2S( udg_NoPokemonInt[ playerslot ]),10)// gives text: nopokemonint, converted from into to stringcallShowTextTagForceBJ(true, udg_NoPokemonText[ playerslot ],GetPlayersAll())// show floating text, cuz hidden// BELOW LIES THE THORN, DESTROYER OF IMAGINARY BEATIFUL WORLDS!(It is safe to put /* here and right after local multiboard.//If I display tempint3 here, it returns 24. Then it goes to assign player 24. ggwp