getCurrentPCBoxId()
Signature
result = getCurrentPCBoxId()
Get the active PC Box.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Returns
integer example: 1
POST /lua/pc-storage/getcurrentpcboxid
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getCurrentPCBoxId()
log("getCurrentPCBoxId: " .. tostring(result))
end
log("getCurrentPCBoxId: " .. tostring(result))
end
isPCOpen()
Signature
result = isPCOpen()
Check if the PC is open. Moving close the PC, usePC() opens it.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Returns
boolean example: true
POST /lua/pc-storage/ispcopen
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = isPCOpen()
log("isPCOpen: " .. tostring(result))
end
log("isPCOpen: " .. tostring(result))
end
getCurrentPCBoxSize()
Signature
result = getCurrentPCBoxSize()
Returns the number of Pokémon currently cached in the visible PC box. PC boxes can hold up to 30 slots; use this as the safe upper bound for one-based boxPokemonId indexes after the box is refreshed.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Returns
integer example: 1
POST /lua/pc-storage/getcurrentpcboxsize
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getCurrentPCBoxSize()
log("getCurrentPCBoxSize: " .. tostring(result))
end
log("getCurrentPCBoxSize: " .. tostring(result))
end
getPCBoxCount()
Signature
result = getPCBoxCount()
Return the number of non-empty boxes in the PC
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Returns
integer example: 1
POST /lua/pc-storage/getpcboxcount
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPCBoxCount()
log("getPCBoxCount: " .. tostring(result))
end
log("getPCBoxCount: " .. tostring(result))
end
getPCPokemonCount()
Signature
result = getPCPokemonCount()
Returns the latest known total Pokémon count for the current PC storage view. The value is read from server PC metadata when available and should not be inferred from internal slot IDs.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Returns
integer example: 1
POST /lua/pc-storage/getpcpokemoncount
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPCPokemonCount()
log("getPCPokemonCount: " .. tostring(result))
end
log("getPCPokemonCount: " .. tostring(result))
end
getPokemonIdFromPC()
Signature
result = getPokemonIdFromPC(boxId, boxPokemonId)
Pokedex ID of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonidfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonIdFromPC(1, 1)
log("getPokemonIdFromPC: " .. tostring(result))
end
log("getPokemonIdFromPC: " .. tostring(result))
end
getPokemonNameFromPC()
Signature
result = getPokemonNameFromPC(boxId, boxPokemonId)
Name of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonnamefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonNameFromPC(1, 1)
log("getPokemonNameFromPC: " .. tostring(result))
end
log("getPokemonNameFromPC: " .. tostring(result))
end
getPokemonHealthFromPC()
Signature
result = getPokemonHealthFromPC(boxId, boxPokemonId)
Current HP of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonhealthfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonHealthFromPC(1, 1)
log("getPokemonHealthFromPC: " .. tostring(result))
end
log("getPokemonHealthFromPC: " .. tostring(result))
end
getPokemonHealthPercentFromPC()
Signature
result = getPokemonHealthPercentFromPC(boxId, boxPokemonId)
Returns the percentage of remaining health of the specified pokémon in the team.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonhealthpercentfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonHealthPercentFromPC(1, 1)
log("getPokemonHealthPercentFromPC: " .. tostring(result))
end
log("getPokemonHealthPercentFromPC: " .. tostring(result))
end
getPokemonMaxHealthFromPC()
Signature
result = getPokemonMaxHealthFromPC(boxId, boxPokemonId)
Max HP of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonmaxhealthfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonMaxHealthFromPC(1, 1)
log("getPokemonMaxHealthFromPC: " .. tostring(result))
end
log("getPokemonMaxHealthFromPC: " .. tostring(result))
end
getPokemonLevelFromPC()
Signature
result = getPokemonLevelFromPC(boxId, boxPokemonId)
Level of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonlevelfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonLevelFromPC(1, 1)
log("getPokemonLevelFromPC: " .. tostring(result))
end
log("getPokemonLevelFromPC: " .. tostring(result))
end
getPokemonTotalExperienceFromPC()
Signature
result = getPokemonTotalExperienceFromPC(boxId, boxPokemonId)
Total of experience cost of a level for the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemontotalexperiencefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonTotalExperienceFromPC(1, 1)
log("getPokemonTotalExperienceFromPC: " .. tostring(result))
end
log("getPokemonTotalExperienceFromPC: " .. tostring(result))
end
getPokemonRemainingExperienceFromPC()
Signature
result = getPokemonRemainingExperienceFromPC(boxId, boxPokemonId)
Remaining experience before the next level of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonremainingexperiencefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonRemainingExperienceFromPC(1, 1)
log("getPokemonRemainingExperienceFromPC: " .. tostring(result))
end
log("getPokemonRemainingExperienceFromPC: " .. tostring(result))
end
getPokemonStatusFromPC()
Signature
result = getPokemonStatusFromPC(boxId, boxPokemonId)
Status of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonstatusfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonStatusFromPC(1, 1)
log("getPokemonStatusFromPC: " .. tostring(result))
end
log("getPokemonStatusFromPC: " .. tostring(result))
end
getPokemonTypeFromPC()
Signature
result = getPokemonTypeFromPC(boxId, boxPokemonId)
Type of the pokemon of the current box matching the ID as an array of length 2.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
array<string> example: []
POST /lua/pc-storage/getpokemontypefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonTypeFromPC(1, 1)
log("getPokemonTypeFromPC: " .. tostring(result))
end
log("getPokemonTypeFromPC: " .. tostring(result))
end
getPokemonHeldItemFromPC()
Signature
result = getPokemonHeldItemFromPC(boxId, boxPokemonId)
Returns the item held by the specified pokemon in the PC, null if empty.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonhelditemfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonHeldItemFromPC(1, 1)
log("getPokemonHeldItemFromPC: " .. tostring(result))
end
log("getPokemonHeldItemFromPC: " .. tostring(result))
end
getPokemonUniqueIdFromPC()
Signature
result = getPokemonUniqueIdFromPC(boxId, boxPokemonId)
PROCatchem custom unique ID of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonuniqueidfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonUniqueIdFromPC(1, 1)
log("getPokemonUniqueIdFromPC: " .. tostring(result))
end
log("getPokemonUniqueIdFromPC: " .. tostring(result))
end
getPokemonRemainingPowerPointsFromPC()
Signature
result = getPokemonRemainingPowerPointsFromPC(boxId, boxPokemonId, moveId)
Current move PP of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
moveId | integer | yes | Value passed to the `moveId` parameter. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonremainingpowerpointsfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonRemainingPowerPointsFromPC(1, 1, "Tackle")
log("getPokemonRemainingPowerPointsFromPC: " .. tostring(result))
end
log("getPokemonRemainingPowerPointsFromPC: " .. tostring(result))
end
getPokemonMaxPowerPointsFromPC()
Signature
result = getPokemonMaxPowerPointsFromPC(boxId, boxPokemonId, moveId)
Max move PP of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
moveId | integer | yes | Value passed to the `moveId` parameter. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonmaxpowerpointsfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonMaxPowerPointsFromPC(1, 1, "Tackle")
log("getPokemonMaxPowerPointsFromPC: " .. tostring(result))
end
log("getPokemonMaxPowerPointsFromPC: " .. tostring(result))
end
isPokemonFromPCShiny()
Signature
result = isPokemonFromPCShiny(boxId, boxPokemonId)
Shyniness of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
boolean example: true
POST /lua/pc-storage/ispokemonfrompcshiny
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = isPokemonFromPCShiny(1, 1)
log("isPokemonFromPCShiny: " .. tostring(result))
end
log("isPokemonFromPCShiny: " .. tostring(result))
end
getPokemonMoveNameFromPC()
Signature
result = getPokemonMoveNameFromPC(boxId, boxPokemonId, moveId)
Move of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
moveId | integer | yes | Value passed to the `moveId` parameter. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonmovenamefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonMoveNameFromPC(1, 1, "Tackle")
log("getPokemonMoveNameFromPC: " .. tostring(result))
end
log("getPokemonMoveNameFromPC: " .. tostring(result))
end
getPokemonMoveAccuracyFromPC()
Signature
result = getPokemonMoveAccuracyFromPC(boxId, boxPokemonId, moveId)
Returns the move accuracy of the specified pokémon in the box at the specified index.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
moveId | integer | yes | Value passed to the `moveId` parameter. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonmoveaccuracyfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonMoveAccuracyFromPC(1, 1, "Tackle")
log("getPokemonMoveAccuracyFromPC: " .. tostring(result))
end
log("getPokemonMoveAccuracyFromPC: " .. tostring(result))
end
getPokemonMovePowerFromPC()
Signature
result = getPokemonMovePowerFromPC(boxId, boxPokemonId, moveId)
Returns the move power of the specified pokémon in the box at the specified index.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
moveId | integer | yes | Value passed to the `moveId` parameter. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonmovepowerfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonMovePowerFromPC(1, 1, "Tackle")
log("getPokemonMovePowerFromPC: " .. tostring(result))
end
log("getPokemonMovePowerFromPC: " .. tostring(result))
end
getPokemonMoveTypeFromPC()
Signature
result = getPokemonMoveTypeFromPC(boxId, boxPokemonId, moveId)
Returns the move type of the specified pokémon in the box at the specified index.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
moveId | integer | yes | Value passed to the `moveId` parameter. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonmovetypefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonMoveTypeFromPC(1, 1, "Tackle")
log("getPokemonMoveTypeFromPC: " .. tostring(result))
end
log("getPokemonMoveTypeFromPC: " .. tostring(result))
end
getPokemonMoveDamageTypeFromPC()
Signature
result = getPokemonMoveDamageTypeFromPC(boxId, boxPokemonId, moveId)
Returns the move damage type of the specified pokémon in the box at the specified index.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
moveId | integer | yes | Value passed to the `moveId` parameter. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonmovedamagetypefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonMoveDamageTypeFromPC(1, 1, "Tackle")
log("getPokemonMoveDamageTypeFromPC: " .. tostring(result))
end
log("getPokemonMoveDamageTypeFromPC: " .. tostring(result))
end
getPokemonMoveStatusFromPC()
Signature
result = getPokemonMoveStatusFromPC(boxId, boxPokemonId, moveId)
Returns true if the move of the specified pokémon in the box at the specified index can apply a status .
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
moveId | integer | yes | Value passed to the `moveId` parameter. |
Returns
boolean example: true
POST /lua/pc-storage/getpokemonmovestatusfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonMoveStatusFromPC(1, 1, "Tackle")
log("getPokemonMoveStatusFromPC: " .. tostring(result))
end
log("getPokemonMoveStatusFromPC: " .. tostring(result))
end
getPokemonNatureFromPC()
Signature
result = getPokemonNatureFromPC(boxId, boxPokemonId)
Nature of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonnaturefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonNatureFromPC(1, 1)
log("getPokemonNatureFromPC: " .. tostring(result))
end
log("getPokemonNatureFromPC: " .. tostring(result))
end
getPokemonAbilityFromPC()
Signature
result = getPokemonAbilityFromPC(boxId, boxPokemonId)
Ability of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonabilityfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonAbilityFromPC(1, 1)
log("getPokemonAbilityFromPC: " .. tostring(result))
end
log("getPokemonAbilityFromPC: " .. tostring(result))
end
getPokemonStatFromPC()
Signature
result = getPokemonStatFromPC(boxId, boxPokemonId, statType)
Returns the value for the specified stat of the specified pokémon in the PC.
Practical scenario
Open and refresh the PC before reading a stored Pokémon stat.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
statType | string | yes | Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonstatfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local speed = getPokemonStatFromPC(1, 1, "SPE")
log("Box 1 slot 1 Speed: " .. tostring(speed))
end
getPokemonEffortValueFromPC()
Signature
result = getPokemonEffortValueFromPC(boxId, boxPokemonId, statType)
Returns the effort value for the specified stat of the specified pokémon in the PC.
Practical scenario
Read EVs from a refreshed PC entry before selecting a Pokémon to withdraw.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
statType | string | yes | Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemoneffortvaluefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local attackEV = getPokemonEffortValueFromPC(1, 1, "ATK")
log("Stored Pokémon Attack EV: " .. tostring(attackEV))
end
getPokemonIndividualValueFromPC()
Signature
result = getPokemonIndividualValueFromPC(boxId, boxPokemonId, statType)
Returns the individual value for the specified stat of the specified pokémon in the PC.
Practical scenario
Read IVs from a refreshed PC entry when filtering stored catches.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
statType | string | yes | Stat name: `HP`, `ATK`, `DEF`, `SPATK`, `SPDEF`, or `SPD` (speed). The long forms `HEALTH`, `ATTACK`, `DEFENCE`/`DEFENSE`, `SPATTACK`, `SPDEFENCE`/`SPDEFENSE` and `SPEED` also work; anything else stops the script. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonindividualvaluefrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local speedIV = getPokemonIndividualValueFromPC(1, 1, "SPE")
log("Stored Pokémon Speed IV: " .. tostring(speedIV))
end
getPokemonHappinessFromPC()
Signature
result = getPokemonHappinessFromPC(boxId, boxPokemonId)
Happiness of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
integer example: 1
POST /lua/pc-storage/getpokemonhappinessfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonHappinessFromPC(1, 1)
log("getPokemonHappinessFromPC: " .. tostring(result))
end
log("getPokemonHappinessFromPC: " .. tostring(result))
end
getPokemonRegionFromPC()
Signature
result = getPokemonRegionFromPC(boxId, boxPokemonId)
Region of capture of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonregionfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonRegionFromPC(1, 1)
log("getPokemonRegionFromPC: " .. tostring(result))
end
log("getPokemonRegionFromPC: " .. tostring(result))
end
getPokemonOriginalTrainerFromPC()
Signature
result = getPokemonOriginalTrainerFromPC(boxId, boxPokemonId)
Original trainer of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemonoriginaltrainerfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonOriginalTrainerFromPC(1, 1)
log("getPokemonOriginalTrainerFromPC: " .. tostring(result))
end
log("getPokemonOriginalTrainerFromPC: " .. tostring(result))
end
getPokemonGenderFromPC()
Signature
result = getPokemonGenderFromPC(boxId, boxPokemonId)
Gender of the pokemon of the current box matching the ID.
Practical scenario
Read this value only after the PC is open and the selected box is refreshed.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
string example: "value"
POST /lua/pc-storage/getpokemongenderfrompc
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
function inspectPC()
if not isPCOpen() or not isCurrentPCBoxRefreshed() then
return
end
local result = getPokemonGenderFromPC(1, 1)
log("getPokemonGenderFromPC: " .. tostring(result))
end
log("getPokemonGenderFromPC: " .. tostring(result))
end
usePC()
Signature
result = usePC()
Move next to the map PC when needed, open Pokémon Storage, and request the current PC box. The PC opens using the official storage flow and remains open until closed by movement or another PC action. Use isCurrentPCBoxRefreshed() before relying on the refreshed box contents.
Practical scenario
PC actions are asynchronous. Issue one operation, return, and wait for the next server refresh before making a dependent change.
Returns
boolean example: true
POST /lua/pc-storage/usepc
function onPathAction()
if not isPCOpen() then
usePC()
return
end
function onPathAction()
if not isPCOpen() then
usePC()
return
end
local result = usePC()
return
end
return
end
openPCBox()
Signature
result = openPCBox(boxId)
Open or refresh a PC box by its one-based box number. The visible box order uses one-based boxPokemonId indexes, while the tool internally tracks server database IDs and PC slot IDs. Wait for isCurrentPCBoxRefreshed() before reading the box immediately after opening it.
Practical scenario
PC actions are asynchronous. Issue one operation, return, and wait for the next server refresh before making a dependent change.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
Returns
boolean example: true
POST /lua/pc-storage/openpcbox
function onPathAction()
if not isPCOpen() then
usePC()
return
end
function onPathAction()
if not isPCOpen() then
usePC()
return
end
local result = openPCBox(1)
return
end
return
end
depositPokemonToPC()
Signature
result = depositPokemonToPC(teamPokemonId)
Send the Pokémon at the one-based team index into the currently open PC box. The tool resolves the selected team Pokémon to its server database ID and waits for the server PC delta update instead of forcing an immediate full refresh. Re-check team/PC state before issuing a dependent action.
Practical scenario
PC actions are asynchronous. Issue one operation, return, and wait for the next server refresh before making a dependent change.
Parameters
| Name | Type | Required | Description |
|---|
teamPokemonId | integer | yes | Value passed to the `teamPokemonId` parameter. |
Returns
boolean example: true
POST /lua/pc-storage/depositpokemontopc
function onPathAction()
if not isPCOpen() then
usePC()
return
end
function onPathAction()
if not isPCOpen() then
usePC()
return
end
local result = depositPokemonToPC(2)
return
end
return
end
withdrawPokemonFromPC()
Signature
result = withdrawPokemonFromPC(boxId, boxPokemonId)
Move the Pokémon at the one-based PC box index into the team. The tool resolves the selected PC Pokémon to its server database ID and waits for the normal team update plus PC delta remove response. The target boxId should match the visible/refreshed PC box.
Practical scenario
PC actions are asynchronous. Issue one operation, return, and wait for the next server refresh before making a dependent change.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
boolean example: true
POST /lua/pc-storage/withdrawpokemonfrompc
function onPathAction()
if not isPCOpen() then
usePC()
return
end
function onPathAction()
if not isPCOpen() then
usePC()
return
end
local result = withdrawPokemonFromPC(1, 1)
return
end
return
end
swapPokemonFromPC()
Signature
result = swapPokemonFromPC(boxId, boxPokemonId, teamPokemonId)
Swap the Pokémon at the one-based team index with the Pokémon at the one-based index in the selected PC box. The tool sends the official database-ID swap packet and applies the server PC delta update, so the PC Pokémon can be at any position in the box, including the first slot.
Practical scenario
PC actions are asynchronous. Issue one operation, return, and wait for the next server refresh before making a dependent change.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
teamPokemonId | integer | yes | Value passed to the `teamPokemonId` parameter. |
Returns
boolean example: true
POST /lua/pc-storage/swappokemonfrompc
function onPathAction()
if not isPCOpen() then
usePC()
return
end
function onPathAction()
if not isPCOpen() then
usePC()
return
end
local result = swapPokemonFromPC(1, 1, 2)
return
end
return
end
swapPokemonWithinPC()
Signature
result = swapPokemonWithinPC(boxId, firstBoxPokemonId, secondBoxPokemonId)
Swap two Pokémon positions inside the same visible PC box. Both PC indexes are one-based. The server returns a position-pair delta, and the tool updates the cached PC slot order without refreshing the full box.
Practical scenario
PC actions are asynchronous. Issue one operation, return, and wait for the next server refresh before making a dependent change.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
firstBoxPokemonId | integer | yes | Value passed to the `firstBoxPokemonId` parameter. |
secondBoxPokemonId | integer | yes | Value passed to the `secondBoxPokemonId` parameter. |
Returns
boolean example: true
POST /lua/pc-storage/swappokemonwithinpc
function onPathAction()
if not isPCOpen() then
usePC()
return
end
function onPathAction()
if not isPCOpen() then
usePC()
return
end
local result = swapPokemonWithinPC(1, 1, 2)
return
end
return
end
releasePokemonFromPC()
Signature
result = releasePokemonFromPC(boxId, boxPokemonId)
Permanently release/delete the Pokémon at the one-based index in the selected PC box. This cannot be undone. The tool resolves the Pokémon database ID, sends the official release packet, and waits for the server PC delta remove update.
Practical scenario
Release only after opening the correct box and validating the target. The operation is permanent and asynchronous.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
boxPokemonId | integer | yes | One-based Pokémon position inside the selected PC box. |
Returns
boolean example: true
POST /lua/pc-storage/releasepokemonfrompc
function onPathAction()
if not isPCOpen() then
usePC()
return
end
if not isCurrentPCBoxRefreshed() then
refreshPCBox()
return
end
if getPokemonNameFromPC(1, 1) == "Rattata" then
releasePokemonFromPC(1, 1)
return
end
end
refreshPCBox()
Signature
result = refreshPCBox(boxId)
Request a refresh for the specified PC box. The response can be a full box snapshot, a metadata-only update, or a delta update. Use isCurrentPCBoxRefreshed() before reading the refreshed contents immediately after this call.
Practical scenario
PC actions are asynchronous. Issue one operation, return, and wait for the next server refresh before making a dependent change.
Parameters
| Name | Type | Required | Description |
|---|
boxId | integer | yes | One-based PC box number. |
Returns
boolean example: true
POST /lua/pc-storage/refreshpcbox
function onPathAction()
if not isPCOpen() then
usePC()
return
end
function onPathAction()
if not isPCOpen() then
usePC()
return
end
local result = refreshPCBox(1)
return
end
return
end