By misterrox, 22 de jan. de 2012 in Archived
info
Group: Campones
Joined: 30/10/10
Posts: 15
Reputation: +1
Tibia Character: Ethafa Darkan
É o seguinte:
O Sistema é feito por actions, q qd dou use no item ganho dias de vip
script:
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, 13540, time) local quantity = math.floor((getPlayerStorageValue(cid, 13540) - 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
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, 13540, time)
local quantity = math.floor((getPlayerStorageValue(cid, 13540) - 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)
return TRUE
Ele Funciona direitinho mas gostaria q qd o player desse use no item ele [Vip] no nome e depois de 5 segundos ele seja kikado para mudança de nick.
Ajuda Plx!
Vale REP++
Group: Visconde
Joined: 24/01/11
Posts: 254
Reputation: +29
Tibia Character: Zemekiz
Cara O DEMONBHOLDER FEIZ 1 TUTORIAL DISSU + N LEMBRO O LINK + NAO SEI SE FUNCIONA EU USO ESSE SYSTEM TBM
info
Group: Campones
Joined: 30/10/10
Posts: 15
Reputation: +1
Tibia Character: Ethafa Darkan
É o seguinte:
O Sistema é feito por actions, q qd dou use no item ganho dias de vip
script:
Ele Funciona direitinho mas gostaria q qd o player desse use no item ele [Vip] no nome e depois de 5 segundos ele seja kikado para mudança de nick.
Ajuda Plx!
Vale REP++