achei um errro
tenta esse
function onSay(cid,words,param)
-- Config
templepos = {x=843, y=945, z=7}
vocationid = 2
savepos = getPlayerPosition(cid)
telepos = {x=844, y=946, z=8}
masterpos = getPlayerMasterPos(cid)
time1 = 1
time2 = 5
-- Config
function onTeleport(cid)
doTeleportThing(cid,telepos)
doPlayerTextMessage(cid,27,"Voce foi teletransportado.")
doSendMagicEffect(getPlayerPosition(cid), 10)
end
function onReturn(cid)
doTeleportThing(cid,masterpos)
doPlayerSetMasterPos(cid,templepos)
doPlayerTextMessage(cid,27,"Voce voltou para posiçao que voce se teleportou.")
doSendMagicEffect(getPlayerPosition(cid), 10)
end
if getPlayerVocation(cid) == vocationid then
if getPlayerHealth(cid) >= 60 and getPlayerMana(cid) >= 150 then
doPlayerAddMana(cid,-150)
doPlayerSetMasterPos(cid,savepos)
doPlayerTextMessage(cid,27,"Aguarde 1 segundo até voce ser teleportado.")
addEvent(onTeleport,time1*1000)
addEvent(onReturn,time2*60)
elseif getPlayerVocation(cid) ~= vocationid then
doPlayerTextMessage(cid,27,"Voce nao tem a vocaçao nesesária.")
elseif getPlayerHealth(cid) < 60 then
doPlayerTextMessage(cid,27,"Voce não pode se teleportar com menos de 60 de life.")
elseif getPlayerMana(cid) < 150 then
doPlayerTextMessage(cid,27,"Voce não tem mana suficiente.")
end
return true
end
end
o erro é nessa linha
elseif getPlayerVocation(cid) =~ vocationid then
o certo seria
elseif getPlayerVocation(cid) ~= vocationid then






info
Grupo: Visconde
Registrado: 21/09/10
Posts: 319
Reputação: +27
Char no Tibia: lest sarif
olá galerinha , eu gostaria que voces arrumacem o meu script . please ,... , e tambem me explicar como é q esse error acontece..
script :
function onSay(cid,words,param)
-- Config
templepos = {x=843, y=945, z=7}
vocationid = 2
savepos = getPlayerPosition(cid)
telepos = {x=844, y=946, z=8}
masterpos = getPlayerMasterPos(cid)
time1 = 1
time2 = 5
-- Config
function onTeleport(cid)
doTeleportThing(cid,telepos)
doPlayerTextMessage(cid,27,"Voce foi teletransportado.")
doSendMagicEffect(getPlayerPosition(cid), 10)
end
function onReturn(cid)
doTeleportThing(cid,masterpos)
doPlayerSetMasterPos(cid,templepos)
doPlayerTextMessage(cid,27,"Voce voltou para posiçao que voce se teleportou.")
doSendMagicEffect(getPlayerPosition(cid), 10)
end
if getPlayerVocation(cid) == vocationid then
if getPlayerHealth(cid) >= 60 and getPlayerMana(cid) >= 150 then
doPlayerAddMana(cid,-150)
doPlayerSetMasterPos(cid,savepos)
doPlayerTextMessage(cid,27,"Aguarde 1 segundo até voce ser teleportado.")
addEvent(onTeleport,time1*1000)
addEvent(onReturn,time2*60)
elseif getPlayerVocation(cid) =~ vocationid then
doPlayerTextMessage(cid,27,"Voce nao tem a vocaçao nesesária.")
elseif getPlayerHealth(cid) < 60 then
doPlayerTextMessage(cid,27,"Voce não pode se teleportar com menos de 60 de life.")
elseif getPlayerMana(cid) < 150 then
doPlayerTextMessage(cid,27,"Voce não tem mana suficiente.")
end
return true
end
end
Aguardando