Hello I have various problems, but the first one is, how do I edit this into just giving the ML to Mages, vocations (1,2)
I can't get it to work even with getplayervocation, any help please
Code:
local exp = 4000 -- Quanto de ML o player irá ganhar?!
local exhaust = 120 -- Tempo para o player poder usar o item novamente! (tempo em segundos)
local text = "Magic Power Up!"
local storage = 9811 -- Não mexa aqui.
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(isInArray({1, 2}, getPlayerVocation(cid)))then
doPlayerAddMagLevel(cid, exp)
doCreatureSay(cid, text, 19)
doSendMagicEffect(getCreaturePosition(cid), 14)
doRemoveItem(cid, item.uid, 1)
setPlayerStorageValue(cid, storage, os.time()+exhaust)
else
doPlayerSendCancel(cid, "Sorry, you only can again use this item after "..exhaust.." seconds.")
end
return TRUE
end
I can't get it to work even with getplayervocation, any help please