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
 
HomePortalLatest imagesSearchRegisterLog in

Share
 

 I seem to be to stupid...

View previous topic View next topic Go down 
AuthorMessage
VB99

VB99


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

I seem to be to stupid... Empty
PostSubject: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeWed 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?
Back to top Go down
http://www.fanfiktion.de/u/VB99
AoO

AoO


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeWed 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??
Back to top Go down
VB99

VB99


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeThu May 01, 2014 12:14 am

I used The Tyrant Neptune as a base...
Back to top Go down
http://www.fanfiktion.de/u/VB99
outlaw1994

outlaw1994
Admin
Admin

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

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeThu 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
Back to top Go down
https://mackpro.forumotion.com
VB99

VB99


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeThu 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.
Back to top Go down
http://www.fanfiktion.de/u/VB99
outlaw1994

outlaw1994
Admin
Admin

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

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeThu May 01, 2014 2:43 am

can you post the full code thats erroring
Back to top Go down
https://mackpro.forumotion.com
VB99

VB99


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeThu 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
Back to top Go down
http://www.fanfiktion.de/u/VB99
outlaw1994

outlaw1994
Admin
Admin

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

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeThu 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
Back to top Go down
https://mackpro.forumotion.com
VB99

VB99


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeThu May 01, 2014 3:17 pm

Thanks, outlaw. I'll try it out as soon as I can get the card manager working again^^°
Back to top Go down
http://www.fanfiktion.de/u/VB99
outlaw1994

outlaw1994
Admin
Admin

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

I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitimeThu 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
Back to top Go down
https://mackpro.forumotion.com
Sponsored content





I seem to be to stupid... Empty
PostSubject: Re: I seem to be to stupid...   I seem to be to stupid... Icon_minitime

Back to top Go down
 

I seem to be to stupid...

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» A 'lil stupid card I came up with...
» I seem to be to stupid 2: The stupidity strikes back.

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Requests-