ALTERA SCRIPT

macalo
Por macalo
em Scripts
  • 1
  • 2

macalo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/05/15Posts: 53

BOM EU QUERIA ADAPITAR UM SCRIPT COM AJUDA DE VCS, TIPO QUANDO UM PLAYER TIVER VIP E QUANDO ELE PASSAR NA VIP MOSTRA QUANTOS DIAS FALTA PRA ACABAR OS DIAS VIP DELE.

 

ADAPITAR NESSE SCRIPT

function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "Você não e vip ,para adqrir sua vip fale .!buyvip",
msgWelcome = "Seja Bem Vindo a Area vip."
}

if getPlayerStorageValue(cid, 13500) - 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

rorix

avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 05/01/16Posts: 207

aqui fera

function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "Você não e vip ,para adqrir sua vip fale .!buyvip",
msgWelcome = "Seja Bem Vindo a Area vip."
}

daysvip = getPlayerStorageValue(cid, 13500) - os.time()
if getPlayerStorageValue(cid, 13500) - 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)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem no total: ".. daysvip .." dias vip!")
return TRUE
end

macalo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/05/15Posts: 53

vlw vo testa!


 

aqui fera

function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "Você não e vip ,para adqrir sua vip fale .!buyvip",
msgWelcome = "Seja Bem Vindo a Area vip."
}

daysvip = getPlayerStorageValue(cid, 13500) - os.time()
if getPlayerStorageValue(cid, 13500) - 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)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem no total: ".. daysvip .." dias vip!")
return TRUE
end

MANO TEM SO UM BUG , ELE N TA MOSTRANDO O TATO DE DIAS VIP CERTO QUE FALTA!!

GustavoCastilho

Soberano!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 21/07/13Posts: 143

O que ele mostra?

Work hard to be successful!

 

macalo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/05/15Posts: 53

O que ele mostra?

OS DIAS VIP Q FALTA SO Q N TA MOSTRANDO CERTO!!

GustavoCastilho

Soberano!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 21/07/13Posts: 143

Mostra um valor errado? Explique melhor..

 

#edit

Tente agora, faltou parte da equacao:

function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "Você não e vip ,para adqrir sua vip fale .!buyvip",
msgWelcome = "Seja Bem Vindo a Area vip."
}

local daysvip = math.floor((getPlayerStorageValue(cid, 13500) - os.time())/(24 * 60 * 60))
if getPlayerStorageValue(cid, 13500) - 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)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem no total: ".. daysvip .." dias vip!")
return TRUE
end

Work hard to be successful!

 

macalo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/05/15Posts: 53

Mostra um valor errado? Explique melhor..

SIM MANO TA MOSTRANDO O TANTO DE DIAS VIPP ERRADO, TIPO ERA PRA MOSTRA 14 DIAS VIP MAIS APARECE 11121223 DIAS VIP SACOU .

 

Mostra um valor errado? Explique melhor..

 

#edit

Tente agora, faltou parte da equacao:

function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "Você não e vip ,para adqrir sua vip fale .!buyvip",
msgWelcome = "Seja Bem Vindo a Area vip."
}

daysvip = (getPlayerStorageValue(cid, 13500) - os.time()) / (24*60*60)
if getPlayerStorageValue(cid, 13500) - 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)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem no total: ".. daysvip .." dias vip!")
return TRUE
end

bom apareceu aassim 12:13 Voce tem no total: 14.506678240741 dias vip! , mais era pra aparecer so 14 !!

GustavoCastilho

Soberano!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 21/07/13Posts: 143

Já alterei, tinha esquecido de outra coisa! hahaha

 

Agora deve funcionar!

Work hard to be successful!

 

macalo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/05/15Posts: 53

Já alterei, tinha esquecido de outra coisa! hahaha

 

Agora deve funcionar!

AGORA PAROU DE FUNCIONA, DEU ERRO NA LINHA Q VC EDITOR!

GustavoCastilho

Soberano!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 21/07/13Posts: 143

AGORA PAROU DE FUNCIONA, DEU ERRO NA LINHA Q VC EDITOR!

 

Qual erro?

Work hard to be successful!

 

macalo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/05/15Posts: 53

 

Qual erro?

ESSE ERRO AKI

 

data/movements/scripts/vipsystem.lua:8: attempt to perform arithmetic on global 'timenow' (a nil value)

 

MANO EU TNEHO UM SCRIPT Q FAZ ISSO VO COLOKA AKI EM BAIXO !

 

timenow = os.time()

quantity = math.floor((getPlayerStorageValue(cid,13500) - timenow)/(3600*24))

if isPlayer(cid) then

if quantity > 0 then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você ainda tem ".. quantity .." dia(s) restante(s) de VIP.")

else

GustavoCastilho

Soberano!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 21/07/13Posts: 143

Editei o código de novo, teste ele.

Work hard to be successful!

 

macalo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/05/15Posts: 53

 

aqui fera

function onStepIn(cid, item, position, fromPosition)

local config = {
msgDenied = "Você não e vip ,para adqrir sua vip fale .!buyvip",
msgWelcome = "Seja Bem Vindo a Area vip."
}

daysvip = getPlayerStorageValue(cid, 13500) - os.time()
if getPlayerStorageValue(cid, 13500) - 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)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem no total: ".. daysvip .." dias vip!")
return TRUE
end

MANO N FUNCIONOR TA PARECENDO OS NUMERO ERRADOS DE DIAS VIP , PEGA AKELE SCRIPT Q TE PASSEI E COLOKA NELE!

GustavoCastilho

Soberano!
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 21/07/13Posts: 143

E agora?

Work hard to be successful!

 

macalo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/05/15Posts: 53

MANO RESOLVIR AKI JA ESSA PARADA DE MOSTRA OS DIAS VIP !

 

MAIS AGORA EU QUERIA Q MOSTRA-SE SO PRO PLAYER A MENSAGE EM VERDE NO MEIO DA TELA TEM COMO ?

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você ainda tem ".. quantity .." dia(s) restante(s) de VIP.")
  • 1
  • 2