Vodkart
Talkactions...
function onSay(cid, words, param) local price = 1000000 if doPlayerRemoveMoney(cid, price) == TRUE then local days = 15 local s = 29000 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, s) local timenow = os.time() if getPlayerStorageValue(cid, s) - 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, s, time) local quantity = math.floor((getPlayerStorageValue(cid, s) - timenow)/(24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de "..price.." gp's para colocar vip.") end return TRUE end
edita nessa parte:
local days = 15 -- dias de vip que irão ganhar
local s = 29000 -- é a storage do seu vip cso for outra só mudar o valor ai
agora em data/movements
movements/script
tileforvip.lua
function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Vc nao e vip , comprepelo comando !buyvip.", msgWelcome = "Seja Bem Vindo a Area vip." } local s = 29000 if getPlayerStorageValue(cid, s) - os.time() <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end
movements.xml
<movevent type="StepIn" uniqueid="13850" event="script" value="tileforvip.lua"/>





info
Grupo: Barão
Registrado: 12/05/09
Posts: 237
Reputação: +21
Char no Tibia: Sir Slazer
queria aquele sistema vip igual do baiak...
!buyvip
esse ai !
REP+ pra quem me ajudar.