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'm clueless

View previous topic View next topic Go down 
AuthorMessage
TGAP-Trixie

TGAP-Trixie


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

I'm clueless Empty
PostSubject: I'm clueless   I'm clueless Icon_minitimeSat Jun 14, 2014 6:39 am

I'm trying to script a card with the effect: "During your opponent's main phase, you can special summon this card (from your hand). When this card is special summoned, destroy all pendulum summoned monsters on the field." Code in the spoiler

Spoiler:

I get maybe 10 error messages saying 6 parameters are needed. I know little to nothing about what it could possibly need :S.
Back to top Go down
overcold_ice

overcold_ice


Member Title : Overfrost!
Posts : 21
Join date : 2014-06-02

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeMon Jun 16, 2014 1:03 am

Post a pic where everyone can see the error messages, or write them here. It totally helps everyone that gonna helps you, and it helps you because you helped everyone that helped you. In the end, you helped yourself that have helped everyone else that helped you.
Back to top Go down
TGAP-Trixie

TGAP-Trixie


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

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeMon Jun 16, 2014 4:33 am

So much helpfulness.
And actually it was way more than 10... after I scrolled down that is. I don't see the need to post a screen of that but here you go.

Hmmm:

And yes, for as far as I could scroll, they all say the same thing.

It's the script for "During your opponent's main phase" (e1 effect and functions related to it) that's causing that I'm sure. I took all that out, tried to simply use the "When this card is special summoned" effect to destroy pendulum monsters. That didn't work... but all I got was the simple "attempt to call error function" at least. (I don't know why that wouldn't work though, I copied it from fossil dyna, changed it from flip to SS success, and the type to destroy as pendulum).
Back to top Go down
outlaw1994

outlaw1994
Admin
Admin

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

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeMon Jun 16, 2014 9:29 am

try this i cant test as i have no pc atm so please test and tell me any errors you get
Code:
function c60000088.initial_effect(c)
   --special summon
   local e1=Effect.CreateEffect(c)
   e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
   e1:SetType(EFFECT_TYPE_QUICK_O)
   e1:SetCode(EVENT_FREE_CHAIN)
   e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
   e1:SetRange(LOCATION_HAND)
   e1:SetCondition(c60000088.sccon)
   e1:SetTarget(c60000088.sctarg)
   e1:SetOperation(c60000088.scop)
   c:RegisterEffect(e1)
   --destroy
   local e2=Effect.CreateEffect(c)
   e2:SetCategory(CATEGORY_DESTROY)
   e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
   e2:SetCode(EVENT_SPSUMMON_SUCCESS)
   e2:SetTarget(c60000088.target)
   e2:SetOperation(c60000088.operation)
   c:RegisterEffect(e2)
end
function c60000088.sccon(e,tp,eg,ep,ev,re,r,rp)
   return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
      and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c60000088.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return Duel.IsExistingMatchingCard(e:GetHandler(),tp,LOCATION_HAND,0,1,nil) end
   Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c60000088.scop(e,tp,eg,ep,ev,re,r,rp)
   Duel.SpecialSummon(tp,e:GetHandler(),REASON_EFFECT)
end
function c60000088.filter(c)
   return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)~=0
end
function c60000088.target(e,tp,eg,ep,ev,re,r,rp,chk)
   if chk==0 then return true end
   local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
   Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c60000088.operation(e,tp,eg,ep,ev,re,r,rp)
   local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
   Duel.Destroy(g,REASON_EFFECT)
end
Back to top Go down
https://mackpro.forumotion.com
overcold_ice

overcold_ice


Member Title : Overfrost!
Posts : 21
Join date : 2014-06-02

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeMon Jun 16, 2014 5:14 pm

this:
Code:

  if g:GetCount()>0 then
      Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
      local sg=g:Select(tp,1,1,nil)
      Duel.SpecialSummon(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
      --Duel.SpecialSummon(tp,sg:GetFirst(),c) <- requires 6 parameters
  end

You helped yourself by helping me that help you. So, keep helping yourself by helping those that wants to help you. (I helped myself by repeatedly saying helps, and it helps you afterwards; which actually helped myself also, and helped you in the end.)

I love those helps. xD
So helpful.
Back to top Go down
TGAP-Trixie

TGAP-Trixie


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

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeTue Jun 17, 2014 2:10 am

OK outlaw, will do.

I should've mentioned I copied the SS during opp's main phase bit from formula synchron I suppose. I don't know if maybe some of what I copied got cut off, in any case, if outlaw's doesn't work I'll arbitrarily put in paramaters as if I know what any of them do xD.

EDIT: @Outlaw
Still an error at line 27
[Script Error:] [string "./script/60000088.lua]:27 Paramater 1 should be "function". 
^ whatever the problem, this is what's not letting it be summoned during the opps turn I would say.

And when I special summoned it from the GY with monster reborn, it destroyed itself as well as the pendulum summoned monsters. As entertaining as that was, I do want it to stay on the field to punish players using pendulum monsters Razz.

Final edit: It's actually just destroying all special summoned monsters, regardless of it checking for pendulum summoned monsters. I just tried this against hieratics and it destroyed su. Don't worry about that for now, let's just try to figure out the special summon on opps turn.
Back to top Go down
outlaw1994

outlaw1994
Admin
Admin

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

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeTue Jun 17, 2014 8:58 pm

try this should stop that error
Code:
function c60000088.initial_effect(c)
  --special summon
  local e1=Effect.CreateEffect(c)
  e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  e1:SetType(EFFECT_TYPE_QUICK_O)
  e1:SetCode(EVENT_FREE_CHAIN)
  e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
  e1:SetRange(LOCATION_HAND)
  e1:SetCondition(c60000088.sccon)
  e1:SetTarget(c60000088.sctarg)
  e1:SetOperation(c60000088.scop)
  c:RegisterEffect(e1)
  --destroy
  local e2=Effect.CreateEffect(c)
  e2:SetCategory(CATEGORY_DESTROY)
  e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
  e2:SetCode(EVENT_SPSUMMON_SUCCESS)
  e2:SetTarget(c60000088.target)
  e2:SetOperation(c60000088.operation)
  c:RegisterEffect(e2)
end
function c60000088.sccon(e,tp,eg,ep,ev,re,r,rp)
  return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
      and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c60000088.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
  if chk==0 then return true end
  Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c60000088.scop(e,tp,eg,ep,ev,re,r,rp)
  Duel.SpecialSummon(tp,e:GetHandler(),REASON_EFFECT)
end
function c60000088.filter(c)
  return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)~=0
end
function c60000088.target(e,tp,eg,ep,ev,re,r,rp,chk)
  if chk==0 then return true end
  local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
  Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c60000088.operation(e,tp,eg,ep,ev,re,r,rp)
  local g=Duel.GetMatchingGroup(c60000088.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
  Duel.Destroy(g,REASON_EFFECT)
end
Back to top Go down
https://mackpro.forumotion.com
TGAP-Trixie

TGAP-Trixie


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

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeWed Jun 18, 2014 4:04 am

Error at line 31 and 7 paramaters are needed

That would be the middle line in this
function c60000088.scop(e,tp,eg,ep,ev,re,r,rp)
  Duel.SpecialSummon(tp,e:GetHandler(),REASON_EFFECT)
end

It doesn't special summon itself but the option to attempt to now exists. I'll be looking at other cards that can special summon themselves due to their own effect to see if I can't fix this on my own.

EDIT: OK this was quick. I used this in place of the line that gave me an error.

Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)

Obviously the destroying all special summoned monsters bit still happens but I blame that on percival for treating pendulum summons as special summons Razz.
Back to top Go down
outlaw1994

outlaw1994
Admin
Admin

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

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeWed Jun 18, 2014 5:57 am

Lol I will look into pendulum summon part when I get my PC back
Back to top Go down
https://mackpro.forumotion.com
TGAP-Trixie

TGAP-Trixie


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

I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitimeThu Jun 19, 2014 2:36 am

Maybe in the next update the answer will be there, or it'll be fixed so the system checks for monsters special summoned through a pendulum summon, rather than categorizing both as the same thing.
Back to top Go down
Sponsored content





I'm clueless Empty
PostSubject: Re: I'm clueless   I'm clueless Icon_minitime

Back to top Go down
 

I'm clueless

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

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