1° você troca o sistema que ta em actions por esse ake:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config={
removeOnUse = "yes" -- remover quando usar ("yes" or "no")
}
local days = 30 -- dias que serão adicionados
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 10000)
local timenow = os.time()
if getPlayerStorageValue(cid, 10000) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 10000, time)
local quantity = math.floor((getPlayerStorageValue(cid, 10000) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end
return TRUE
end
em talkactions crie um arquivo diasvip.lua de adicione isso:
function onSay(cid, words, param) local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 10000) - timenow)/(24 * 60 * 60)) return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no seu character.") end
em talkactions.xml adicione essa linha:
<talkaction words="!vipdays" script="diasvip.lua"/>











info
Grupo: Artesão
Registrado: 15/01/12
Posts: 100
Reputação: +9
Char no Tibia: Leon Of Pandoria
No meu OT Não tem o comando !vipdays.
E eu qria colocar-lo!
se alguem puder Ajudar!
;D
Vlw's
meu VIPsystem se precisar:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config={
removeOnUse = "yes" -- remover quando usar ("yes" or "no")
}
local days = 30 -- dias que serão adicionados
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 13540)
local timenow = os.time()
if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.")
setPlayerStorageValue(cid, 10000, time)
local quantity = math.floor((getPlayerStorageValue(cid, 10000) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end
return TRUE
end