Teria que ter um uid expecifico na tal "estatua"..
info
Grupo: Visconde
Registrado: 13/10/11
Posts: 411
Reputação: +65

info
Grupo: Campones
Registrado: 15/06/10
Posts: 79
Reputação: +2
Gênero: Masculino
Char no Tibia: klauguns

Teria que ter um uid expecifico na tal "estatua"..
sei como mas eu não sei fazer esse uid ...X(
Em data>actions> scripts crie um arquivo.lua e cole isto dentro:
function onUse(cid, item, fromPosition, itemEx, toPosition) local days = 15 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13701) local timenow = os.time() if getPlayerStorageValue(cid, 13701) - 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, 13701, time) local quantity = math.floor((getPlayerStorageValue(cid, 13701) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") return TRUE end
Em actions.xml cole a tag:
<action actionid="XXXX" event="script" value="NOMEDOSEUARQUIVO.lua"/>
Em XXXX você substitui pelo actionid que você colocou na estátua pelo map editor. Vlw, espero ter ajudado.
info
Grupo: Campones
Registrado: 15/06/10
Posts: 79
Reputação: +2
Gênero: Masculino
Char no Tibia: klauguns

Mano ate que da os dias de vip mas não limita
player fica clicando direto e vai ganhando dias de vip a mais sabe como por ela como se fosse quest ?
Aí está:
function onUse(cid, item, fromPosition, itemEx, toPosition) local days = 15 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13701) local timenow = os.time() if getPlayerStorageValue(cid, 13701) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if getPlayerStorageValue(cid, 4398) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13701, time) setPlayerStorageValue(cid, 4398, 1) local quantity = math.floor((getPlayerStorageValue(cid, 13701) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já ganhou os dias de VIP.") return TRUE end end
info
Grupo: Campones
Registrado: 15/06/10
Posts: 79
Reputação: +2
Gênero: Masculino
Char no Tibia: klauguns

Aí está:
function onUse(cid, item, fromPosition, itemEx, toPosition) local days = 15 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13701) local timenow = os.time() if getPlayerStorageValue(cid, 13701) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if getPlayerStorageValue(cid, 4398) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 13701, time) setPlayerStorageValue(cid, 4398, 1) local quantity = math.floor((getPlayerStorageValue(cid, 13701) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já ganhou os dias de VIP.") return TRUE end end
Aê mlk mereceu meu rep + lek funcionou de boa e obrigado por me ajudar...





info
Grupo: Campones
Registrado: 15/06/10
Posts: 79
Reputação: +2
Gênero: Masculino
Char no Tibia: klauguns
Galera eu uso esse systema de vip :
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, 13701)
local timenow = os.time()
if getPlayerStorageValue(cid, 13701) - 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, 13701, time)
local quantity = math.floor((getPlayerStorageValue(cid, 13701) - 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
Arquivo xml
<action itemid="5785" event="script" value="vipmedall.lua" />
Eu poderia trocar o item id="5785" por item id="id da estatua" mas ai todas as estatuas darão os dias de vip queria saber como eu faço pra uma só estatua dar os dias de vip..