Aardappel
Learning LUA
- Joined
- Dec 24, 2007
- Messages
- 145
- Reaction score
- 0
Hi guys this is one of my first script this is an exp scroll
I did'nt tested cause i can't run servers over here
ill hope it works
and add to actions.xml :
I did'nt tested cause i can't run servers over here
ill hope it works
Code:
function onUse(cid, item, frompos, item2, topos)
local exp = math.random(5000, 10000)
if item.itemid == 6119 then
doPlayerAddExp(cid,exp)
doCreatureSay(cid, "hmm i like exp", 17)
doPlayerRemoveItem(cid,6119,1)
else
doPlayerSendCancel(cid,"Sorry, not possible")
return TRUE
end
and add to actions.xml :
Code:
<action itemid="6119" event="script" value="tools/exp.lua"/>