Skip to content

Duel.SelectOption ​

Signature ​

lua
Duel.SelectOption(int player, int desc1, ... any) -> int

Description ​

Shows player a list of description ids and returns the zero-based index of the selected option. The selected description id is also announced to the client.

Parameters ​

  • player int
  • desc1 int
  • ... any

Returns ​

  • int

Source ​

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

Used By ​

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

  • Detected in 479 indexed script(s).
  • Search this function in the Script Explorer with Duel.SelectOption.
CardIDScriptDetected Calls
Astrograph Sorcerer76794549Scripts/c76794549.lua2
Ashtraja Susanoo17020474Scripts/c17020474.lua1
Ursarctic Polari27693363Scripts/c27693363.lua1
Flower Cardian Peony with Butterfly57261568Scripts/c57261568.lua1
GMX Associate Noma83528184Scripts/c83528184.lua1
Albion the Branded Dragon87746184Scripts/c87746184.lua1
Chronograph Sorcerer12289247Scripts/c12289247.lua2
Trickstar Diffusion63181559Scripts/c63181559.lua3
Vaylantz Genesis Grand Duke76075139Scripts/c76075139.lua3
Vernusylph and the Changing Season37313338Scripts/c37313338.lua1
Trirealm Rift Judgment65195679Scripts/c65195679.lua1
Secrets of Dark Magic59514116Scripts/c59514116.lua3
Mecha Phantom Beast Auroradon44097050Scripts/c44097050.lua1
Power Tool Braver Dragon63265554Scripts/c63265554.lua1
Deep Sea Minstrel71978434Scripts/c71978434.lua1
Magikey Duo51510279Scripts/c51510279.lua1
Koa'ki Meiru Rooklord10060427Scripts/c10060427.lua4
D/D/D Deviser King Deus Machinex46593546Scripts/c46593546.lua1
Arktos XII - Chronochasm Vaylantz50687050Scripts/c50687050.lua1
Ursarctic Quint Charge15758127Scripts/c15758127.lua3
GMX - VELOX82706696Scripts/c82706696.lua1
Erebus the Underworld Monarch23064604Scripts/c23064604.lua4
Horn of Olifant55749927Scripts/c55749927.lua3
Hi-Speedroid Cork Shooter23361526Scripts/c23361526.lua1
...and 455 more

Script Examples ​

Astrograph Sorcerer (76794549) ​

Source: Scripts/c76794549.lua

lua
		local op=0
		if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
			op=Duel.SelectOption(tp,aux.Stringid(76794549,1),aux.Stringid(76794549,2))
		else
			op=Duel.SelectOption(tp,aux.Stringid(76794549,1))

Ashtraja Susanoo (17020474) ​

Source: Scripts/c17020474.lua

lua
		local set=s.setfilter(tc,e,tp)
		if tc:IsAbleToHand()
			and (not set or Duel.SelectOption(tp,1190,1153)==0) then
			Duel.SendtoHand(tc,nil,REASON_EFFECT)
			Duel.ConfirmCards(1-tp,tc)

Ursarctic Polari (27693363) ​

Source: Scripts/c27693363.lua

lua
	if tc then
		if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or not check
			or Duel.SelectOption(tp,1190,1152)==0) then
			Duel.SendtoHand(tc,nil,REASON_EFFECT)
		else