Real Vandta
Member
How to make this script people can use it 1 more after using and you will cannot use again how? help me please
local storage = 4595 -- point left storage
local level = 1
function onUse(cid, item, frompos, item2, topos)
if not(isPlayer(cid)) then return true end
if getPlayerLevel(cid) >= level then
doCreatureSetStorage(cid, storage, math.max(0, getCreatureStorage(cid, storage)) + 10)
doSendMagicEffect(getPlayerPosition(cid), 14)
doPlayerPopupFYI(cid, "You have added 10 talents points to your account.")
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid,22, "Sorry, but you need to be level "..level.."+ to enter here")
doSendMagicEffect(getThingPos(cid),10)
doTeleportThing(cid, fromPosition)
end
return true
end
local storage = 4595 -- point left storage
local level = 1
function onUse(cid, item, frompos, item2, topos)
if not(isPlayer(cid)) then return true end
if getPlayerLevel(cid) >= level then
doCreatureSetStorage(cid, storage, math.max(0, getCreatureStorage(cid, storage)) + 10)
doSendMagicEffect(getPlayerPosition(cid), 14)
doPlayerPopupFYI(cid, "You have added 10 talents points to your account.")
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid,22, "Sorry, but you need to be level "..level.."+ to enter here")
doSendMagicEffect(getThingPos(cid),10)
doTeleportThing(cid, fromPosition)
end
return true
end