• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to creat an exp scroll?

Bunna

Z-Team
Joined
May 27, 2008
Messages
131
Reaction score
0
Location
Sweden
How does i creat an exp scroll, one that giving 10 million exp and one with 20 million exp?

Thanks for responding :)
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)

doPlayerAddExp(cid, 1000*1000*20)
doRemoveItem(item.uid, 1)
end
 
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
 
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

heres a more advanced one :p just change how much exp and the level and what it says if you want :)

<action itemid="7722" script="/exp scroll.lua"/>

change the itemid if you need to :) and change the script="exp scroll.lua part to where it is
 
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

Thanks! I was so stupid haha :D
 
Back
Top