function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddExp(cid, 1000*1000*20)
doRemoveItem(item.uid, 1)
end
<action itemid="EXPSCROLLID" script="expScroll.lua" />
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,1800) == 2 then
doCreatureSay(cid, "You have already recieved this power!", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 200 then
doCreatureSay(cid, "You Gained 18 000 000 Experience Points!", TALKTYPE_ORANGE_1)
doPlayerAddExp(cid, 18000000)
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doRemoveItem(item.uid)
setPlayerStorageValue(cid,1800,2)
return TRUE
else
doCreatureSay(cid, "You must be over level 200 to use this scroll", TALKTYPE_ORANGE_1)
end
end
end
<action itemid="7722" script="/exp scroll.lua"/>
Make the code kokokoko provied you into an action script and place it in the action scripts folder. In actions.lua add a line that includes the itemid=Itemyouwanttobethescroll and call the that action script.
Create a file in data/actions/scripts called expScroll.lua
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) doPlayerAddExp(cid, 1000*1000*20) doRemoveItem(item.uid, 1) end
In the bottom of Actions.lua
Code:<action itemid="EXPSCROLLID" script="expScroll.lua" />
Reload actions or restart your server and it should work
Hope it helped.
-Zeke