i did this based on https://otland.net/threads/check-if-monster-is-summon-tfs-1-2.239004/#post-2311702
need > the part not get skull
and the owner can attack without needing part
need > the part not get skull
and the owner can attack without needing part
local master = target:getMaster()
if target:isMonster() then
if master and master:isPlayer() then
local party, targetParty = self:getParty(), master:getParty()
if (party ~= nil and targetParty ~= nil) and party == targetParty then
return RETURNVALUE_CREATUREBLOCK
else
return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
end
end
end
if target:isMonster() then
if master and master:isPlayer() then
local party, targetParty = self:getParty(), master:getParty()
if (party ~= nil and targetParty ~= nil) and party == targetParty then
return RETURNVALUE_CREATUREBLOCK
else
return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
end
end
end
Last edited: