• 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 0.X [Tfs 0.3.6] How can I put a max level for usage of an item

zDeluxe

Member
Joined
Sep 29, 2012
Messages
18
Reaction score
11
Sorry for the wording of the request, essentially what I am looking to do, is disable a character from being able to use an item past a certain level.

An example would be a character is now level 50, so cannot equip an AOL anymore.
 
You can try with this script dont tested, send me any error for fix it.
Lua:
function onEquip(cid, item, slot)
    if getPlayerLevel(cid) >= 50 then
        doPlayerSendCancel(cid, 'You cannot equip AOL above level 50+.')
        return false
    end
    return true
end
 
You can try with this script dont tested, send me any error for fix it.
Lua:
function onEquip(cid, item, slot)
    if getPlayerLevel(cid) >= 50 then
        doPlayerSendCancel(cid, 'You cannot equip AOL above level 50+.')
        return false
    end
    return true
end
Thank you, this worked! I apologise for the late reply, I missed the notification.

It does seem however that if you are wearing the AOL at level 50, it will stay on the player and still do its job without losing its charges.
 
Last edited:
It does seem however that if you are wearing the AOL at level 50, it will stay on the player and still do its job without losing its charges.
you can create an OnAdvance event to check when player level from 50 and up and check amulet slot and remove it
 
you can create an OnAdvance event to check when player level from 50 and up and check amulet slot and remove it
Thank you, would I be looking to do something similar to this?

 
Back
Top