Hi there!
This is one of my first scripts so don't flame me
Add this to your actions.xml
Please do tell if my tabbing is correct
I feel it's much cleaner if it's done that way..
It's probably wrong
Sincerely,
Zatjin
This is one of my first scripts so don't flame me

LUA:
local gain = 250
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid = 2153 then
if getPlayerLevel(cid) == 20 then
doPlayerSendTextMessage(cid, 21, "You have gained some health and mana!")
doCreatureAddHealth(cid, gain)
doPlayerAddMana(cid, gain)
else
doPlayerSendCancel(cid, "You dont have the required level")
end
end
return TRUE
end
Add this to your actions.xml
LUA:
<action itemid="2153" event="script" value="diamondoflife.lua"/>

It's probably wrong

Sincerely,
Zatjin
Last edited: