PART 3
Disclaimer; If the card your adding is a Normal Monster you can skip this step as they do not have Lua files.
Now Lua scripting is the hardest part. Open Lua Edit 2010, go to file in the top right < New < File and make a new Lua Script, or if your using Notepad or some other program just start with a blank file.
Now type -- and then the card name right after that on the first line.
Press space and type: function cXXXXXXXX.initial_effect(c) and all 8 Xs are what the Id number.
It should now look like this:
--Wisel Attack 5
function c11111111.initial_effect(c)
Press space and now type --X where the X is the type of effect it is;
Examples- defup, atkup, remove, spsummon, etc
You may want to compare other Lua files from other cards to see what you might need to put here.
So it will not look like
--Wisel Attack 5
function c11111111.initial_effect(c)
c:EnableReviveLimit()
--special summon
The c:EnableReviveLimit() is there because it has a specific Special Summon condition.
For every effect line it has we will need to put another --X.
Now press space and type:
local e1=Effect.CreateEffect(c)
This is what we type everytime we want to input a new effect, order of effects go by the eS, For example e1, e2, e3.
Now press space and type:
e1:SetType(X)
The X is the type of area it will be affecting, you can open the constant.lua file in your script folder in your Ygopro folder to see types of effects.
Since this effect will be tributing a monster from the field this will be;
e1:SetType(EFFECT_TYPE_FIELD)
Then press space and type:
e1:SetCode(X)
The X is basically the procedure this effect will follow so since it's based on how it's summon it's:
e1:SetCode(EFFECT_SPSUMMON_PROC)
Press space and type:
e1:SetProperty(X)
This is the property the effect follows, since we don't want copied for ruling issues it's:
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
Press space and type:
e1:SetRange(X)
This is where the effect is being activated from, since you have to tribute a Wisel Attack 3 and summmon it from your hand it's:
e1:SetRange(LOCATION_HAND)
Press Space and type:
e1:SetCondition(cXXXXXXXX.spcon)
e1:SetOperation(cXXXXXXXX.spop)
These are the strings that say what the condition is and the operation that follows, so you have to control a Wisel Attack 3 and it's tributable and if that happens the operation is it's summoned from the set range being zone.
The Xs are the id number so the condition and operation aren't confused with other cards.
Now press Space and type:
c:RegisterEffect(e1)
This is to end an effect or the period that seperates effects, remember if it's e2 or e3 then the (eX) will be whatever number of effect that is.
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk Youtube:
http://www.youtube.com/user/jackmoonward