• 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 make items that give levels

grogan

New Member
Joined
Dec 6, 2007
Messages
133
Reaction score
0
How to vI make a item that gives levels, like everytime i eat a cookie i get one level please help thanks. :P
 
Here you go :P
go to data/actions/scripts
copy any file and name it to exp.lua
and paste this in it:
PHP:
function onUse(cid, item, frompos, item2, topos)
	if item.itemid == CANDYID then
	doPlayerAddExp(cid,EXPGIVEN)
	end
end
Edit Candyid to the id of the item that u will use to gain exp
Edit EXPgiven to the exp u gain on use.

and in actions.xml add this:
Code:
        <action actionid="[COLOR="Red"]CANDYID[/COLOR]" script="exp.lua" />
Edit Candyid to the id of the item that u will use to gain exp
 
Didn't work :/

i put:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2688 then
doPlayerAddExp(cid,100000)
end
end
 
change
Code:
        <action actionid="CANDYID" script="exp.lua" />
to
Code:
        <action itemid="CANDYID" script="exp.lua" />
 
Back
Top