Activity
Member
- Joined
- Apr 7, 2016
- Messages
- 182
- Reaction score
- 22
Hello OTLanders, I'd like to post a script that may help someone with it, I know that script like this already exist in the forum, this can be used once per character ONLY.
This is Free Vip too if you are using Kekox VIP system it will work good with you.
TFS 0.3.*
TESTED on TFS 0.4
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 6945) == -1 then
if getPlayerPremiumDays(cid) < 365 then
doPlayerAddPremiumDays(cid, 3)
doCreatureSay(cid, "Premium")
doPlayerPopupFYI(cid, "We have added 3 free premium days to your account!\nEnjoy it!.")
doBroadcastMessage("Premium: Congratulation "..getCreatureName(cid).." has added 3 Free Premium days to his account.")
doRemoveItem(item.uid)
setPlayerStorageValue(cid, 6945, 1)
else
doPlayerSendCancel(cid, "You can only have 1 year of premium account or less.")
end
else
doPlayerSendCancel(cid, "You already used free Premium, sorry you can\'t use it again, it's only once per character.")
end
return true
end
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 64745) == -1 then
if getPlayerVipDays(cid) < 365 then
doAddVipDays(cid, 3)
doCreatureSay(cid, "VIP")
doPlayerPopupFYI(cid, "We have added 3 free vip days to your account!\nEnjoy it!.")
doBroadcastMessage("VIP : Congratulation "..getCreatureName(cid).." has added 3 Free VIP days to his account.")
doRemoveItem(item.uid)
setPlayerStorageValue(cid, 64745, 1)
else
doPlayerSendCancel(cid, "You can only have 1 year of vip account or less.")
end
else
doPlayerSendCancel(cid, "You already used free VIP, sorry you can\'t use it again, it's only once per character.")
end
return true
end
TESTED on TFS 0.4