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][color=7777FF][b]function[/b][/color] pokemonreturn takes [color=AA77FF]integer[/color] playerslot[b],[/b] [color=AA77FF]integer[/color] pkcondition returns nothing [color=999999][i]//if condition is 0 no one cares. If its 1, both players return pkmn.[/i][/color] [color=999999][i]//Timer defeat for wild pokemon cannot happen here because endbattle deals with that.[/i][/color] [color=999999][i]//Timer defeat for pokemontrainer fights however, is dealt with, here.[/i][/color] [color=7777FF][b]set[/b][/color] udg_TempInt3[b]=[/b]playernumberid(udg_Playerhero[b][[/b]playerslot[b]][/b]) call DisplayTextToForce( GetPlayersAll()[b],[/b] ([color=77FF77]"TempInt3 is "[/color] [b]+[/b] I2S(udg_TempInt3)) ) [color=7777FF][b]if[/b][/color] ((udg_Playerhero[b][[/b]playerslot[b]][/b] [b]=[/b][b]=[/b] udg_PokemonTrainer[b][[/b]playerslot[b]][/b]) [color=7777FF][b]and[/b][/color] (pkcondition [b]![/b][b]=[/b][color=FFFF77]1[/color])) [color=7777FF][b]then[/b][/color][color=999999][i]//Should never get here, even by timer defeat.[/i][/color] call DisplayTextToForce( GetPlayersAll()[b],[/b] [color=77FF77]"Map error 8"[/color]) endif [color=7777FF][b]if[/b][/color]((udg_ReturnPreventerCondition[b][[/b]playerslot[b]][/b] [b]=[/b][b]=[/b] [color=7777FF][b]false[/b][/color]) [color=7777FF][b]or[/b][/color] (pkcondition [b]=[/b][b]=[/b][color=FFFF77]1[/color]) ) [color=7777FF][b]then[/b][/color][color=999999][i]//this bool is to prevent retarded/abuse esc spams.[/i][/color] [color=7777FF][b]if[/b][/color](udg_Playerhero[b][[/b]playerslot[b]][/b] [b]=[/b][b]=[/b] udg_PokemonTeam[b][[/b]udg_Activepokemon[b][[/b]playerslot[b]][/b][b]][/b]) [color=7777FF][b]then[/b][/color] [color=999999][i]//Timerdefeat for VersusPlayerslot[playerslot], but playerslot player may also have not an pokemon outside. This is done so it doesnt bug.[/i][/color] [color=7777FF][b]if[/b][/color] (udg_HP[b][[/b]AIslot(playerslot)[b]][/b] [b]![/b][b]=[/b] [color=FFFF77]0[/color]) [color=7777FF][b]then[/b][/color] [color=999999][i]//detects wild pkmn fight[/i][/color] call UnitRemoveAbilityBJ( [color=77FF77]'A01R'[/color][b],[/b] udg_Playerhero[b][[/b]playerslot[b]][/b])[color=999999][i]//removes catch pokemon skill[/i][/color] endif [color=7777FF][b]set[/b][/color] udg_TempRect [b]=[/b] playeritemrects(playerslot) [color=7777FF][b]set[/b][/color] udg_TempX [b]=[/b] GetRectCenterX(udg_TempRect) [color=7777FF][b]set[/b][/color] udg_TempY [b]=[/b] GetRectCenterY(udg_TempRect) call SetUnitX(udg_Playerhero[b][[/b]playerslot[b]][/b][b],[/b]udg_TempX) call SetUnitY(udg_Playerhero[b][[/b]playerslot[b]][/b][b],[/b]udg_TempY)[color=999999][i]//puts the pokemon "back to its ball"up to here[/i][/color] [color=7777FF][b]set[/b][/color] udg_NoPokemon[b][[/b]playerslot[b]][/b][b]=[/b][color=7777FF][b]true[/b][/color] [color=7777FF][b]set[/b][/color] udg_NoPokemonInt[b][[/b]playerslot[b]][/b] [b]=[/b] [color=FFFF77]10[/color] call SetTextTagPosUnitBJ( udg_NoPokemonText[b][[/b]playerslot[b]][/b][b],[/b] udg_Playerhero[b][[/b]playerslot[b]][/b][b],[/b] [color=FFFF77]0[/color] )[color=999999][i]//moves dat floating text[/i][/color] call SetTextTagTextBJ( udg_NoPokemonText[b][[/b]playerslot[b]][/b][b],[/b] I2S(udg_NoPokemonInt[b][[/b]playerslot[b]][/b])[b],[/b] [color=FFFF77]10[/color] )[color=999999][i]//gives text: nopokemonint, converted from into to string[/i][/color] call ShowTextTagForceBJ( [color=7777FF][b]true[/b][/color][b],[/b] udg_NoPokemonText[b][[/b]playerslot[b]][/b][b],[/b] GetPlayersAll() )[color=999999][i]//show floating text, cuz hidden[/i][/color] [color=999999][i]// BELOW LIES THE THORN, DESTROYER OF IMAGINARY BEATIFUL WORLDS!(It is safe to put /* here and right after local multiboard.[/i][/color] [color=999999][i]//If I display tempint3 here, it returns 24. Then it goes to assign player 24. ggwp[/i][/color] call DisplayTextToForce( GetPlayersAll()[b],[/b] ([color=77FF77]"But after it becomes "[/color] [b]+[/b] I2S(udg_TempInt3)) ) [/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)) )