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 | .
 

 Help with Number 14: Mental Emperor

View previous topic View next topic Go down 
AuthorMessage
Marc1




Posts : 43
Join date : 2013-08-03

PostSubject: Help with Number 14: Mental Emperor   Tue Dec 10, 2013 7:17 pm

If someone has the time could you script this one for me please?

Number 14: Mental Emperor


Rank 4 Psychic Dark 2300/1200


2 Level 4 monsters
When this card is Xyz summoned: Draw 1 card. If this card destroys a monster, you can detach 1 Xyz Material to inflict 500 points of damage to your opponent life points for each card in your hand.
Back to top Go down
View user profile
VB99

avatar


Member Title : Legendary Planet
Posts : 368
Join date : 2013-11-10

PostSubject: Re: Help with Number 14: Mental Emperor   Wed May 14, 2014 5:47 pm

function cXXXXXXXX.initial_effect(c)
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,4),2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(XXXXXXXX,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(cXXXXXXXX.target)
e1:SetOperation(cXXXXXXXX.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(XXXXXXXX,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(cXXXXXXXX.damcon)
e2:SetCost(cXXXXXXXX.damcost)
e2:SetTarget(cXXXXXXXX.damtg)
e2:SetOperation(cXXXXXXXX.damop)
c:RegisterEffect(e2)
end
function cXXXXXXXX.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cXXXXXXXX.operation(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
function cXXXXXXXX.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER)
end
function cXXXXXXXX.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,XXXXXXXX)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cXXXXXXXX.damtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
local dam=Duel.GetFieldGroupCount(tp,1,LOCATION_HAND)*500
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function cXXXXXXXX.damoperation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,1)*500
Duel.Damage(p,dam,REASON_EFFECT)
end

I hope it is correct, but I'm really not sure ._.
Back to top Go down
View user profile http://www.fanfiktion.de/u/VB99
Marc1




Posts : 43
Join date : 2013-08-03

PostSubject: Re: Help with Number 14: Mental Emperor   Wed May 21, 2014 1:29 am

I'm getting an error at 21. Saying parameter 2 should be function. It won't cause damage when it destroys a monster in battle.

Code:
--Number 14: Mental Emperor
function c1014000000.initial_effect(c)
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,4),2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1014000000,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c1014000000.target)
e1:SetOperation(c1014000000.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1014000000,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(c1014000000.damcon)
e2:SetCost(c1014000000.damcost)
e2:SetTarget(c1014000000.damtg)  (line 21)
e2:SetOperation(c1014000000.damop)
c:RegisterEffect(e2)
end
function c1014000000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c1014000000.operation(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
function c1014000000.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER)
end
function c1014000000.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,1014000000)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1014000000.damtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
local dam=Duel.GetFieldGroupCount(tp,1,LOCATION_HAND)*500
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c1014000000.damoperation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,1)*500
Duel.Damage(p,dam,REASON_EFFECT)
end

Back to top Go down
View user profile
outlaw1994

avatar
Admin
Admin

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

PostSubject: Re: Help with Number 14: Mental Emperor   Wed May 21, 2014 2:01 am

try this

Code:
--Number 14: Mental Emperor
function c1014000000.initial_effect(c)
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,4),2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1014000000,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c1014000000.target)
e1:SetOperation(c1014000000.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1014000000,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(c1014000000.damcon)
e2:SetCost(c1014000000.damcost)
e2:SetTarget(c1014000000.damtg)
e2:SetOperation(c1014000000.damop)
c:RegisterEffect(e2)
end
function c1014000000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c1014000000.operation(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
function c1014000000.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsType(TYPE_MONSTER)
end
function c1014000000.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,1014000000)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1014000000.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
local dam=Duel.GetFieldGroupCount(tp,1,LOCATION_HAND)*500
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c1014000000.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,1)*500
Duel.Damage(p,dam,REASON_EFFECT)
end
Back to top Go down
View user profile http://mackpro.userboard.net
Marc1




Posts : 43
Join date : 2013-08-03

PostSubject: Re: Help with Number 14: Mental Emperor   Wed May 21, 2014 4:13 pm

Hi Outlaw,

There is a slight problem. I have 4 cards in hand and yet it inflicts 190000 damage instead of 2000.
Back to top Go down
View user profile
Sponsored content





PostSubject: Re: Help with Number 14: Mental Emperor   

Back to top Go down
 

Help with Number 14: Mental Emperor

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

 Similar topics

-
» Nolan & Synder: Lets count the number of things wrong with Superman Returns
» crown lynn number one
» Another gallery find ~ number 392 vase
» Light number 7
» Machine Emperor vs Solemn Judgement/Warning

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