Auxiliary.SelectFromOptions
Signature
lua
Auxiliary.SelectFromOptions(int tp, ... table) -> any|nilDescription
Filters option tables by their condition, calls Duel.SelectOption with the available option labels, and returns the selected table's custom value or original index. Each option is {condition, option[, value]}. If no condition is true, the helper returns nil. Its default index return is 1-based, unlike Duel.SelectOption's 0-based return.
Parameters
tpint...table
Returns
any|nil- Selected option value or 1-based option index; nil if no option is available.
Source
Utilities/utility.lua:152
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 162 indexed script(s).
- Search this function in the Script Explorer with
Auxiliary.SelectFromOptions.
Script Examples
Gem-Knight Dispersion (24220368)
Source: Scripts/c24220368.lua
lua
end
if b1 and b2 then
op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1)},
{b2,aux.Stringid(id,2)})Magnet Bonding (65514302)
Source: Scripts/c65514302.lua
lua
local op=0
if b1 or b2 or b3 then
op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2},Hecahands Tartaros (57809669)
Source: Scripts/c57809669.lua
lua
local op=0
if b1 or b2 then
op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2})