if itemId == 26555 or itemId == 8982 or itemId == 26457 then --check if it is the ID of the LEGENDARY item
broadcastMessage("The player "..player:getName().." has won "..item:getName().." from the roulette!", MESSAGE_EVENT_ADVANCE) -- if it is a rare item to send in the broadcast
for _, pid in ipairs(getPlayersOnline()) do
if pid ~= cid then
pid:say("The player "..player:getName().." has won "..item:getName().." from the roulette!", TALKTYPE_MONSTER_SAY) -- if not legendary, send a common message
end
end
end
end