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
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | .
 

 Problem with scripting

View previous topic View next topic Go down 
Go to page : Previous  1, 2
AuthorMessage
KitoMP




Member Title : Ilune Warrior
Posts : 20
Join date : 2014-10-26

PostSubject: Re: Problem with scripting   Tue Dec 09, 2014 8:20 pm

It worked, Trixie. Thanks. Can you help me with the other two cards?

_________________


ONE DAY SHE WILL SHOW HER TRUE POWER AND WILL BECOME THE QUEEN OF THE WORLD!!!!
Back to top Go down
View user profile
TGAP-Trixie

avatar


Member Title : Trixie does not even...
Posts : 273
Join date : 2014-04-17

PostSubject: Re: Problem with scripting   Thu Dec 11, 2014 10:24 pm

It worked as intended? Great cause I was worried it would make you also discard or smth

For the first 1 I'm pretty sure this doesn't work, aside from the sending it to the gy effect (effect 1). I  also included the other part in case you know what to do from there. I copied front observer, changing it a bit to have it check to see if it's in the gy but it's not the same apparently

function c1.initial_effect(c)
--send to gy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c1.regop)
c:RegisterEffect(e1)
--draw
  local e2=Effect.CreateEffect(c)
  e2:SetCategory(CATEGORY_DRAW)
  e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_TRIGGER_F)
  e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
  e2:SetRange(LOCATION_GRAVE)
  e2:SetCondition(c1.drcon)
  e2:SetCost(c1.drcost)
  e2:SetTarget(c1.drtg)
  e2:SetOperation(c1.drop)
  c:RegisterEffect(e2)
end
function c1.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c1.tgtg)
e1:SetOperation(c1.tgop)
e1:SetReset(RESET_EVENT+0xc6c0000)
c:RegisterEffect(e1)
end
function c1.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c1.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoGrave(c,REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(1,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY,0,2)
end
end
function c1.drcon(e,tp,eg,ep,ev,re,r,rp)
   return e:GetHandler():GetFlagEffect(1)~=0
end
function c1.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c1.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
Back to top Go down
View user profile
 

Problem with scripting

View previous topic View next topic Back to top 
Page 2 of 2Go to page : Previous  1, 2

 Similar topics

-
» possible 4l60e problem?
» I need some help with a Nerf problem..
» power transformer problem - help?
» Don Juan Rehearsal...What's really the problem here?
» Please help me diagnose a running condition problem.

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Custom Card Ruling and Bugs-