PO
pedido

Apenas Vip Kidray Poder Usar

Por popohat7, 07 de out. de 2012 em Scripts

apenas vip kidray usar
otserv
tibia
script
5
1.1k
popohat7P
07 de outubro de 2012 às 19:33

Gente, algem pode colocar esse script para apenas players vip(kidray) usarem ?

 

function onSay(cid, words, param)
local waittime = 20 -- Tempo de exhaustion
local storage = 5560
local pos = getCreaturePosition(cid)
local from = {x=pos.x, y=pos.y, z=pos.z}
local to = {x = 1136, y = 242, z = 7} -- Onde sera teleportado outra dimensao
local area1 = {x = 1134, y = 240, z = 7} -- Ponta de cima na esquerda
local area2 = {x = 1138, y = 244, z = 7} -- Ponta de baixo na direita
local ppos = getCreaturePosition(cid)
local level = 100 -- Level necessário
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.")
return true
end
function back(cid)
if isInArea(getCreaturePosition(cid), area1, area2) then
doTeleportThing(cid, from)
end
end
function go(cid)
if isInArea(getCreaturePosition(cid), from, from) then
doTeleportThing(cid, to)
end
end
if exhaustion.check(cid, storage) == false then
for _, pid in ipairs(getPlayersOnline()) do
addEvent(back, 5000, pid) -- Tempo para retornar (1000 = 1 seg)
addEvent(go, 1, pid)
doSendMagicEffect(getCreaturePosition(pid), 63)
doCreatureSay(pid, "Change Dimension!", TALKTYPE_MONSTER) --- Mensagem
addEvent(setPlayerStorageValue, 10000, pid, 1634, -1)
end
exhaustion.set(cid, storage, waittime)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
end
return true
end

Thanks, Grato, Skydevil mdr.gif

Editado Outubro 7 por SkyDevilFire

notle2012N
08 de outubro de 2012 às 09:40

bom não tenho essa vip não posso testa tenta assim

function onSay(cid, words, param)
local waittime = 20 -- Tempo de exhaustion
local storage = 5560
local pos = getCreaturePosition(cid)
local from = {x=pos.x, y=pos.y, z=pos.z}
local to = {x = 1136, y = 242, z = 7} -- Onde sera teleportado outra dimensao
local area1 = {x = 1134, y = 240, z = 7} -- Ponta de cima na esquerda
local area2 = {x = 1138, y = 244, z = 7} -- Ponta de baixo na direita
local ppos = getCreaturePosition(cid)
local level = 100 -- Level necessário
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.")
return true
end
if isVipAccount(cid) and doPlayerSendCancel(cid, "sorry you do not have vip.") then return true end
function back(cid)
if isInArea(getCreaturePosition(cid), area1, area2) then
doTeleportThing(cid, from)
end
end
function go(cid)
if isInArea(getCreaturePosition(cid), from, from) then
doTeleportThing(cid, to)
end
end
if exhaustion.check(cid, storage) == false then
for _, pid in ipairs(getPlayersOnline()) do
addEvent(back, 5000, pid) -- Tempo para retornar (1000 = 1 seg)
addEvent(go, 1, pid)
doSendMagicEffect(getCreaturePosition(pid), 63)
doCreatureSay(pid, "Change Dimension!", TALKTYPE_MONSTER) --- Mensagem
addEvent(setPlayerStorageValue, 10000, pid, 1634, -1)
end
exhaustion.set(cid, storage, waittime)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
end
return true
end

Editado Outubro 8 por notle2012

popohat7P
08 de outubro de 2012 às 22:04

Não funfo man..., Geralmente par esse vip usam a funçao isVip . . . E se tivesse como colocar tambem pra quando o player nao vip usar aparecer "Voce não é vip"

 

NO AGUARDO, GRATO SKYDEVIL.

Editado Outubro 8 por SkyDevilFire

VodkartV
10 de outubro de 2012 às 13:17

o certo seria refazer o comando, mas como estou sem tempo só fiz a edição q vc pediu

 

function onSay(cid, words, param)
local waittime = 20 -- Tempo de exhaustion
local storage = 5560
local pos = getCreaturePosition(cid)
local from = {x=pos.x, y=pos.y, z=pos.z}
local to = {x = 1136, y = 242, z = 7} -- Onde sera teleportado outra dimensao
local area1 = {x = 1134, y = 240, z = 7} -- Ponta de cima na esquerda
local area2 = {x = 1138, y = 244, z = 7} -- Ponta de baixo na direita
local ppos = getCreaturePosition(cid)
local level = 100 -- Level necessário
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.") return true
elseif isVip(cid) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "você precisa ser vip.") return true
end
function back(cid)
if isInArea(getCreaturePosition(cid), area1, area2) then
doTeleportThing(cid, from)
end
end
function go(cid)
if isInArea(getCreaturePosition(cid), from, from) then
doTeleportThing(cid, to)
end
end
if exhaustion.check(cid, storage) == false then
for _, pid in ipairs(getPlayersOnline()) do
addEvent(back, 5000, pid) -- Tempo para retornar (1000 = 1 seg)
addEvent(go, 1, pid)
doSendMagicEffect(getCreaturePosition(pid), 63)
doCreatureSay(pid, "Change Dimension!", TALKTYPE_MONSTER) --- Mensagem
addEvent(setPlayerStorageValue, 10000, pid, 1634, -1)
end
exhaustion.set(cid, storage, waittime)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
end
return true
end

popohat7P
11 de outubro de 2012 às 12:47

Obrigado, Vodkart

 

Dado Rep, devido merecimento.