Qual o erro nesse script ?

Desnecessario
em Scripts

Desnecessario

Why be a king.. when you can be a god
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 04/01/13Posts: 479Char no Tibia: Lord Pau Listinha


function onWalkIn(cid, item, frompos)



queststatus = getPlayerStorageValue(cid,5801)

if queststatus == -1 then


pos = getPlayerPosition(cid)


doTeleportThing(cid,{x=208, y=87, z=15})

doPlayerSendTextMessage(cid,180,"!!!!")

setPlayerStorageValue(cid,5801,1)

doSendMagicEffect(frompos,98)



else

setPlayerStorageValue(cid,5801,-1)


doTeleportThing(cid,pos)

doSendMagicEffect(frompos,98)

doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)

setPlayerStorageValue(cid,5801,-1)

doPlayerSendTextMessage(cid,180,"Libertaçao!")


end

end



Bom galera na verdade tudo no script está funcionando menos - doTeleportThing(cid,{x=208, y=87, z=15})

Tem como alguem me ajudar ?? oque tem de errado nessa parte ? =B

Session Start

cleber.16mb.com
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 25/04/12Posts: 752Gênero: Masculino

 

function onWalkIn(cid, item, frompos)
 
 
  queststatus = getPlayerStorageValue(cid,5801)
  if queststatus == -1 then
 
pos = getPlayerPosition(cid)
telar = {x=208, y=87, z=15}
doTeleportThing(cid, telar, false)
doPlayerSendTextMessage(cid,180,"!!!!")
setPlayerStorageValue(cid,5801,1)
doSendMagicEffect(frompos,98)
 
 
else
setPlayerStorageValue(cid,5801,-1)
doTeleportThing(cid,pos)
doSendMagicEffect(frompos,98)
doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)
setPlayerStorageValue(cid,5801,-1)
doPlayerSendTextMessage(cid,180,"Libertaçao!")
 
end
end

OriGM

avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 24/09/13Posts: 199

Tenta assim:

 

function onWalkIn(cid, item, frompos)

queststatus = getPlayerStorageValue(cid,5801)
if queststatus == -1 then
local pos = getPlayerPosition(cid)
local pos2 = {x=208, y=87, z=15}
doTeleportThing(cid, pos2)
doPlayerSendTextMessage(cid,180,"!!!!")
setPlayerStorageValue(cid,5801,1)
doSendMagicEffect(frompos,98)
else
setPlayerStorageValue(cid,5801,-1)
doTeleportThing(cid,pos)
doSendMagicEffect(frompos,98)
doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)
setPlayerStorageValue(cid,5801,-1)
doPlayerSendTextMessage(cid,180,"Libertaçao!")
end
end

Desnecessario

Why be a king.. when you can be a god
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 04/01/13Posts: 479Char no Tibia: Lord Pau Listinha
function onWalkIn(cid, item, frompos)
 
 
  queststatus = getPlayerStorageValue(cid,5801)
  if queststatus == -1 then
 
pos = getPlayerPosition(cid)
telar = {x=208, y=87, z=15}
doTeleportThing(cid, telar, false)
doPlayerSendTextMessage(cid,180,"!!!!")
setPlayerStorageValue(cid,5801,1)
doSendMagicEffect(frompos,98)
 
 
else
setPlayerStorageValue(cid,5801,-1)
doTeleportThing(cid,pos)
doSendMagicEffect(frompos,98)
doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)
setPlayerStorageValue(cid,5801,-1)
doPlayerSendTextMessage(cid,180,"Libertaçao!")
 
end
end

 

Nem foi, agora não funcionou nada no script, lembrando é pra 7.8 algumas funções não tem pra 7.8 =/

 

Tenta assim:

 

function onWalkIn(cid, item, frompos)

queststatus = getPlayerStorageValue(cid,5801)
if queststatus == -1 then
local pos = getPlayerPosition(cid)
local pos2 = {x=208, y=87, z=15}
doTeleportThing(cid, pos2)
doPlayerSendTextMessage(cid,180,"!!!!")
setPlayerStorageValue(cid,5801,1)
doSendMagicEffect(frompos,98)
else
setPlayerStorageValue(cid,5801,-1)
doTeleportThing(cid,pos)
doSendMagicEffect(frompos,98)
doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)
setPlayerStorageValue(cid,5801,-1)
doPlayerSendTextMessage(cid,180,"Libertaçao!")
end
end

 

 

Vei esse até ta funcionando porem to levando debug =/ , alguma dica ?

OriGM

avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 24/09/13Posts: 199

Dá erro no distro? Poste uma SS do erro.

Tente assim:

 

 

function onWalkIn(cid, item, frompos)

queststatus = getPlayerStorageValue(cid,5801)
if queststatus == -1 then
local pos = getPlayerPosition(cid)
local pos2 = {x=208, y=87, z=15}
doTeleportThing(cid, getThingPosition(pos2))
doPlayerSendTextMessage(cid,180,"!!!!")
setPlayerStorageValue(cid,5801,1)
doSendMagicEffect(frompos,98)
else
setPlayerStorageValue(cid,5801,-1)
doTeleportThing(cid,pos)
doSendMagicEffect(frompos,98)
doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)
setPlayerStorageValue(cid,5801,-1)
doPlayerSendTextMessage(cid,180,"Libertaçao!")
end
end

 

Ou assim:

 

function onWalkIn(cid, item, frompos)

queststatus = getPlayerStorageValue(cid,5801)
if queststatus == -1 then
local pos = getPlayerPosition(cid)
local pos2 = {x=208, y=87, z=15}
doTeleportThing(cid, pos2, true)
doPlayerSendTextMessage(cid,180,"!!!!")
setPlayerStorageValue(cid,5801,1)
doSendMagicEffect(frompos,98)
else
setPlayerStorageValue(cid,5801,-1)
doTeleportThing(cid,pos)
doSendMagicEffect(frompos,98)
doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)
setPlayerStorageValue(cid,5801,-1)
doPlayerSendTextMessage(cid,180,"Libertaçao!")
end
end

Zaruss

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 31/08/13Posts: 93Char no Tibia: Evarin Thin


function onWalkIn(cid, item, frompos)

pos = getPlayerPosition(cid)

queststatus = getPlayerStorageValue(cid,5801)

local tpos = {x=208, y=87, z=15}

 

if queststatus == -1 then

doTeleportThing(cid, tpos)

doPlayerSendTextMessage(cid, 180, "!!!!")

setPlayerStorageValue(cid, 5801, 1)

doSendMagicEffect(frompos, 98)

else

setPlayerStorageValue(cid, 5801, -1)

doTeleportThing(cid, frompos)

doSendMagicEffect(frompos, 98)

doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)

setPlayerStorageValue(cid, 5801, -1)

doPlayerSendTextMessage(cid, 180, "Libertaçao!")

end

return true

end

zipter98

avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 20/09/12Posts: 2553Gênero: Masculino

Tópico movido para a seção de dúvidas e pedidos resolvidos.

Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.