• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Medal VIP

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I need a script that you use in the medal of honor and (win) earn 30 days from vip
I use the function:
if vip.hasVip(cid) == TRUE then
 
premium.lua
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local name = getCreatureName(cid)
        if getPlayerLevel(cid) > 1 then --set the level you want to gain premium--
            doPlayerAddPremiumDays(cid, 30)
	    doCreatureSay("Congratulations " ..  name .. "! Now you have Premium for 30 days!")
            doRemoveItem(item.uid, 1)
        else
            doPlayerSendCancel(cid,"You need to be at least level 2 to use this.") --change message to match level required--
        end
return TRUE
end
set item id of Medal.
LUA:
<action itemid="XXXX" event="script" value="premium.lua"/>
 
Last edited:
NOOOOOOOOOOOOOOOOO!!!!
I want a scrirpt, you use of the item, and earn 30 days from vip
MOOOOORE>MOOOORE
I use another script vip
use:
if vip.hasVip(cid) == TRUE then
 
I ALREADY DID THAT -.-

That script you set in actions the itemid of "medal of honour" and make it run that script when i player uses the item it will add 30 days premium
 
is not Premium
add-days.lua
LUA:
function onSay(cid, words, param)
         if vip.hasVip(cid) == TRUE then
            doPlayerSendTextMessage(cid, 22, "Your vip end in "..os.date("%d %B %Y %X ",vip.getVip(cid)))
         else
             if vip.getVip(cid) ~= FALSE then
                doPlayerSendTextMessage(cid, 22, "You're not a vip player. Your vip has finished in "..os.date("%d %B %Y %X ", vip.getVip(cid)).." and now is "..os.date("%d %B %Y %X ", os.time()))
             else
                doPlayerSendTextMessage(cid, 22, "You're not a vip player. You naver has a vip.")
             end
         end
         return TRUE
end
 
isPremium(cid) is the same as vip.hasVip(cid), vip.getVip(cid) and
getPlayerPremiumDays(cid) is the same as this line "os.date("%d %B %Y %X ",vip.getVip(cid))"
 
ve se este funciona

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local name = getCreatureName(cid)
        if getPlayerLevel(cid) > 1 then --set the level you want to gain premium--
            vip.addVip(cid, 30)
            doCreatureSay("Congratulations " ..  name .. "! Now you have Premium for 30 days!")
            doRemoveItem(item.uid, 1)
        else
            doPlayerSendCancel(cid,"You need to be at least level 2 to use this.") --change message to match level required--
        end
return TRUE
end
 
Back
Top