Só alterar o script da gema para este:
local config = {
itemId = 2154,
vocationId_1 = 2, -- Sorcerer
vocationId_2 = 6, -- Master sorcerer
vocationName = "Mage",
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local itemId, amount = config.itemId, 1
local storage, getItemName = 6318964231, getItemNameById(itemId)
if not ((getPlayerVocation(cid) == config.vocationId_1) or (getPlayerVocation(cid) == config.vocationId_2)) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE,
"Para usar a gema voce precisa ser um " .. config.vocationName)
return true
end
if getPlayerStorageValue(cid, storage) > 0 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce ja usou uma " .. getItemName)
return true
end
doRemoveItem(item.uid, amount)
setPlayerStorageValue(cid, storage, 1)
return true
end
E criar um novo creaturescript para login, com esse algorítmo:
local text = "´ . ,", ". ´ ,", "` . ,", ", ` ."
local function effect(cid)
local storage = 6318964231
if isPlayer(cid) then
if getPlayerStorageValue(cid, storage) > 0 then
doCreatureSay(cid, text, TALKTYPE_ORANGE_1)
end
addEvent(effect, 1000, cid)
end
end
function onLogin(cid)
effect(cid)
return true
end