Neptera
Member
- Joined
- Mar 3, 2018
- Messages
- 71
- Reaction score
- 17
I am trying to get a simple "add premium days" script to work.
Engine used is Nostalrius 7.72, please help me.
Engine used is Nostalrius 7.72, please help me.
Lua:
function onUse(player, item, fromPosition, target, toPosition)
if not target:isPlayer() then
player:sendTextMessage(MESSAGE_STATUS_SMALL, "Can not use this is, it is not human!")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
return true
end
if target:isPlayer() then
target:sendTextMessage(MESSAGE_STATUS_DEFAULT, "15 days of premium account has been added to your account!")
target:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
target:addPremiumDays(15)
doRemoveItem(item.uid, 1)
end
return true
end