• 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!

TFS 1.X+ !sp command help (only use with certain item equipped)

Newani

New Member
Joined
Sep 11, 2024
Messages
6
Reaction score
0
Hello, i need help with this command, I want to make it so that when someone tries to use it with a certain ring (item) on it, it won't let you use it.

I'AM USING TFS 1.2

@Xikini

This is the script command in talkactions.

function onSay(player, words, param)
player:sendSkillPointsWindow()
return false
end
 
Solution
then just remove the not's and you will be fine
and it seems like you did something wrong.

LUA:
    function onSay(player, words, param)
        local ring = player:getSlotItem(CONST_SLOT_RING)
        if ring and ring.itemid == yourRingId then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'text.')
            return false
        end
        player:sendSkillPointsWindow()
        return false
    end
right under function onSay

LUA:
    local ring = player:getSlotItem(CONST_SLOT_RING)
    if not ring and not ring.itemid == yourRingId then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You cannot use this command without the ring of batman.')
        return false
    end
 
dasdasdasd.webp

It has an error but in any case it is not what I need, I need that when one has the ring placed in the slot you cannot use the command, what you gave me was the other way around, your script means that if one does not have it equipped you will not be able to use it-
 
then just remove the not's and you will be fine
and it seems like you did something wrong.

LUA:
    function onSay(player, words, param)
        local ring = player:getSlotItem(CONST_SLOT_RING)
        if ring and ring.itemid == yourRingId then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'text.')
            return false
        end
        player:sendSkillPointsWindow()
        return false
    end
 
Solution
then just remove the not's and you will be fine
and it seems like you did something wrong.

LUA:
    function onSay(player, words, param)
        local ring = player:getSlotItem(CONST_SLOT_RING)
        if ring and ring.itemid == yourRingId then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'text.')
            return false
        end
        player:sendSkillPointsWindow()
        return false
    end
WOOOW AMAZING! THANK YOU,

It works perfect, you saved my life man, I spent like 4 hours and couldn't get it to work! I love you brother, I will give you a lot of reputation, thank you from the bottom of my heart
 
WOOOW AMAZING! THANK YOU,

It works perfect, you saved my life man, I spent like 4 hours and couldn't get it to work! I love you brother, I will give you a lot of reputation, thank you from the bottom of my heart

Np! Make sure to upvote my post! :D
 
Back
Top