-- Vip medal by Kekox
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVipDays(cid) > 365 then
doPlayerSendCancel(cid, "You can only have 1 year of vip account or less.")
else
doAddVipDays(cid, 15)
doCreatureSay(cid, "VIP")
doPlayerPopupFYI(cid, "We have added 15 vip days to your account!\nEnjoy it!.")
doRemoveItem(item.uid)
end
return true
end
registerCreatureEvent(cid, "FimVip")
<event type="login" name="FimVip" event="script" value="vip.lua"/>
--- Script by Kekox
function onTimer()
db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;")
return true
end
<globalevent name="VipDaysRemover" time="00:01" event="script" value="daysremover.lua"/>
--- Script by Kekox
function onLogin(cid)
if getPlayerVipDays(cid) >= 1 then
doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.")
end
return true
end