Jump to content

Custom script help


Recommended Posts

I wanted to make a custom quick-play spell card that says "pay half your LP and tribute 1 "Cyber Dragon" you control; Special Summon 1 "Cyber Twin Dragon" from your extra deck, ignoring it's summoning conditions", but I can't activate it. Can someone help me fix the script? Here's what it currently looks like:


function s.initial_effect(c)
    local e1=Effect.CreateEffect(c)


function s.costfilter(c)
    return c:IsCode(70095154)
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
    if chk==0 then return Duel.CheckLPCost(tp,math.floor(Duel.GetLP(tp)/2)) and Duel.CheckReleaseGroup(tp,s.costfilter,1,nil) end
    local sg=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil)
function s.filter(c,e,tp)
    return c:IsCode(74157028) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
    if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
        and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
    if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
    local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
    if g:GetCount()>0 then

  • Confused 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...