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 [color=7777FF][b]takes[/b][/color] [color=AA77FF]integer[/color] playerslot[b],[/b] [color=AA77FF]integer[/color] pkcondition [color=7777FF][b]returns[/b][/color] [color=AA77FF]nothing[/color] [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[b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b][b])[/b] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/DisplayTextToForce]DisplayTextToForce[/url][b]([/b] [url=http://starcraft-mapping.de/wiki/GetPlayersAll]GetPlayersAll[/url][b]([/b][b])[/b][b],[/b] [b]([/b][color=77FF77]"TempInt3 is "[/color] [b]+[/b] [url=http://starcraft-mapping.de/wiki/I2S]I2S[/url][b]([/b]udg_TempInt3[b])[/b][b])[/b] [b])[/b] [color=7777FF][b]if[/b][/color] [b]([/b][b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b] [b]=[/b][b]=[/b] udg_PokemonTrainer[b][[/b]playerslot[b]][/b][b])[/b] [color=7777FF][b]and[/b][/color] [b]([/b]pkcondition [b]![/b][b]=[/b][color=FFFF77]1[/color][b])[/b][b])[/b] [color=7777FF][b]then[/b][/color][color=999999][i]//Should never get here, even by timer defeat.[/i][/color] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/DisplayTextToForce]DisplayTextToForce[/url][b]([/b] [url=http://starcraft-mapping.de/wiki/GetPlayersAll]GetPlayersAll[/url][b]([/b][b])[/b][b],[/b] [color=77FF77]"Map error 8"[/color][b])[/b] [color=7777FF][b]endif[/b][/color] [color=7777FF][b]if[/b][/color][b]([/b][b]([/b]udg_ReturnPreventerCondition[b][[/b]playerslot[b]][/b] [b]=[/b][b]=[/b] false[b])[/b] [color=7777FF][b]or[/b][/color] [b]([/b]pkcondition [b]=[/b][b]=[/b][color=FFFF77]1[/color][b])[/b] [b])[/b] [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][b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b] [b]=[/b][b]=[/b] udg_PokemonTeam[b][[/b]udg_Activepokemon[b][[/b]playerslot[b]][/b][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] [b]([/b]udg_HP[b][[/b]AIslot[b]([/b]playerslot[b])[/b][b]][/b] [b]![/b][b]=[/b] [color=FFFF77]0[/color][b])[/b] [color=7777FF][b]then[/b][/color] [color=999999][i]//detects wild pkmn fight[/i][/color] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/UnitRemoveAbilityBJ]UnitRemoveAbilityBJ[/url][b]([/b] [color=FFFF77]'A01R'[/color][b],[/b] udg_Playerhero[b][[/b]playerslot[b]][/b][b])[/b][color=999999][i]//removes catch pokemon skill[/i][/color] [color=7777FF][b]endif[/b][/color] [color=7777FF][b]set[/b][/color] udg_TempRect [b]=[/b] playeritemrects[b]([/b]playerslot[b])[/b] [color=7777FF][b]set[/b][/color] udg_TempX [b]=[/b] [url=http://starcraft-mapping.de/wiki/GetRectCenterX]GetRectCenterX[/url][b]([/b]udg_TempRect[b])[/b] [color=7777FF][b]set[/b][/color] udg_TempY [b]=[/b] [url=http://starcraft-mapping.de/wiki/GetRectCenterY]GetRectCenterY[/url][b]([/b]udg_TempRect[b])[/b] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/SetUnitX]SetUnitX[/url][b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b][b],[/b]udg_TempX[b])[/b] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/SetUnitY]SetUnitY[/url][b]([/b]udg_Playerhero[b][[/b]playerslot[b]][/b][b],[/b]udg_TempY[b])[/b][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]true [color=7777FF][b]set[/b][/color] udg_NoPokemonInt[b][[/b]playerslot[b]][/b] [b]=[/b] [color=FFFF77]10[/color] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/SetTextTagPosUnitBJ]SetTextTagPosUnitBJ[/url][b]([/b] udg_NoPokemonText[b][[/b]playerslot[b]][/b][b],[/b] udg_Playerhero[b][[/b]playerslot[b]][/b][b],[/b] [color=FFFF77]0[/color] [b])[/b][color=999999][i]//moves dat floating text[/i][/color] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/SetTextTagTextBJ]SetTextTagTextBJ[/url][b]([/b] udg_NoPokemonText[b][[/b]playerslot[b]][/b][b],[/b] [url=http://starcraft-mapping.de/wiki/I2S]I2S[/url][b]([/b]udg_NoPokemonInt[b][[/b]playerslot[b]][/b][b])[/b][b],[/b] [color=FFFF77]10[/color] [b])[/b][color=999999][i]//gives text: nopokemonint, converted from into to string[/i][/color] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/ShowTextTagForceBJ]ShowTextTagForceBJ[/url][b]([/b] true[b],[/b] udg_NoPokemonText[b][[/b]playerslot[b]][/b][b],[/b] [url=http://starcraft-mapping.de/wiki/GetPlayersAll]GetPlayersAll[/url][b]([/b][b])[/b] [b])[/b][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] [color=7777FF][b]call[/b][/color] [url=http://starcraft-mapping.de/wiki/DisplayTextToForce]DisplayTextToForce[/url][b]([/b] [url=http://starcraft-mapping.de/wiki/GetPlayersAll]GetPlayersAll[/url][b]([/b][b])[/b][b],[/b] [b]([/b][color=77FF77]"But after it becomes "[/color] [b]+[/b] [url=http://starcraft-mapping.de/wiki/I2S]I2S[/url][b]([/b]udg_TempInt3[b])[/b][b])[/b] [b])[/b] [/code]
Diesen Code in Standard-Formatierung anzeigen
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)) )