• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Name of set

Slafesko

New Member
Joined
Jan 6, 2016
Messages
101
Reaction score
2
Is it possible to make a script when i wear full set some words appear on the character like if i wear full crown set something appear on the character >CROWN<

tfs 0.3.6
 
Code:
local t = {
        [CONST_SLOT_ARMOR] = {12603},
        [CONST_SLOT_LEGS] = {12604},
        [CONST_SLOT_FEET] = {12607},
        [CONST_SLOT_RING] = {2123},
        [CONST_SLOT_NECKLACE] = {7888},
}
function onThink()
        for _, cid in ipairs(getPlayersOnline()) do
                local has = true
                for slot, ids in pairs(t) do
                        if not table.find(ids, getPlayerSlotItem(cid, slot).itemid) then
                                has = false
                                break
                        end
                end
                if has then
                        doSendAnimatedText(getThingPos(cid), 'ROYALTY', TEXTCOLOR_YELLOW)
                end
        end
        return true
end
 
Code:
local t = {
        [CONST_SLOT_ARMOR] = {12603},
        [CONST_SLOT_LEGS] = {12604},
        [CONST_SLOT_FEET] = {12607},
        [CONST_SLOT_RING] = {2123},
        [CONST_SLOT_NECKLACE] = {7888},
}
function onThink()
        for _, cid in ipairs(getPlayersOnline()) do
                local has = true
                for slot, ids in pairs(t) do
                        if not table.find(ids, getPlayerSlotItem(cid, slot).itemid) then
                                has = false
                                break
                        end
                end
                if has then
                        doSendAnimatedText(getThingPos(cid), 'ROYALTY', TEXTCOLOR_YELLOW)
                end
        end
        return true
end
Didn't try it yet but thanks.
 
Back
Top