|
| I seem to be to stupid... | |
| Author | Message |
---|
VB99
Member Title : Legendary Planet Posts : 368 Join date : 2013-11-10
| Subject: I seem to be to stupid... Wed Apr 30, 2014 6:30 pm | |
| My effect is the following:
local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(XXXXXXXX,1)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCondition(c88071625.copycon) e1:SetTarget(c88071625.copytg) e1:SetOperation(c88071625.copyop) c:RegisterEffect(e1) end function c88071625.copycon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION end function c88071625.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return e:GetHandler():GetMaterial():IsContains(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=e:GetHandler():GetMaterial() Duel.SetTargetCard(g) end function c88071625.copyop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then local code=tc:GetOriginalCode() local reset_flag=RESET_EVENT+0x1fe0000 c:CopyEffect(code, reset_flag, 1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(reset_flag) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) end
I want it to copy the effects of all material monsters used in the fusion summon, but it doesn't work... Any ideas, anyone? |
| | | AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Re: I seem to be to stupid... Wed Apr 30, 2014 11:24 pm | |
| Did you use the effect of "Phantom of Chaos" as a base? He also copies effects, but sadly only the monster, that you banish from grave right?? |
| | | VB99
Member Title : Legendary Planet Posts : 368 Join date : 2013-11-10
| Subject: Re: I seem to be to stupid... Thu May 01, 2014 12:14 am | |
| I used The Tyrant Neptune as a base... |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: I seem to be to stupid... Thu May 01, 2014 1:37 am | |
| try this should work perfectly i hope - Code:
-
local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(88071625,1)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c88071625.copycon) e1:SetOperation(c88071625.copyop) c:RegisterEffect(e1) end function c88071625.copycon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION end function c88071625.copyop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=c:GetMaterial() local tc=g:GetFirst() while tc do local code=tc:GetOriginalCode() c:CopyEffect(code, nil, 1) tc=g:GetNext() end end |
| | | VB99
Member Title : Legendary Planet Posts : 368 Join date : 2013-11-10
| Subject: Re: I seem to be to stupid... Thu May 01, 2014 2:29 am | |
| Hm, it repots an error to me... I can't even summon the fusion monster for an unknown reason. |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: I seem to be to stupid... Thu May 01, 2014 2:43 am | |
| can you post the full code thats erroring |
| | | VB99
Member Title : Legendary Planet Posts : 368 Join date : 2013-11-10
| Subject: Re: I seem to be to stupid... Thu May 01, 2014 11:57 am | |
| function c00000001.initial_effect(c) c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,100000304,aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),1,true,true) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(c00000001.splimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetRange(LOCATION_EXTRA) e2:SetCondition(c00000001.sprcon) e2:SetOperation(c00000001.sprop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e3:SetValue(1) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) c:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_MATERIAL_CHECK) e5:SetValue(c00000001.valcheck) c:RegisterEffect(e5) local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_SUMMON_COST) e6:SetOperation(c00000001.facechk) e6:SetLabelObject(e5) c:RegisterEffect(e6) local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(00000001,1)) e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e7:SetProperty(EFFECT_FLAG_CARD_TARGET) e7:SetCode(EVENT_SPSUMMON_SUCCESS) e7:SetCondition(c00000001.copycon) e7:SetOperation(c00000001.copyop) c:RegisterEffect(e7) end function c00000001.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function c00000001.spfilter1(c,tp) return c:IsCode(100000304) and c:IsAbleToGraveAsCost() and (c:IsControler(tp) or c:IsFaceup()) and Duel.IsExistingMatchingCard(c00000001.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp) end function c00000001.spfilter2(c,tp) return c:IsRace(RACE_REPTILE) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial() and (c:IsControler(tp) or c:IsFaceup()) end function c00000001.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c00000001.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end function c00000001.sprop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(00000001,0)) local g1=Duel.SelectMatchingCard(tp,c00000001.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(00000001,1)) local g2=Duel.SelectMatchingCard(tp,c00000001.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,10,g1:GetFirst(),tp) g1:Merge(g2) Duel.SendtoGrave(g1,REASON_COST) function c00000001.copycon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION end function c00000001.valcheck(e,c) local g=c:GetMaterial() local tc=g:GetFirst() local atk=0 local def=0 while tc do local catk=tc:GetTextAttack() local cdef=tc:GetTextDefence() atk=atk+(catk>=0 and catk or 0) def=def+(cdef>=0 and cdef or 0) tc=g:GetNext() end if e:GetLabel()==1 then e:SetLabel(0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(atk) e1:SetReset(RESET_EVENT+0xff0000) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENCE) e2:SetValue(def) c:RegisterEffect(e2) end end function c00000001.facechk(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(1) end function c00000001.copycon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION end function c00000001.copyop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=c:GetMaterial() local tc=g:GetFirst() while tc do local code=tc:GetOriginalCode() c:CopyEffect(code, nil, 1) tc=g:GetNext() end end |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: I seem to be to stupid... Thu May 01, 2014 12:43 pm | |
| easy fix you just missing an end under sprop here the fixed code
function c00000001.initial_effect(c) c:EnableReviveLimit() aux.AddFusionProcCodeFun(c,100000304,aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),1,true,true) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(c00000001.splimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetRange(LOCATION_EXTRA) e2:SetCondition(c00000001.sprcon) e2:SetOperation(c00000001.sprop) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e3:SetValue(1) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) c:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_MATERIAL_CHECK) e5:SetValue(c00000001.valcheck) c:RegisterEffect(e5) local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_SUMMON_COST) e6:SetOperation(c00000001.facechk) e6:SetLabelObject(e5) c:RegisterEffect(e6) local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(00000001,1)) e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e7:SetProperty(EFFECT_FLAG_CARD_TARGET) e7:SetCode(EVENT_SPSUMMON_SUCCESS) e7:SetCondition(c00000001.copycon) e7:SetOperation(c00000001.copyop) c:RegisterEffect(e7) end function c00000001.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function c00000001.spfilter1(c,tp) return c:IsCode(100000304) and c:IsAbleToGraveAsCost() and (c:IsControler(tp) or c:IsFaceup()) and Duel.IsExistingMatchingCard(c00000001.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp) end function c00000001.spfilter2(c,tp) return c:IsRace(RACE_REPTILE) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial() and (c:IsControler(tp) or c:IsFaceup()) end function c00000001.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c00000001.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end function c00000001.sprop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(00000001,0)) local g1=Duel.SelectMatchingCard(tp,c00000001.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(00000001,1)) local g2=Duel.SelectMatchingCard(tp,c00000001.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,10,g1:GetFirst(),tp) g1:Merge(g2) Duel.SendtoGrave(g1,REASON_COST) end--this was missing function c00000001.copycon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION end function c00000001.valcheck(e,c) local g=c:GetMaterial() local tc=g:GetFirst() local atk=0 local def=0 while tc do local catk=tc:GetTextAttack() local cdef=tc:GetTextDefence() atk=atk+(catk>=0 and catk or 0) def=def+(cdef>=0 and cdef or 0) tc=g:GetNext() end if e:GetLabel()==1 then e:SetLabel(0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(atk) e1:SetReset(RESET_EVENT+0xff0000) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENCE) e2:SetValue(def) c:RegisterEffect(e2) end end function c00000001.facechk(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(1) end function c00000001.copycon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION end function c00000001.copyop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=c:GetMaterial() local tc=g:GetFirst() while tc do local code=tc:GetOriginalCode() c:CopyEffect(code, nil, 1) tc=g:GetNext() end end |
| | | VB99
Member Title : Legendary Planet Posts : 368 Join date : 2013-11-10
| Subject: Re: I seem to be to stupid... Thu May 01, 2014 3:17 pm | |
| Thanks, outlaw. I'll try it out as soon as I can get the card manager working again^^° |
| | | outlaw1994
Admin
Member Title : Red-Eyes Lord Posts : 797 Join date : 2013-07-09 Age : 30 Location : bundaberg qld australia
| Subject: Re: I seem to be to stupid... Thu May 01, 2014 3:28 pm | |
| lol np atm im investigating coral castle and its giving me a headache so i might rest for a while xD |
| | | Sponsored content
| Subject: Re: I seem to be to stupid... | |
| |
| | | | I seem to be to stupid... | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there are 7 users online :: 0 Registered, 0 Hidden and 7 Guests None Most users ever online was 270 on Sun Apr 11, 2021 4:35 pm |
Latest topics | » Goodbye allMon Aug 08, 2016 7:53 pm by Zenas» [PLEASE READ] [VERY IMPORTANT] MACKPRO REVIVALMon Aug 08, 2016 7:47 pm by Zenas» D.D. Dragons vs KozmosSun Jul 10, 2016 11:02 pm by cane_63106» Where's everyone?!Sat May 28, 2016 2:58 am by cane_63106» Mech Archetype (crappy it be, maybe you guys would like it)Sun May 15, 2016 1:11 pm by barti02» My Assassin ArchetypeSun May 15, 2016 1:10 pm by barti02» SO I have a "NEW ARCHETYPE THE "WolfPack"Sun May 15, 2016 12:35 pm by barti02» Fusion monster doesn't appear in extra deck? Sat Apr 30, 2016 9:02 pm by Marc1» Mackpro update 10/6/2015Sat Apr 02, 2016 6:36 pm by Hulkty» Bionicle Cards AKA Japanese Children's Cardgames on Swedish Toy RobotsSun Mar 06, 2016 9:37 am by Utso |
|