if getPlayerVocation(cid) == X then
info
Grupo: Campones
Registrado: 02/04/13
Posts: 83
Reputação: +41

if getPlayerVocation(cid) == X then
info
Grupo: Artesão
Registrado: 02/07/13
Posts: 115
Reputação: +12
Char no Tibia: Naoti

não tinha visto o post ai /\ malz.
Editado Fevereiro 2 por Zikaduh
info
Grupo: Visconde
Registrado: 14/01/14
Posts: 276
Reputação: +30
Gênero: Masculino
Char no Tibia: Sonda retro

if getPlayerVocation(cid) == X then
Tem como adicionar nesse script para mim?
info
Grupo: Artesão
Registrado: 02/07/13
Posts: 115
Reputação: +12
Char no Tibia: Naoti

testa ai.
function onSay(cid, words, param)
local waittime = 20 -- Tempo de exhaustion
local storage = 5560
local vocation = X -- aqui voce coloca a vocacao
local pos = getCreaturePosition(cid)
from = {x=pos.x, y=pos.y, z=pos.z}
to = {x = 985, y = 763, z = 7} -- Para onde o teleport levará (players)
monsr1 = {x = 983, y = 758, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr2 = {x = 988, y = 760, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr3 = {x = 988, y = 766, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr4 = {x = 984, y = 768, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr5 = {x = 979, y = 768, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr6 = {x = 982, y = 765, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr7 = {x = 978, y = 760, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr8 = {x = 981, y = 770, z = 7} -- Onde nascera o monstro (Tsukuyomi)
to1 = {x = 981, y = 763, z = 7} -- Para onde o teleport levará (caster)
area1 = {x = 974, y = 756, z = 7} -- Ponta de cima na esquerda na area que o tp leva
area2 = {x = 990, y = 772, z = 7} -- Ponta de baixo na direita na area que o tp leva
level = 100 -- Level necessário
ppos = getCreaturePosition(cid)
pl1 = {x=ppos.x-7, y=ppos.y-5, z=ppos.z}
pl2 = {x=ppos.x+7, y=ppos.y+5, z=ppos.z}
if getPlayerVocation(cid) == vocation then
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.")
return true
end
else
doPlayerSendCancel(cid, "Voce precisa ser "..getPlayerVocation(cid).." para usar essa magia.")
end
function back(cid)
if isInArea(getCreaturePosition(cid), area1, area2) then
doTeleportThing(cid, from)
end
end
function go(cid)
if isInArea(getCreaturePosition(cid), pl1, pl2) then
doCreateMonster('Tsukuyomi', pos)
doTeleportThing(cid, to)
end
end
function gos(cid)
if isInArea(getCreaturePosition(cid), from, from) then
doCreateMonster('Tsukuyomi', pos)
doTeleportThing(cid, to1)
end
end
doCreateMonster('Tsukuyomi2', monsr1)
doCreateMonster('Tsukuyomi2', monsr2)
doCreateMonster('Tsukuyomi2', monsr3)
doCreateMonster('Tsukuyomi2', monsr4)
doCreateMonster('Tsukuyomi2', monsr5)
doCreateMonster('Tsukuyomi2', monsr6)
doCreateMonster('Tsukuyomi2', monsr7)
doCreateMonster('Tsukuyomi2', monsr8)
if exhaustion.check(cid, storage) == false then
for _, pid in ipairs(getPlayersOnline()) do
addEvent(back, 15000, pid) -- Tempo para retornar ao lugar que usou a magia
addEvent(go, 200, pid)
addEvent(gos, 1, pid)
doSendMagicEffect(getCreaturePosition(pid), 63)
doCreatureSay(pid, "TSUKUYOMI!", 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 Fevereiro 2 por Zikaduh
info
Grupo: Campones
Registrado: 02/04/13
Posts: 83
Reputação: +41

function onSay(cid, words, param)
local waittime = 20 -- Tempo de exhaustion
local storage = 5560
local pos = getCreaturePosition(cid)
from = {x=pos.x, y=pos.y, z=pos.z}
to = {x = 985, y = 763, z = 7} -- Para onde o teleport levará (players)
monsr1 = {x = 983, y = 758, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr2 = {x = 988, y = 760, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr3 = {x = 988, y = 766, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr4 = {x = 984, y = 768, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr5 = {x = 979, y = 768, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr6 = {x = 982, y = 765, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr7 = {x = 978, y = 760, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr8 = {x = 981, y = 770, z = 7} -- Onde nascera o monstro (Tsukuyomi)
to1 = {x = 981, y = 763, z = 7} -- Para onde o teleport levará (caster)
area1 = {x = 974, y = 756, z = 7} -- Ponta de cima na esquerda na area que o tp leva
area2 = {x = 990, y = 772, z = 7} -- Ponta de baixo na direita na area que o tp leva
level = 100 -- Level necessário
ppos = getCreaturePosition(cid)
pl1 = {x=ppos.x-7, y=ppos.y-5, z=ppos.z}
pl2 = {x=ppos.x+7, y=ppos.y+5, z=ppos.z}
local vocation_id = {X} -- ID da vocation que ira usar, caso for mais de 1 ID, colocar virgulas.
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.")
return true
end
if not isInArray(vocation_id, getPlayerVocation(cid)) then
doPlayerSendCancel(cid, "Você nao tem a vocation necessaria.")
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), pl1, pl2) then
doCreateMonster('Tsukuyomi', pos)
doTeleportThing(cid, to)
end
end
function gos(cid)
if isInArea(getCreaturePosition(cid), from, from) then
doCreateMonster('Tsukuyomi', pos)
doTeleportThing(cid, to1)
end
end
doCreateMonster('Tsukuyomi2', monsr1)
doCreateMonster('Tsukuyomi2', monsr2)
doCreateMonster('Tsukuyomi2', monsr3)
doCreateMonster('Tsukuyomi2', monsr4)
doCreateMonster('Tsukuyomi2', monsr5)
doCreateMonster('Tsukuyomi2', monsr6)
doCreateMonster('Tsukuyomi2', monsr7)
doCreateMonster('Tsukuyomi2', monsr8)
if exhaustion.check(cid, storage) == false then
for _, pid in ipairs(getPlayersOnline()) do
addEvent(back, 15000, pid) -- Tempo para retornar ao lugar que usou a magia
addEvent(go, 200, pid)
addEvent(gos, 1, pid)
doSendMagicEffect(getCreaturePosition(pid), 63)
doCreatureSay(pid, "TSUKUYOMI!", 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 Fevereiro 2 por MasterDino
info
Grupo: Visconde
Registrado: 14/01/14
Posts: 276
Reputação: +30
Gênero: Masculino
Char no Tibia: Sonda retro

Zikaduh - o seu nao funcionou, ainda assim todas as vocaçoes podem usar a talkaction...
Masterdino - a sua eu colokei la, e nao da nem para usar a talkacton =/
info
Grupo: Campones
Registrado: 02/04/13
Posts: 83
Reputação: +41

editei o post ali encima
info
Grupo: Artesão
Registrado: 02/07/13
Posts: 115
Reputação: +12
Char no Tibia: Naoti

tenta assim
function onSay(cid, words, param)
local waittime = 20 -- Tempo de exhaustion
local storage = 5560
local pos = getCreaturePosition(cid)
from = {x=pos.x, y=pos.y, z=pos.z}
to = {x = 985, y = 763, z = 7} -- Para onde o teleport levará (players)
monsr1 = {x = 983, y = 758, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr2 = {x = 988, y = 760, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr3 = {x = 988, y = 766, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr4 = {x = 984, y = 768, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr5 = {x = 979, y = 768, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr6 = {x = 982, y = 765, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr7 = {x = 978, y = 760, z = 7} -- Onde nascera o monstro (Tsukuyomi)
monsr8 = {x = 981, y = 770, z = 7} -- Onde nascera o monstro (Tsukuyomi)
to1 = {x = 981, y = 763, z = 7} -- Para onde o teleport levará (caster)
area1 = {x = 974, y = 756, z = 7} -- Ponta de cima na esquerda na area que o tp leva
area2 = {x = 990, y = 772, z = 7} -- Ponta de baixo na direita na area que o tp leva
level = 100 -- Level necessário
ppos = getCreaturePosition(cid)
pl1 = {x=ppos.x-7, y=ppos.y-5, z=ppos.z}
pl2 = {x=ppos.x+7, y=ppos.y+5, z=ppos.z}
if getPlayerVocation(cid) == 170 or getPlayerVocation(cid) == 171 or getPlayerayerVocation(cid) == 172 or getPlayerVocation(cid) == 173 or getPlayerVocation(cid) == 174 or getPlayerayerVocation(cid) == 175 orgetPlayerVocation(cid) == 176 or getPlayerVocation(cid) == 177 then
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.")
end
doPlayerSendCancel(cid, "Tsukuyomi.")
else
doPlayerSendCancel(cid, "Voce precisa nao tem a vocacao 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), pl1, pl2) then
doCreateMonster('Tsukuyomi', pos)
doTeleportThing(cid, to)
end
end
function gos(cid)
if isInArea(getCreaturePosition(cid), from, from) then
doCreateMonster('Tsukuyomi', pos)
doTeleportThing(cid, to1)
end
end
doCreateMonster('Tsukuyomi2', monsr1)
doCreateMonster('Tsukuyomi2', monsr2)
doCreateMonster('Tsukuyomi2', monsr3)
doCreateMonster('Tsukuyomi2', monsr4)
doCreateMonster('Tsukuyomi2', monsr5)
doCreateMonster('Tsukuyomi2', monsr6)
doCreateMonster('Tsukuyomi2', monsr7)
doCreateMonster('Tsukuyomi2', monsr8)
if exhaustion.check(cid, storage) == false then
for _, pid in ipairs(getPlayersOnline()) do
addEvent(back, 15000, pid) -- Tempo para retornar ao lugar que usou a magia
addEvent(go, 200, pid)
addEvent(gos, 1, pid)
doSendMagicEffect(getCreaturePosition(pid), 63)
doCreatureSay(pid, "TSUKUYOMI!", 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
info
Grupo: Visconde
Registrado: 14/01/14
Posts: 276
Reputação: +30
Gênero: Masculino
Char no Tibia: Sonda retro

O do amsterdino deu certo, o seu nao zikaduh, rep+ pra ele
info
Grupo: Visconde
Registrado: 14/01/14
Posts: 276
Reputação: +30
Gênero: Masculino
Char no Tibia: Sonda retro
Eae xtibianos, eu to com uma duvida aqui, que se alguem me ajudar vai ser muito útil para mim (y),
Bem eu gostaria de saber como eu faço para que apenas uma vocaçao possa usar "x" talkaction...
rep+ pra qem ajudar!