YGOPRO Forum

Welcome Guest! To enable all features please try to register or login.
Options
Go to last post Go to first unread
hakaria84  
#1 Posted : Tuesday, September 03, 2019 3:01:00 PM(UTC)
hakaria84

Rank: Newbie

Joined: 9/2/2015(UTC)
Posts: 13

Thanks: 3 times
So I want to be able to use the ledger of ledgerdemain spell card from cybernetic horizon in ygopro 1.033.A so I can use it against the AI.

At the moment I copied this script from the link below and the spell does banish the 3 cards but they never get added back to my hand, I tried referring to gold sarcophagus and pot of greed but I couldn't figure it out. Would really appreciate a solution. Thanks for reading this.

https://github.com/Fluor...8e7c7ae2fa8a8fad33e9d62e

--予見通帳
function c56256517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,56256517+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c56256517.target)
e1:SetOperation(c56256517.activate)
c:RegisterEffect(e1)
end
function c56256517.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil)==3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
end
function c56256517.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then return end
if ct>3 then ct=3 end
local g=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
if g:IsExists(aux.NOT(aux.FilterBoolFunction(Card.IsLocation,LOCATION_REMOVED)),1,nil) then return end
g:KeepAlive()
local c=e:GetHandler()
c:SetTurnCounter(0)
local fid=c:GetFieldID()
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(56256517,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=g:GetNext()
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c56256517.thcon)
e1:SetOperation(c56256517.thop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
Duel.RegisterEffect(e1,tp)
end
function c56256517.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c56256517.thfilter(c,fid)
return c:GetFlagEffectLabel(56256517)==fid
end
function c56256517.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
local g=e:GetLabelObject()
if g:FilterCount(c56256517.thfilter,nil,e:GetLabel())==3 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
BananaPhone42  
#2 Posted : Friday, September 06, 2019 11:11:00 AM(UTC)
BananaPhone42

Rank: Advanced Member

Joined: 1/16/2018(UTC)
Posts: 146
United States

Thanks: 10 times
Was thanked: 3 time(s) in 3 post(s)
Originally Posted by: hakaria84 Go to Quoted Post
So I want to be able to use the ledger of ledgerdemain spell card from cybernetic horizon in ygopro 1.033.A so I can use it against the AI.

At the moment I copied this script from the link below and the spell does banish the 3 cards but they never get added back to my hand, I tried referring to gold sarcophagus and pot of greed but I couldn't figure it out. Would really appreciate a solution. Thanks for reading this.

https://github.com/Fluor...8e7c7ae2fa8a8fad33e9d62e

--予見通帳
function c56256517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,56256517+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c56256517.target)
e1:SetOperation(c56256517.activate)
c:RegisterEffect(e1)
end
function c56256517.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil)==3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
end
function c56256517.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then return end
if ct>3 then ct=3 end
local g=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
if g:IsExists(aux.NOT(aux.FilterBoolFunction(Card.IsLocation,LOCATION_REMOVED)),1,nil) then return end
g:KeepAlive()
local c=e:GetHandler()
c:SetTurnCounter(0)
local fid=c:GetFieldID()
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(56256517,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=g:GetNext()
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c56256517.thcon)
e1:SetOperation(c56256517.thop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
Duel.RegisterEffect(e1,tp)
end
function c56256517.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c56256517.thfilter(c,fid)
return c:GetFlagEffectLabel(56256517)==fid
end
function c56256517.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
local g=e:GetLabelObject()
if g:FilterCount(c56256517.thfilter,nil,e:GetLabel())==3 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end


Try this:
Code:
--予見通帳
function c56256517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,56256517+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c56256517.target)
e1:SetOperation(c56256517.activate)
c:RegisterEffect(e1)
end
function c56256517.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil)==3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
end
function c56256517.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then return end
if ct>3 then ct=3 end
local g=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
if g:IsExists(aux.NOT(aux.FilterBoolFunction(Card.IsLocation,LOCATION_REMOVED)),1,nil) then return end
g:KeepAlive()
local c=e:GetHandler()
c:SetTurnCounter(0)
local fid=c:GetFieldID()
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(56256517,RESET_EVENT+0x1fe0000,0,1,fid)
tc=g:GetNext()
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c56256517.thcon)
e1:SetOperation(c56256517.thop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
Duel.RegisterEffect(e1,tp)
end
function c56256517.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c56256517.thfilter(c,fid)
return c:GetFlagEffectLabel(56256517)==fid
end
function c56256517.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
local g=e:GetLabelObject()
if g:FilterCount(c56256517.thfilter,nil,e:GetLabel())==3 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
thanks 1 user thanked BananaPhone42 for this useful post.
hakaria84  
#3 Posted : Monday, September 09, 2019 2:50:41 AM(UTC)
hakaria84

Rank: Newbie

Joined: 9/2/2015(UTC)
Posts: 13

Thanks: 3 times
Originally Posted by: BananaPhone42 Go to Quoted Post
Originally Posted by: hakaria84 Go to Quoted Post
So I want to be able to use the ledger of ledgerdemain spell card from cybernetic horizon in ygopro 1.033.A so I can use it against the AI.

At the moment I copied this script from the link below and the spell does banish the 3 cards but they never get added back to my hand, I tried referring to gold sarcophagus and pot of greed but I couldn't figure it out. Would really appreciate a solution. Thanks for reading this.

https://github.com/Fluor...8e7c7ae2fa8a8fad33e9d62e

--予見通帳
function c56256517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,56256517+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c56256517.target)
e1:SetOperation(c56256517.activate)
c:RegisterEffect(e1)
end
function c56256517.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil)==3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
end
function c56256517.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then return end
if ct>3 then ct=3 end
local g=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
if g:IsExists(aux.NOT(aux.FilterBoolFunction(Card.IsLocation,LOCATION_REMOVED)),1,nil) then return end
g:KeepAlive()
local c=e:GetHandler()
c:SetTurnCounter(0)
local fid=c:GetFieldID()
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(56256517,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=g:GetNext()
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c56256517.thcon)
e1:SetOperation(c56256517.thop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
Duel.RegisterEffect(e1,tp)
end
function c56256517.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c56256517.thfilter(c,fid)
return c:GetFlagEffectLabel(56256517)==fid
end
function c56256517.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
local g=e:GetLabelObject()
if g:FilterCount(c56256517.thfilter,nil,e:GetLabel())==3 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end


Try this:
Code:
--予見通帳
function c56256517.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,56256517+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c56256517.target)
e1:SetOperation(c56256517.activate)
c:RegisterEffect(e1)
end
function c56256517.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,3)
if chk==0 then return g:FilterCount(Card.IsAbleToRemove,nil)==3 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,3,tp,LOCATION_DECK)
end
function c56256517.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then return end
if ct>3 then ct=3 end
local g=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
if g:IsExists(aux.NOT(aux.FilterBoolFunction(Card.IsLocation,LOCATION_REMOVED)),1,nil) then return end
g:KeepAlive()
local c=e:GetHandler()
c:SetTurnCounter(0)
local fid=c:GetFieldID()
local tc=g:GetFirst()
while tc do
tc:RegisterFlagEffect(56256517,RESET_EVENT+0x1fe0000,0,1,fid)
tc=g:GetNext()
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c56256517.thcon)
e1:SetOperation(c56256517.thop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
Duel.RegisterEffect(e1,tp)
end
function c56256517.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c56256517.thfilter(c,fid)
return c:GetFlagEffectLabel(56256517)==fid
end
function c56256517.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
local g=e:GetLabelObject()
if g:FilterCount(c56256517.thfilter,nil,e:GetLabel())==3 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end



Thanks heaps BananaPhone42! Works like a charm. :)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error