Skip to content

Duel.CheckLocation ​

Signature ​

lua
Duel.CheckLocation(int player, int location, int sequence) -> bool

Description ​

Checks whether player can use the given sequence in location. For Pendulum Zone checks, use LOCATION_PZONE with sequence 0 for the left Pendulum Zone or sequence 1 for the right Pendulum Zone.

Parameters ​

  • player int
  • location int - Location constant to inspect, such as LOCATION_MZONE, LOCATION_SZONE, or LOCATION_PZONE.
  • sequence int - Sequence inside that location.

Returns ​

  • bool - true if that exact location sequence is usable.

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:4944

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 104 indexed script(s).
  • Search this function in the Script Explorer with Duel.CheckLocation.
CardIDScriptDetected Calls
D/D/D/D Dimensional King Arc Crisis71398055Scripts/c71398055.lua2
Odd-Eyes Arcray Dragon6218704Scripts/c6218704.lua6
Starving Venemy Dragon93729065Scripts/c93729065.lua2
Chef de Nouvelles29251488Scripts/c29251488.lua2
Vaylantz Genesis Grand Duke76075139Scripts/c76075139.lua4
Starving Venom Wing Dragon5148778Scripts/c5148778.lua2
Plunder Patrollship Jord85969517Scripts/c85969517.lua4
D/D/D Deviser King Deus Machinex46593546Scripts/c46593546.lua2
Arktos XII - Chronochasm Vaylantz50687050Scripts/c50687050.lua4
Odd-Eyes Rebellion Dragon Overlord98452268Scripts/c98452268.lua2
Nirvana High Paladin80896940Scripts/c80896940.lua2
Angello Vaalmonica3048768Scripts/c3048768.lua4
Supreme King Z-ARC - Synchro Universe48654267Scripts/c48654267.lua2
Clear Wing Fast Dragon90036274Scripts/c90036274.lua2
Mamonaka the Vaylantz United40680521Scripts/c40680521.lua6
Supreme King Gate Zero96227613Scripts/c96227613.lua2
Dimonno Vaalmonica30432463Scripts/c30432463.lua4
Supreme King Gate Infinity22211622Scripts/c22211622.lua2
Magister of Endymion66104644Scripts/c66104644.lua2
D/D/D Super Doom King Bright Armageddon72402069Scripts/c72402069.lua2
Master Spirit Tech Force - Pendulum Ruler68508433Scripts/c68508433.lua2
Majespecter Draco - Ryu3594985Scripts/c3594985.lua2
Pendulum Witch43502497Scripts/c43502497.lua2
Supreme King Z-ARC13331639Scripts/c13331639.lua2
...and 80 more

Script Examples ​

D/D/D/D Dimensional King Arc Crisis (71398055) ​

Source: Scripts/c71398055.lua

lua
end
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
	local c=e:GetHandler()
	if c:IsLocation(LOCATION_GRAVE) then

Odd-Eyes Arcray Dragon (6218704) ​

Source: Scripts/c6218704.lua

lua
end
function c6218704.settg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
		and Duel.IsExistingMatchingCard(c6218704.setfilter,tp,LOCATION_DECK,0,1,nil) end
end

Starving Venemy Dragon (93729065) ​

Source: Scripts/c93729065.lua

lua
end
function c93729065.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c93729065.penop(e,tp,eg,ep,ev,re,r,rp)