Packet
Target 1 face-up non-Link Monster you control and 1 Link Monster your opponent controls; switch control of those monsters. You can only activate 1 "Packet Swap" per turn.
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_CONTROL)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.filter1(c)
	local tp = c:GetControler()
	return c:IsFaceup() and not c:IsType(TYPE_LINK) and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp, c, tp, LOCATION_REASON_CONTROL) > 0
end
function s.filter2(c)
	local tp = c:GetControler()
	return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp, c, tp, LOCATION_REASON_CONTROL) > 0
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return false
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter1, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingTarget(s.filter2, tp, 0, LOCATION_MZONE, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONTROL)
	local g1 = Duel.SelectTarget(tp, s.filter1, tp, LOCATION_MZONE, 0, 1, 1, nil)
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONTROL)
	local g2 = Duel.SelectTarget(tp, s.filter2, tp, 0, LOCATION_MZONE, 1, 1, nil)
	g1:Merge(g2)
	Duel.SetOperationInfo(0, CATEGORY_CONTROL, g1, 2, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
	local a = g:GetFirst()
	local b = g:GetNext()
	if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then
		Duel.SwapControl(a, b)
	end
end


Packet
Target 1 face-up non-Link Monster you control and 1 Link Monster your opponent controls; switch control of those monsters. You can only activate 1 "Packet Swap" per turn.
-- Packet
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_CONTROL)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.filter1(c)
	local tp = c:GetControler()
	return c:IsFaceup() and not c:IsType(TYPE_LINK) and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp, c, tp, LOCATION_REASON_CONTROL) > 0
end
function s.filter2(c)
	local tp = c:GetControler()
	return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp, c, tp, LOCATION_REASON_CONTROL) > 0
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return false
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter1, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingTarget(s.filter2, tp, 0, LOCATION_MZONE, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONTROL)
	local g1 = Duel.SelectTarget(tp, s.filter1, tp, LOCATION_MZONE, 0, 1, 1, nil)
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONTROL)
	local g2 = Duel.SelectTarget(tp, s.filter2, tp, 0, LOCATION_MZONE, 1, 1, nil)
	g1:Merge(g2)
	Duel.SetOperationInfo(0, CATEGORY_CONTROL, g1, 2, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
	local a = g:GetFirst()
	local b = g:GetNext()
	if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then
		Duel.SwapControl(a, b)
	end
end

