-- Im sure this will not work, could anyone tell me how to fix this?
Code:
function onEquip(cid, item, slot)
local time = 1000*60*10 -- After 10 mins will the item remove.
local id = 1000 -- Remember to put the id of item.
local msg = "Double Experience"
local msglost = "The amulet its destroyed"
local msg30 = "You have to be level 30 or higher"
if item.itemid == id then
if getPlayerLevel(cid) >= 30 then
doCreatureSay(cid, msg, TALKTYPE_ORANGE_1)
setPlayerExtraExpRate(cid, 2)
doRemoveItem(cid, id, msglost, time)
elseif item.itemid == id then
if getPlayerLevel(cid) <= 30 then
doCreatureSay(cid, msg30, TALKTYPE_ORANGE_1)
end
return FALSE
end
end