----------------------------------------------------------------------
-- A script made by Clary 100%
---------------------------- Start Config ----------------------------
local COUNT = 3 -- How many items you get.
local ITEMID = 2160 -- Item sold id.
local PDAYS = 1 -- The premium days lost on use.
----------------------------- End Config -----------------------------
function onUse(cid, item, fromPos, item2, toPos)
if item.actionid == 29002 and item.itemid == 1945 and getPlayerPremiumDays(cid) >= PDAYS then
doPlayerAddItem(cid, ITEMID, COUNT)
doPlayerRemovePremiumDays(cid, PDAYS)
doSendMagicEffect(getPlayerPosition(cid), 55) doPlayerSendTextMessage(cid, 22, "You have buy 30k for 3 premium account days.")
doTransformItem(item.uid,1946)
else
doPlayerSendTextMessage(cid, 22, "You dont have enough premium days left.")
doSendMagicEffect(getPlayerPosition(cid),POFF)
end
else
doTransformItem(item.uid, 1945)
end
end