Ir para conteúdo

Posts Recomendados

alguem poderia colocar para esses 3 scripts adicionarem [VIP] Antes do nome das pessoas que usarem-os? e pra quando acabar a vip o [VIP] Sumir!

 

os scripts sao esses:

 

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, 88888)
local timenow = os.time()

if getPlayerStorageValue(cid, 88888) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP2 no seu character.")
setPlayerStorageValue(cid, 88888, time)
local quantity = math.floor((getPlayerStorageValue(cid, 88888) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP2 restantes.")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end

return TRUE
end

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local config={
removeOnUse = "yes" -- remover quando usar ("yes" or "no")
}

local days = 60 -- dias que serão adicionados
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 88888)
local timenow = os.time()

if getPlayerStorageValue(cid, 88888) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP2 no seu character.")
setPlayerStorageValue(cid, 88888, time)
local quantity = math.floor((getPlayerStorageValue(cid, 88888) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP2 restantes.")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end

return TRUE
end

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local config={
removeOnUse = "yes" -- remover quando usar ("yes" or "no")
}

local days = 15 -- dias que serão adicionados
local daysvalue = days * 24 * 60 * 60
local storageplayer = getPlayerStorageValue(cid, 88888)
local timenow = os.time()

if getPlayerStorageValue(cid, 88888) - os.time() <= 0 then
time = timenow + daysvalue
else
time = storageplayer + daysvalue
end

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP2 no seu character.")
setPlayerStorageValue(cid, 88888, time)
local quantity = math.floor((getPlayerStorageValue(cid, 88888) - timenow)/(24 * 60 * 60))
doSendMagicEffect(getPlayerPosition(cid), math.random(28,30))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP2 restantes.")
if (config.removeOnUse == "yes") then
doRemoveItem(item.uid, 1)
end

return TRUE
end

 

rep ++ hein parece ser facil mas nao sei o que fazer!!

Link para o comentário
https://xtibia.com/forum/topic/166235-actions-colocar-vip-antes-do-nome/
Compartilhar em outros sites

×
×
  • Criar Novo...