Skip to content
Home
Post Code
Jass (Warcraft III)
Wurst
GUI (Warcraft III)
Galaxy (StarCraft II)
GUI (StarCraft II)
C++
Java
Delphi
Text
Search Code
Compare Code
Uploads
Draw
Create New Drawing
View Drawings
Graph
Log in
[code]function pokemonreturn takes integer playerslot, integer pkcondition returns nothing //if condition is [color=FFFF77]0[/color] no one cares. [color=7777FF][b]If[/b][/color] its [color=FFFF77]1[/color], 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[b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b][b])[/b] call DisplayTextToForce[b]([/b] GetPlayersAll[b]([/b][b])[/b], [b]([/b][color=77FF77]"TempInt3 is "[/color] + I2S[b]([/b]udg_TempInt3[b])[/b][b])[/b] [b])[/b] if [b]([/b][b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b] == udg_PokemonTrainer[b][[/b]playerslot[b]][/b][b])[/b] and [b]([/b]pkcondition [b]![/b]=[color=FFFF77]1[/color][b])[/b][b])[/b] then//Should never get here, even by timer defeat. call DisplayTextToForce[b]([/b] GetPlayersAll[b]([/b][b])[/b], [color=77FF77]"Map error 8"[/color][b])[/b] endif if[b]([/b][b]([/b]udg_ReturnPreventerCondition[b][[/b]playerslot[b]][/b] == false[b])[/b] or [b]([/b]pkcondition ==[color=FFFF77]1[/color][b])[/b] [b])[/b] then//this bool is to prevent retarded/abuse esc spams. if[b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b] == udg_PokemonTeam[b][[/b]udg_Activepokemon[b][[/b]playerslot[b]][/b][b]][/b][b])[/b] then //Timerdefeat for VersusPlayerslot[b][[/b]playerslot[b]][/b], but playerslot player may also have not an pokemon outside. This is done so it doesnt bug. if [b]([/b]udg_HP[b][[/b]AIslot[b]([/b]playerslot[b])[/b][b]][/b] [b]![/b]= [color=FFFF77]0[/color][b])[/b] then //detects wild pkmn fight call UnitRemoveAbilityBJ[b]([/b] [color=999999][i]'A01R', udg_Playerhero[playerslot])//removes catch pokemon skill[/i][/color] endif set udg_TempRect = playeritemrects[b]([/b]playerslot[b])[/b] set udg_TempX = GetRectCenterX[b]([/b]udg_TempRect[b])[/b] set udg_TempY = GetRectCenterY[b]([/b]udg_TempRect[b])[/b] call SetUnitX[b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b],udg_TempX[b])[/b] call SetUnitY[b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b],udg_TempY[b])[/b]//puts the pokemon [color=77FF77]"back to its ball"[/color]up to here set udg_NoPokemon[b][[/b]playerslot[b]][/b]=true set udg_NoPokemonInt[b][[/b]playerslot[b]][/b] = [color=FFFF77]10[/color] call SetTextTagPosUnitBJ[b]([/b] udg_NoPokemonText[b][[/b]playerslot[b]][/b], udg_Playerhero[b][[/b]playerslot[b]][/b], [color=FFFF77]0[/color] [b])[/b]//moves dat floating text call SetTextTagTextBJ[b]([/b] udg_NoPokemonText[b][[/b]playerslot[b]][/b], I2S[b]([/b]udg_NoPokemonInt[b][[/b]playerslot[b]][/b][b])[/b], [color=FFFF77]10[/color] [b])[/b]//gives text: nopokemonint, converted from into to string call ShowTextTagForceBJ[b]([/b] true, udg_NoPokemonText[b][[/b]playerslot[b]][/b], GetPlayersAll[b]([/b][b])[/b] [b])[/b]//show floating text, cuz hidden // BELOW LIES THE THORN, DESTROYER OF IMAGINARY BEATIFUL WORLDS[b]![/b][b]([/b]It is safe to put /[b]*[/b] here and right after local multiboard. //[color=7777FF][b]If[/b][/color] I display tempint3 here, it returns [color=FF7777]24.[/color] [color=7777FF][b]Then[/b][/color] it goes to assign player [color=FF7777]24.[/color] ggwp call DisplayTextToForce[b]([/b] GetPlayersAll[b]([/b][b])[/b], [b]([/b][color=77FF77]"But after it becomes "[/color] + I2S[b]([/b]udg_TempInt3[b])[/b][b])[/b] [b])[/b] [/code]
select language
jass
java
delphi
C++
php
GSL
galaxy
> visualBasic
wurst
Text
Markdown
select style
default
> bbcode - default
Jasscraft
jasscraft html
visual
lightweight
lightweightNr
goto line:
Compare with:
text copy window
edit this code
post new code
function pokemonreturn takes integer playerslot, integer pkcondition returns nothing //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]) call DisplayTextToForce( 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. call DisplayTextToForce( GetPlayersAll(), "Map error 8") endif if((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 fight call UnitRemoveAbilityBJ( 'A01R', udg_Playerhero[playerslot])//removes catch pokemon skill endif set udg_TempRect = playeritemrects(playerslot) set udg_TempX = GetRectCenterX(udg_TempRect) set udg_TempY = GetRectCenterY(udg_TempRect) call SetUnitX(udg_Playerhero[playerslot],udg_TempX) call SetUnitY(udg_Playerhero[playerslot],udg_TempY)//puts the pokemon "back to its ball"up to here set udg_NoPokemon[playerslot]=true set udg_NoPokemonInt[playerslot] = 10 call SetTextTagPosUnitBJ( udg_NoPokemonText[playerslot], udg_Playerhero[playerslot], 0 )//moves dat floating text call SetTextTagTextBJ( udg_NoPokemonText[playerslot], I2S(udg_NoPokemonInt[playerslot]), 10 )//gives text: nopokemonint, converted from into to string call ShowTextTagForceBJ( 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 call DisplayTextToForce( GetPlayersAll(), ("But after it becomes " + I2S(udg_TempInt3)) )