atvBaryo
2013-02-24T08:06:42Z
When I try activating Ecole de Zone, it can only be Set. Turns out there's no LUA script for it. Can this be fixed?
Tea82
2013-02-24T13:27:06Z
Ecole de zone 500000147 Script lua missing and actually this is the only reason why this card is not working at this moment!![:tongue:] I hear this problem already fixed so it matter of time percy upload the script lua[:smile:] or maybe if i find a little time i going to upload it because i already have this missing script lua!![:laugh:]
atvBaryo
2013-02-24T17:49:16Z
Thanks for the script, but there is another problem. I put the script in the script folder, but I still can't activate Ecole. Am I doing something wrong?
atvBaryo
2013-02-24T20:37:54Z
I tried Ecole in LAN mode, and it seems there is an error with the script. I took a screenshot of it.

http://i.imgur.com/LEe6CSj.jpg 
Jackmoonward
2013-02-24T21:38:13Z
I'll volunteer to help, please paste what it says inside the lua file.

~Jack
Go here to vote for the next cards in Jackpro 1.5:
http://www.tehmadhouse.tk 
Youtube:
http://www.youtube.com/user/jackmoonward
atvBaryo
2013-02-24T21:41:48Z
Originally Posted by: Jackmoonward 

I'll volunteer to help, please paste what it says inside the lua file.

~Jack



Here it is, and thank you. :)


--エコール・ド・ゾーン
function c500000147.initial_effect(c)
	--Activate
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	c:RegisterEffect(e1)
	local e2=Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(500000147,0))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY)
	e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
	e2:SetRange(LOCATION_SZONE)
	e2:SetCode(EVENT_SUMMON_SUCCESS)
	e2:SetTarget(c500000147.target)
	e2:SetOperation(c500000147.activate)
	c:RegisterEffect(e2)
	local e3=e2:Clone()
	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
	c:RegisterEffect(e3)
	--cannot direct attack
	local e4=Effect.CreateEffect(c)
	e4:SetType(EFFECT_TYPE_FIELD)
	e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
	e4:SetRange(LOCATION_SZONE)
	e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
	e4:SetTarget(c500000147.atktarget)
	c:RegisterEffect(e4)
end
function c500000147.atktarget(e,c)	
	return not c:IsType(TYPE_TOKEN)
end
function c500000147.filter(c,tp,ep)
	local tpe=c:GetType()
	return c:IsFaceup() and c:IsDestructable() and bit.band(tpe,TYPE_TOKEN)==0
end
function c500000147.target(e,tp,eg,ep,ev,re,r,rp,chk)
	local tc=eg:GetFirst()
	if chk==0 then return eg:IsExists(c500000147.filter,1,nil,tp) end
	local g=eg:Filter(c500000147.filter,nil,tp)
	Duel.SetTargetCard(eg)
	Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
	Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c500000147.filter3(c,e,tp)
	local tpe=c:GetType()
	return c:IsFaceup() 
	and c:IsDestructable()  and bit.band(tpe,TYPE_TOKEN)==0
end
function c500000147.activate(e,tp,eg,ep,ev,re,r,rp)
	local g=eg:Filter(c500000147.filter3,nil,e,tp)
	if g:GetCount()>0 then
		local atk=g:GetFirst():GetAttack()
		local def=g:GetFirst():GetDefence()
		local con=g:GetFirst():GetControler()
		local pos=g:GetFirst():GetPosition()
		if Duel.Destroy(g,REASON_EFFECT)~=0 then
		local token=Duel.CreateToken(tp,500000148)		
		Duel.SpecialSummonStep(token,0,con,con,false,false,pos)
		local e1=Effect.CreateEffect(e:GetHandler())
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_SET_ATTACK)
		e1:SetValue(atk)
		e1:SetReset(RESET_EVENT+0x1fe0000)
		token:RegisterEffect(e1)
		local e2=e1:Clone()
		e2:SetCode(EFFECT_SET_DEFENCE)
		e2:SetValue(def)
		token:RegisterEffect(e2)
		Duel.SpecialSummonComplete()
	end
end


Percival18
2013-02-24T21:47:26Z
The script at the server has been replaced with this version. An "end" was missing at the bottom of the file.
I can't reproduce the error atvBaryo is getting.


--エコール・ド・ゾーン
function c500000147.initial_effect(c)
	--Activate
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	c:RegisterEffect(e1)
	local e2=Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(500000147,0))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY)
	e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
	e2:SetRange(LOCATION_SZONE)
	e2:SetCode(EVENT_SUMMON_SUCCESS)
	e2:SetTarget(c500000147.target)
	e2:SetOperation(c500000147.activate)
	c:RegisterEffect(e2)
	local e3=e2:Clone()
	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
	c:RegisterEffect(e3)
	--cannot direct attack
	local e4=Effect.CreateEffect(c)
	e4:SetType(EFFECT_TYPE_FIELD)
	e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
	e4:SetRange(LOCATION_SZONE)
	e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
	e4:SetTarget(c500000147.atktarget)
	c:RegisterEffect(e4)
end
function c500000147.atktarget(e,c)	
	return not c:IsType(TYPE_TOKEN)
end
function c500000147.filter(c,tp,ep)
	local tpe=c:GetType()
	return c:IsFaceup() and c:IsDestructable() and bit.band(tpe,TYPE_TOKEN)==0
end
function c500000147.target(e,tp,eg,ep,ev,re,r,rp,chk)
	local tc=eg:GetFirst()
	if chk==0 then return eg:IsExists(c500000147.filter,1,nil,tp) end
	local g=eg:Filter(c500000147.filter,nil,tp)
	Duel.SetTargetCard(eg)
	Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
	Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c500000147.filter3(c,e,tp)
	local tpe=c:GetType()
	return (c:IsFaceup() and c:IsDestructable() and bit.band(tpe,TYPE_TOKEN)==0)
end
function c500000147.activate(e,tp,eg,ep,ev,re,r,rp)
	local g=eg:Filter(c500000147.filter3,nil,e,tp)
	if g:GetCount()>0 then
		local atk=g:GetFirst():GetAttack()
		local def=g:GetFirst():GetDefence()
		local con=g:GetFirst():GetControler()
		local pos=g:GetFirst():GetPosition()
		if Duel.Destroy(g,REASON_EFFECT)~=0 then
			local token=Duel.CreateToken(tp,500000148)		
			Duel.SpecialSummonStep(token,0,con,con,false,false,pos)
			local e1=Effect.CreateEffect(e:GetHandler())
			e1:SetType(EFFECT_TYPE_SINGLE)
			e1:SetCode(EFFECT_SET_ATTACK)
			e1:SetValue(atk)
			e1:SetReset(RESET_EVENT+0x1fe0000)
			token:RegisterEffect(e1)
			local e2=e1:Clone()
			e2:SetCode(EFFECT_SET_DEFENCE)
			e2:SetValue(def)
			token:RegisterEffect(e2)
			Duel.SpecialSummonComplete()
		end
	end
end



atvBaryo
2013-02-24T22:04:01Z
Thank you so much, Percy! It works now. Funny how one little word can cause so much trouble 😛, but that's programming for you.