Untitled

mail@pastecode.io avatar
unknown
plain_text
11 days ago
551 B
1
Indexable
Never
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 0 or item.itemid == 0 then return false end
    toPosition.stackpos = 255
    if item.uid == 0 or item.itemid == 0 then return false end
    toPosition.stackpos = 255

    local nam = getItemName(itemEx.uid)
    local newNam = nam:gsub("%s*%[.*%]","") -- Eliminar cualquier texto entre corchetes en el nombre del item

    doSendMagicEffect(toPosition, 30)
    doItemSetAttribute(itemEx.uid, 'name', newNam)
    doRemoveItem(item.uid, 1)

    return true
end
Leave a Comment