| | Author | Message |
---|
KitoMP
Member Title : Ilune Warrior Posts : 20 Join date : 2014-10-26
| Subject: Some requests Sat Nov 01, 2014 8:37 pm | |
| Hello, one more time. I'd like to see the correct script for these effects, so I can know where am I wrong in my scripts:
"2 Level 4 Mystical monsters Once per turn: You can detach 1 Xyz Material from this card to target 1 face-up Spell/Trap card on the field; destroy it. In addition, if "Mystical Star Night" is face-up on the field: target 1 "Mystical" monster in your Graveyard; shuffle it into your Main Deck."
"You can Ritual Summon this card with "Dragon Horn of Mysticism". When Ritual Summoned: Your opponent discards all Spell and Trap Cards."
"You can discard this card; add 1 "Mystical Star Night" from your Deck to your hand. While this card is face-up on the field, all "Mystical" Monsters must be attacked twice to be destroyed by battle."
The SetCard for this archetype is 0x22b. |
| | | AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Re: Some requests Sun Nov 02, 2014 7:20 pm | |
| Could you please post your scripts. It is quicker to try to correct a current script instead of makeing a completly new one^^' |
| | | KitoMP
Member Title : Ilune Warrior Posts : 20 Join date : 2014-10-26
| Subject: Re: Some requests Mon Nov 03, 2014 1:50 am | |
| Sure. (Ignore the first post) I made three scripts but none of them are working the way they should. Here are their effects and their scripts: "You can Ritual Summon this card with "Dragon Horn of Mysticism". When Ritual Summoned: Your opponent discards all Spell and Trap Cards." - Spoiler:
--Skar the Mystical Blue Dragon function c999900026.initial_effect(c) c:EnableReviveLimit() --discard local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(c999900026.condition) e1:SetTarget(c999900026.target) e1:SetOperation(c999900026.operation) c:RegisterEffect(e1) end function c999900026.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_RITUAL and ep~=tp end function c999900026.filter(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) end function c999900026.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(c999900026.filter,CATEGORY_HANDES,0,0,1-tp,1) end function c999900026.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(c999900026.filter,0,LOCATION_HAND) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_DISCARD+REASON_EFFECT) end end
The Ritual Summon effect doesn't works. Next: "Activate only when a "Mystical" Monster you control is destroyed by battle and sent to the Graveyard. Target 1 monster your opponent controls; destroy it. In addition, if "Mystical Star Night" is face-up on the field: Special Summon your destroyed monster in face-up Defense Position during the End Phase." - Spoiler:
--Mystical Hole function c999900016.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(c999900016.condition) e1:SetTarget(c999900016.target) e1:SetOperation(c999900016.operation) c:RegisterEffect(e1) --Return local e2=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetTarget(c999900016.sptg) e1:SetOperation(c999900016.spop) c:RegisterEffect(e1) end function c999900016.filter(c,tp) return c:IsSetCard(0x22b) and c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp end function c999900016.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c999900016.cfilter,1,nil,tp) end function c999900016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function c999900016.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end function c999900016.cfilter(c,e,tp) return c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c999900016.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=eg:GetFirst() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and eg:IsExists(c999900016.cfilter,1,nil,e,tp) end local dis=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) e:SetLabel(dis) local g=eg:Filter(c999900016.cfilter,nil,e,tp) Duel.SetTargetCard(g) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function c999900016.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) e1:SetOperation(c999900016.disop) e1:SetLabel(e:GetLabel()) e:GetHandler():RegisterEffect(e1) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonComplete() end function c999900016.disop(e,tp) return e:GetLabel() end
Nothings works. I can't activate the trap card. Next one, and I made two different scripts for this one. None of them worked. "2 Level 4 Mystical monsters Once per turn: You can detach 1 Xyz Material from this card to target 1 face-up Spell/Trap card on the field; destroy it. In addition, if "Mystical Star Night" is face-up on the field: target 1 "Mystical" monster in your Graveyard; shuffle it into your Main Deck." Script 1: - Spoiler:
--Irkex the Mystical Lost Son function c999900009.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsSetCard,0x22b),4),2) c:EnableReviveLimit() --destroy s/t local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCost(c999900009.cost) e1:SetTarget(c999900009.target) e1:SetOperation(c999900009.operation) c:RegisterEffect(e1) --back to deck local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetTarget(c999900009.dtarget) e2:SetOperation(c999900009.doperation) c:RegisterEffect(e2) end function c999900009.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c999900009.filter(c) return c:IsFaceup() and c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) end function c999900009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c999900009.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c999900009.filter,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g1=Duel.SelectTarget(tp,c999900009.filter,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function c999900009.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end function c999900009.filter1(c) return c:IsSetCard(0x22b) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() end function c999900009.dtarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c999900009.filter1(chkc) end if chk==0 then return Duel.IsExistingTarget(c999900009.filter1,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g2=Duel.SelectTarget(tp,c999900009.filter1,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) end function c999900009.doperation(e,tp,eg,ep,ev,re,r,rp) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TODECK) if g2:IsRelateToEffect(e) and Duel.IsEnvironment(999900019) then Duel.SendtoDeck(g2,nil,2,REASON_EFFECT) end end
Script 2: - Spoiler:
function c999900009.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsSetCard,0x22b),4),2) c:EnableReviveLimit() --destroy s/t and back local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCost(c999900009.cost) e1:SetTarget(c999900009.target) e1:SetOperation(c999900009.operation) c:RegisterEffect(e1) end function c999900009.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c999900009.filter1(c) return c:IsFaceup() and c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP) end function c999900009.filter2(c) return c:IsSetCard(0x22b) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() end function c999900009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(c999900009.filter1,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g1=Duel.SelectTarget(tp,c999900009.filter,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function c999900009.operation(e,tp,eg,ep,ev,re,r,rp) local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TODECK) if g1:GetFirst():IsRelateToEffect(e) then Duel.Destroy(g1,REASON_EFFECT) end local g2=Duel.SelectTarget(tp,c999900009.filter2,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g2,1,0,0) if g2 and Duel.IsEnvironment(999900019) then Duel.SendtoDeck(g2,nil,2,REASON_EFFECT) end end
For Script 1, the second effect of shuffling into Deck doesn't work. For script 2, nothing works at all. PS: The SetCard is 0x22b |
| | | TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: Some requests Mon Nov 03, 2014 3:34 am | |
| - Mystical Hole:
function cxxxxxxxx.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(cxxxxxxxx.condition) e1:SetTarget(cxxxxxxxx.target) e1:SetOperation(cxxxxxxxx.activate) c:RegisterEffect(e1) end function cxxxxxxxx.cfilter(c,tp) return c:IsSetCard(0x22b) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and bit.band(c:GetReason(),REASON_BATTLE)~=0 end function cxxxxxxxx.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(cxxxxxxxx.cfilter,1,nil,tp) end function cxxxxxxxx.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function cxxxxxxxx.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end
I haven't tried this but it should work. I don't know how to add on the "In addition" effect though so you can't special summon that monster with this script ;s. Hope it's a start though |
| | | KitoMP
Member Title : Ilune Warrior Posts : 20 Join date : 2014-10-26
| Subject: Re: Some requests Mon Nov 03, 2014 6:16 pm | |
| - TGAP-Trixie wrote:
- Mystical Hole:
function cxxxxxxxx.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(cxxxxxxxx.condition) e1:SetTarget(cxxxxxxxx.target) e1:SetOperation(cxxxxxxxx.activate) c:RegisterEffect(e1) end function cxxxxxxxx.cfilter(c,tp) return c:IsSetCard(0x22b) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp and bit.band(c:GetReason(),REASON_BATTLE)~=0 end function cxxxxxxxx.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(cxxxxxxxx.cfilter,1,nil,tp) end function cxxxxxxxx.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function cxxxxxxxx.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end
I haven't tried this but it should work. I don't know how to add on the "In addition" effect though so you can't special summon that monster with this script ;s. Hope it's a start though Thank you very much, Trixie. I changed the terms "In addition" by "then," as I checked other cards in the wiki. I'll see what I can do to add the Special Summon effect. |
| | | AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Re: Some requests Wed Nov 05, 2014 8:28 pm | |
| In your first script you use as part of a condition 'ep~=tp' 'ep' means 'Event Player' so the Owner of an event that happens atm. '~=' means unequals so this doesn't have to be equal with that or that so that the effect can resolve. The construction 'only allow the effect to continue if you aren't allowed to be the owner of that event' (so your script 'ep~=tp') although you ritual summon that card won't work, as the effect isn't allow to continue. Just leave that. ^^
Furthermore you use the 'Category Handes' although it isn't listed as 'SetCategory' , so you have to add the line 'e1:SetCategory(CATEGORY_HANDES)' to your script. I haven't test whether this is all but I hope it works ^^' |
| | | KitoMP
Member Title : Ilune Warrior Posts : 20 Join date : 2014-10-26
| Subject: Re: Some requests Thu Nov 06, 2014 7:30 pm | |
| Okay. I already got that one working now... Thanks.
Any hint for the other two cards? |
| | | Sponsored content
| Subject: Re: Some requests | |
| |
| | | |
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| Who is online? | In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest 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 |
|