DeusEverto
2015-03-06T09:28:40Z
So I made some cards recently and I found out you can make scripts for them, and I'm trying 1 card I made which is probably really hard to do since it has 5 effects. I've been trying to see if I'm understanding it and going in the right direction, but I'm not sure yet. Was wondering if anybody can tell me if I'm even doing this right...

http://i.imgur.com/h2FajKE.jpg 

This is what I have so far(once again...it's probably all messed up):


Quote:

--Hazy Rebirth
function c81632349.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c81632349.cost)
e1:SetTarget(c81632349.target)
e1:SetOperation(c81632349.activate)
c:RegisterEffect(e1)
end
--noattack
local e2=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(81632349,RESET_EVENT+0x1fe0000,0,1)
tc:CompleteProcedure()
--nosppsummon
local e23=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c81632349.splimit)
c:RegisterEffect(e3)
--attachxyz
local e4+Effect.CreateEffect(c)
--oneperturn
local e5+Effect.CreateEffect(c)
function c81632349.filter(c,e,tp)
return c:IsSetCard(0x107d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c81632349.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c81632349.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c81632349.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c81632349.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,2,2,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end



If it's too difficult to do, I'd at least appreciate a push in the right direction.

(EDIT: Cannot activate card. Only lets me set it. Probably forgot to search on how to activate Spells.)
File Attachment(s):
c81632349.lua (2kb) downloaded 1 time(s).

You cannot view/download attachments. Try to login or register.
Anonym003
2015-03-06T11:07:22Z
I would highly recommend you to look at the tutorial it's great for beginners. As for your card, I think it's a bit too much for starters, but if you still want to do it then you can copy paste the effects of similar cards. If you have questions just ask them and I will try to help.
DeusEverto
2015-03-06T22:09:44Z
Originally Posted by: Anonym003 

I would highly recommend you to look at the tutorial it's great for beginners. As for your card, I think it's a bit too much for starters, but if you still want to do it then you can copy paste the effects of similar cards. If you have questions just ask them and I will try to help.



I've been following the tutorial but this card is much different then the one shown. I was copying the effrcts of other csrds but the formatting, and finding which part starts and ends is the part confusing me. I took the Special summon 2 Hazy Flames from the deck from Peryton, tried to take the not-attacking from Instant Fusion and the "can't special summon except for Fire types from I think Hydra", but it won't even let me activate it, so I'm probably missing the "activate" effect.

Overall I just need to know where to start copying and where to stop, and if any of the parts I have now looks right at all.
Anonym003
2015-03-06T23:03:58Z
Ok can you send me your script ? I want to see what you did there that you can't even activate. You can send me that .lua . It's easier for me to look at.
DeusEverto
2015-03-07T07:03:27Z
Originally Posted by: Anonym003 

Ok can you send me your script ? I want to see what you did there that you can't even activate. You can send me that .lua . It's easier for me to look at.



I attached it to the main post. I'm sure it's all messed up, so I guess I'm gonna take my time trying to learn with the next card.
Anonym003
2015-03-07T09:49:35Z
Ok your script was so messed up. I had to change a lot. Here is the script.
File Attachment(s):
c81632349.lua (4kb) downloaded 1 time(s).

You cannot view/download attachments. Try to login or register.
DeusEverto
2015-03-07T10:16:46Z
Originally Posted by: Anonym003 

Ok your script was so messed up. I had to change a lot. Here is the script.



Oh my God, thank you! I knew it'd be really bad. I should try to study what you did, but some of the terms are confusing to me. Any ideas on where to learn? I'm making an Archetype support set and I don't want to bug people with requests because I know it can be frustrating.
Michael Lawrence Dee
2015-03-07T10:18:57Z
All the basics are covered here but like the title, it's incomplete.
http://www.ygopro.co/For...al--CURRENTLY-INCOMPLETE 
Feel free to ask questions though.
Now this is how I play: