a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | .
 

 Facing a little custom card problem

View previous topic View next topic Go down 
Go to page : 1, 2  Next
AuthorMessage
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Facing a little custom card problem   Tue Aug 06, 2013 3:44 pm

I can't seem to get the Duel.ConfirmCards code to work properly, it just calls an script error and does not reveal the card to the opponent

The effect of the card:
When this card destroys an opponent's monster by battle add 1 card with a name "X" from your deck to your hand.

Code:
--Dorulumon
function c99647329.initial_effect(c)
   --special summon
   local e1=Effect.CreateEffect(c)
   e1:SetDescription(aux.Stringid(99647329,0))
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
   e1:SetCode(EVENT_BATTLE_DESTROYING)
   e1:SetTarget(c99647329.target)
   e1:SetOperation(c99647329.operation)
   c:RegisterEffect(e1)
end
function c99647329.filter(c,e,tp)
   return c:IsSetCard(0x7C) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c99647329.target(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
      and Duel.IsExistingMatchingCard(c99647329.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
   Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c99647329.operation(e,tp,eg,ep,ev,re,r,rp)
   if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
   Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
   local g=Duel.SelectMatchingCard(tp,c99647329.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
   local tc=g:GetFirst()
   if tc and Duel.SendtoHand(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.ConfirmCards(1-tp,sg)
       local e1=Effect.CreateEffect(e:GetHandler())
      Duel.ConfirmCards(1-tp,sg)
   end
end
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: Facing a little custom card problem   Tue Aug 06, 2013 3:51 pm

you have Duel.ConfirmCards(1-tp,sg) twice take out the first one
Back to top Go down
View user profile http://mackpro.userboard.net
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Tue Aug 06, 2013 3:56 pm

oh didn't notice i had 2. still doesn't work

the script error says:
[Script Error:] [string "./script/c99647329.lua"]:28:Paramenter 2 should be "Card" or "Group"

_________________
Not the best at scripting, but will help if I can. Really busy lately tho :/


Youtube Channel

Dark Army vs Elemental Dragons

Planned Archetypes:
-Persona Card
-Dark Army
-Elemental Dragons
-END (tons and tons of cards made in card maker)
-Chained Dragons (lost in a computer meltdown, will redo eventually)
-RWBY (thinking of making these)
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: Facing a little custom card problem   Tue Aug 06, 2013 4:01 pm

Can you copy line 28 of the script for me as im too lazy to count them
Back to top Go down
View user profile http://mackpro.userboard.net
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Tue Aug 06, 2013 4:02 pm

Duel.ConfirmCards(1-tp,sg)

_________________
Not the best at scripting, but will help if I can. Really busy lately tho :/


Youtube Channel

Dark Army vs Elemental Dragons

Planned Archetypes:
-Persona Card
-Dark Army
-Elemental Dragons
-END (tons and tons of cards made in card maker)
-Chained Dragons (lost in a computer meltdown, will redo eventually)
-RWBY (thinking of making these)
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: Facing a little custom card problem   Tue Aug 06, 2013 4:06 pm

Try this

 --Dorulumon
function c99647329.initial_effect(c)
   --special summon
   local e1=Effect.CreateEffect(c)
   e1:SetDescription(aux.Stringid([url=tel:99647329,0]99647329,0[/url]))
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
   e1:SetCode(EVENT_BATTLE_DESTROYING)
   e1:SetTarget(c99647329.target)
   e1:SetOperation(c99647329.operation)
   c:RegisterEffect(e1)
end
function c99647329.filter(c,e,tp)
   return c:IsSetCard(0x7C) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c99647329.target(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
      and Duel.IsExistingMatchingCard(c99647329.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
   Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c99647329.operation(e,tp,eg,ep,ev,re,r,rp)
   if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
   Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
   local g=Duel.SelectMatchingCard(tp,c99647329.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
   local tc=g:GetFirst()
   if tc then
 Duel.SendtoHand(tc,0,tp,tp,false,false,POS_FACEUP)
      Duel.ConfirmCards(1-tp,tc)
   end
end
Back to top Go down
View user profile http://mackpro.userboard.net
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Tue Aug 06, 2013 4:14 pm

now effect doesn't activate at all, also in my script i noticed AI added a card from his deck to my hand O_O

_________________
Not the best at scripting, but will help if I can. Really busy lately tho :/


Youtube Channel

Dark Army vs Elemental Dragons

Planned Archetypes:
-Persona Card
-Dark Army
-Elemental Dragons
-END (tons and tons of cards made in card maker)
-Chained Dragons (lost in a computer meltdown, will redo eventually)
-RWBY (thinking of making these)
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: Facing a little custom card problem   Tue Aug 06, 2013 4:17 pm

Ok i will take a good look tommorrow as im very tired at the moment
Back to top Go down
View user profile http://mackpro.userboard.net
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Tue Aug 06, 2013 4:19 pm

kk, good night

_________________
Not the best at scripting, but will help if I can. Really busy lately tho :/


Youtube Channel

Dark Army vs Elemental Dragons

Planned Archetypes:
-Persona Card
-Dark Army
-Elemental Dragons
-END (tons and tons of cards made in card maker)
-Chained Dragons (lost in a computer meltdown, will redo eventually)
-RWBY (thinking of making these)
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: Facing a little custom card problem   Wed Aug 07, 2013 1:51 am

try this i havent tested it but im pretty sure it should work the error was in line 28 it was trying to find sg a variable you didn't have so i changed it to tc if this dont work i will go through the code and have a good look for you

--Dorulumon
function c99647329.initial_effect(c)
   --special summon
   local e1=Effect.CreateEffect(c)
   e1:SetDescription(aux.Stringid(99647329,0))
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
   e1:SetCode(EVENT_BATTLE_DESTROYING)
   e1:SetTarget(c99647329.target)
   e1:SetOperation(c99647329.operation)
   c:RegisterEffect(e1)
end
function c99647329.filter(c,e,tp)
   return c:IsSetCard(0x7C) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c99647329.target(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
      and Duel.IsExistingMatchingCard(c99647329.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
   Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c99647329.operation(e,tp,eg,ep,ev,re,r,rp)
   if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
   Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
   local g=Duel.SelectMatchingCard(tp,c99647329.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
   local tc=g:GetFirst()
   if tc and Duel.SendtoHand(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
       local e1=Effect.CreateEffect(e:GetHandler())
      Duel.ConfirmCards(1-tp,tc)
   end
end
Back to top Go down
View user profile http://mackpro.userboard.net
jackmoonward

avatar
Admin
Admin

Posts : 75
Join date : 2013-08-03
Age : 20
Location : Classified

PostSubject: Re: Facing a little custom card problem   Wed Aug 07, 2013 6:29 am

I'd recommend changing the:
c:IsCanBeSpecialSummoned(e,0,tp,false,false)

to c:IsAbleToHand() and removing the e,tp from the filter's peripherals.

~Jack

_________________
Jackpro! The only YGOPro anime mod with Alchemy Beasts, Armor monsters, Valkyries, and more! Download at www.tehmadhouse.tk

My YouTube: www.youtube.com/user/jackmoonward
Back to top Go down
View user profile http://www.tehmadhouse.tk
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: Facing a little custom card problem   Wed Aug 07, 2013 6:30 am

jackmoonward wrote:
I'd recommend changing the:
c:IsCanBeSpecialSummoned(e,0,tp,false,false)

to c:IsAbleToHand() and removing the e,tp from the filter's peripherals.

~Jack

i didnt see that good pick up lol
Back to top Go down
View user profile http://mackpro.userboard.net
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Wed Aug 07, 2013 10:18 am

thanks, it works now

and Jack, i  pretty much copied Jurrac Guaiba's code because Gladiator Beast Samnite's didn't want to trigger. Guess i forgot to change the filter lol thanks for the heads up

_________________
Not the best at scripting, but will help if I can. Really busy lately tho :/


Youtube Channel

Dark Army vs Elemental Dragons

Planned Archetypes:
-Persona Card
-Dark Army
-Elemental Dragons
-END (tons and tons of cards made in card maker)
-Chained Dragons (lost in a computer meltdown, will redo eventually)
-RWBY (thinking of making these)
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 2:00 am

okay got another problem. i want a monster effect that when summoned allows you to special summon any number of monsters with setcode 124(0x7C) but only 1 of each, but all i can get is an effect that forcefully summons all monsters with the setcode even in multiple copies. i also can't seem to get the monsters to be unable to attack in the turn they were special summoned (not included in the script because  i removed it while trying to fix the script before)

Code:
--Shoutmon
function c74519825.initial_effect(c)
   --special summon
   local e1=Effect.CreateEffect(c)
   e1:SetDescription(aux.Stringid(74519825,1))
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
   e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
   e1:SetCode(EVENT_SUMMON_SUCCESS)
   e1:SetTarget(c74519825.target)
   e1:SetOperation(c74519825.operation)
   c:RegisterEffect(e1)
end
function c74519825.filter(c,e,sp)
   return c:IsSetCard(0x7C) and c:IsCanBeSpecialSummoned(e,0,sp,true,false)
end
function c74519825.target(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return Duel.IsExistingMatchingCard(c74519825.filter,tp,LOCATION_HAND,0,1,nil,e,tp)
      and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
   local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
   local gct=Duel.GetMatchingGroupCount(c74519825.filter,tp,LOCATION_HAND,0,nil,e,tp)
   if ct>gct then
      Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,gct,tp,LOCATION_HAND)
   else
      Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,tp,LOCATION_HAND)
   end
end
function c74519825.operation(e,tp,eg,ep,ev,re,r,rp,chk)
   local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
   if ct==0 then return end
   local g=Duel.GetMatchingGroup(c74519825.filter,tp,LOCATION_HAND,0,nil,e,tp)
   local gc=g:GetCount()
   if gc==0 then return end
   if gc<=ct then
      Duel.SpecialSummon(g,1,tp,tp,true,false,POS_FACEUP)
   else
      Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
      local sg=g:Select(tp,ct,ct,nil)
      Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
   end
end
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 2:10 am

might want to try a loop so that it summons 1 at a time and removes the last select card from the list i will make it up later as im about to head to work

can you also say what the exact effect is thanks
Back to top Go down
View user profile http://mackpro.userboard.net
jackmoonward

avatar
Admin
Admin

Posts : 75
Join date : 2013-08-03
Age : 20
Location : Classified

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 2:55 am

I will get back to you on the summoning 1 of each part.
 If you want them not to be able to attack the turn they are summoned then this current script should work for you:

--Shoutmon
function c74519825.initial_effect(c)
   --special summon
   local e1=Effect.CreateEffect(c)
   e1:SetDescription(aux.Stringid(74519825,1))
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
   e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
   e1:SetCode(EVENT_SUMMON_SUCCESS)
   e1:SetTarget(c74519825.target)
   e1:SetOperation(c74519825.operation)
   c:RegisterEffect(e1)
end
function c74519825.filter(c,e,sp)
   return c:IsSetCard(0x7C) and c:IsCanBeSpecialSummoned(e,0,sp,true,false)
end
function c74519825.target(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return Duel.IsExistingMatchingCard(c74519825.filter,tp,LOCATION_HAND,0,1,nil,e,tp)
      and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
   local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
   local gct=Duel.GetMatchingGroupCount(c74519825.filter,tp,LOCATION_HAND,0,nil,e,tp)
   if ct>gct then
      Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,gct,tp,LOCATION_HAND)
   else
      Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,tp,LOCATION_HAND)
   end
end
function c74519825.operation(e,tp,eg,ep,ev,re,r,rp,chk)
   local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
   if ct==0 then return end
   local g=Duel.GetMatchingGroup(c74519825.filter,tp,LOCATION_HAND,0,nil,e,tp)
   local gc=g:GetCount()
   if gc==0 then return end
   if gc<=ct then
      Duel.SpecialSummon(g,1,tp,tp,true,false,POS_FACEUP)
   else
      Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
      local sg=g:Select(tp,ct,ct,nil)
      if sg and Duel.SpecialSummonStep(sg,0,tp,tp,true,false,POS_FACEUP) then
        local e1=Effect.CreateEffect(e:GetHandler())
        e1:SetType(EFFECT_TYPE_SINGLE)
        e1:SetCode(EFFECT_CANNOT_ATTACK)
        e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
        sg:RegisterEffect(e1)
        Duel.SpecialSummonComplete()
   end

end
end

_________________
Jackpro! The only YGOPro anime mod with Alchemy Beasts, Armor monsters, Valkyries, and more! Download at www.tehmadhouse.tk

My YouTube: www.youtube.com/user/jackmoonward
Back to top Go down
View user profile http://www.tehmadhouse.tk
jackmoonward

avatar
Admin
Admin

Posts : 75
Join date : 2013-08-03
Age : 20
Location : Classified

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 4:19 am

Ok I have completely done your Shoutmon script for you, it even keeps the monsters summoned from attacking this turn:

--Shoutmon
function c74519825.initial_effect(c)
   --special summon
   local e1=Effect.CreateEffect(c)
   e1:SetDescription(aux.Stringid(74519825,1))
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
   e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
   e1:SetCode(EVENT_SUMMON_SUCCESS)
   e1:SetTarget(c74519825.target)
   e1:SetOperation(c74519825.operation)
   c:RegisterEffect(e1)
end
function c74519825.filter(c,e,tp)
   return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x7C)
end
function c74519825.target(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return Duel.IsExistingMatchingCard(c74519825.filter,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler())
   and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
    local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
    local g=Duel.GetMatchingGroup(c74519825.filter,tp,LOCATION_HAND,0,nil,e,tp,e:GetHandler())
    Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
    local g1=g:Select(tp,1,1,nil)
    g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
    if ft>1 and g:GetCount()>0 then
        Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
        local g2=g:Select(tp,1,1,nil)
        g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode())
        g1:Merge(g2)
        if ft>2 and g:GetCount()>0 then
        Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
        local g3=g:Select(tp,1,1,nil)
        g:Remove(Card.IsCode,nil,g3:GetFirst():GetCode())
        if ft>2 and g:GetCount()>0 then
            g2=g:Select(tp,1,1,nil)
            g1:Merge(g2)
            g1:Merge(g3)
            end
        end
    end
    Duel.SetTargetCard(g1)   
    Duel.SetOperationInfo(0,CATEGORY_SPSUMMON,g1,g1:GetCount(),0,0)
end
function c74519825.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if ft<g:GetCount() then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
tc:RegisterEffect(e1)
tc=g:GetNext()
Duel.SpecialSummonComplete()
end
end

_________________
Jackpro! The only YGOPro anime mod with Alchemy Beasts, Armor monsters, Valkyries, and more! Download at www.tehmadhouse.tk

My YouTube: www.youtube.com/user/jackmoonward
Back to top Go down
View user profile http://www.tehmadhouse.tk
outlaw1994

avatar
Admin
Admin

Member Title : Red-Eyes Lord
Posts : 797
Join date : 2013-07-09
Age : 23
Location : bundaberg qld australia

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 4:40 am

jackmoonward wrote:
Ok I have completely done your Shoutmon script for you, it even keeps the monsters summoned from attacking this turn:

--Shoutmon
function c74519825.initial_effect(c)
   --special summon
   local e1=Effect.CreateEffect(c)
   e1:SetDescription(aux.Stringid(74519825,1))
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
   e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
   e1:SetCode(EVENT_SUMMON_SUCCESS)
   e1:SetTarget(c74519825.target)
   e1:SetOperation(c74519825.operation)
   c:RegisterEffect(e1)
end
function c74519825.filter(c,e,tp)
   return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x7C)
end
function c74519825.target(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return Duel.IsExistingMatchingCard(c74519825.filter,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler())
   and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
    local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
    local g=Duel.GetMatchingGroup(c74519825.filter,tp,LOCATION_HAND,0,nil,e,tp,e:GetHandler())
    Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
    local g1=g:Select(tp,1,1,nil)
    g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
    if ft>1 and g:GetCount()>0 then
        Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
        local g2=g:Select(tp,1,1,nil)
        g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode())
        g1:Merge(g2)
        if ft>2 and g:GetCount()>0 then
        Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
        local g3=g:Select(tp,1,1,nil)
        g:Remove(Card.IsCode,nil,g3:GetFirst():GetCode())
        if ft>2 and g:GetCount()>0 then
            g2=g:Select(tp,1,1,nil)
            g1:Merge(g2)
            g1:Merge(g3)
            end
        end
    end
    Duel.SetTargetCard(g1)   
    Duel.SetOperationInfo(0,CATEGORY_SPSUMMON,g1,g1:GetCount(),0,0)
end
function c74519825.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if ft<g:GetCount() then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
tc:RegisterEffect(e1)
tc=g:GetNext()
Duel.SpecialSummonComplete()
end
end

 thanks again jack i was just about to do this you saved me some work
Back to top Go down
View user profile http://mackpro.userboard.net
jackmoonward

avatar
Admin
Admin

Posts : 75
Join date : 2013-08-03
Age : 20
Location : Classified

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 4:57 am

No problem. We all get busy now and then so it's better to do work where it can be done.

~Jack

_________________
Jackpro! The only YGOPro anime mod with Alchemy Beasts, Armor monsters, Valkyries, and more! Download at www.tehmadhouse.tk

My YouTube: www.youtube.com/user/jackmoonward
Back to top Go down
View user profile http://www.tehmadhouse.tk
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 10:56 am

thank you so much jack

is it possible to select monsters you special summon instead of forcefully summoning them all?
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
jackmoonward

avatar
Admin
Admin

Posts : 75
Join date : 2013-08-03
Age : 20
Location : Classified

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 6:53 pm

Er. You wanted it to summon as many as possible. To do that I would have to rewrite a lot of the script.

~Jack

_________________
Jackpro! The only YGOPro anime mod with Alchemy Beasts, Armor monsters, Valkyries, and more! Download at www.tehmadhouse.tk

My YouTube: www.youtube.com/user/jackmoonward
Back to top Go down
View user profile http://www.tehmadhouse.tk
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 7:10 pm

must have mistyped what i meant. i can find a way around it myself(like another custom archetype for monsters that were originally meant to be summoned with this effect) if you don't want to rewrite the script

_________________
Not the best at scripting, but will help if I can. Really busy lately tho :/


Youtube Channel

Dark Army vs Elemental Dragons

Planned Archetypes:
-Persona Card
-Dark Army
-Elemental Dragons
-END (tons and tons of cards made in card maker)
-Chained Dragons (lost in a computer meltdown, will redo eventually)
-RWBY (thinking of making these)
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
jackmoonward

avatar
Admin
Admin

Posts : 75
Join date : 2013-08-03
Age : 20
Location : Classified

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 8:51 pm

Well I can (not easily) fix it if you really want me to change it.

~Jack

_________________
Jackpro! The only YGOPro anime mod with Alchemy Beasts, Armor monsters, Valkyries, and more! Download at www.tehmadhouse.tk

My YouTube: www.youtube.com/user/jackmoonward
Back to top Go down
View user profile http://www.tehmadhouse.tk
Project Leviamon

avatar


Member Title : Busy with high school sadly
Posts : 320
Join date : 2013-08-03
Age : 18
Location : Digital World

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 9:01 pm

If you are willing to do it then you can do it. And i hope i am not too demanding with custom card effects.
Also is there a way to add new counters to the game? If not i just use 1 of the existing ones

_________________
Not the best at scripting, but will help if I can. Really busy lately tho :/


Youtube Channel

Dark Army vs Elemental Dragons

Planned Archetypes:
-Persona Card
-Dark Army
-Elemental Dragons
-END (tons and tons of cards made in card maker)
-Chained Dragons (lost in a computer meltdown, will redo eventually)
-RWBY (thinking of making these)
Back to top Go down
View user profile http://www.pokecommunity.com/member.php?u=364458
jackmoonward

avatar
Admin
Admin

Posts : 75
Join date : 2013-08-03
Age : 20
Location : Classified

PostSubject: Re: Facing a little custom card problem   Thu Aug 08, 2013 9:02 pm

New counters? Open the Strings.conf file in your Ygopro folder with Wordpad and scroll ALL the way down to the bottom. It should be self explanatory from there.

~Jack

_________________
Jackpro! The only YGOPro anime mod with Alchemy Beasts, Armor monsters, Valkyries, and more! Download at www.tehmadhouse.tk

My YouTube: www.youtube.com/user/jackmoonward
Back to top Go down
View user profile http://www.tehmadhouse.tk
Sponsored content





PostSubject: Re: Facing a little custom card problem   

Back to top Go down
 

Facing a little custom card problem

View previous topic View next topic Back to top 
Page 1 of 2Go to page : 1, 2  Next

 Similar topics

-
» Malefic Custom Card Pack w/ Anime Effect (YgoPro)
» My Utopia Custom Card Additions
» CARD PROBLEM ON D.N.
» Akame Ga Kill Custom Card Pack (YgoPro)
» SHADDOLL CUSTOM CARD

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Custom Card Ruling and Bugs-