Qual o erro nesse script ?

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
Tenta assim:
function onWalkIn(cid, item, frompos)
queststatus = getPlayerStorageValue(cid,5801)if queststatus == -1 thenlocal pos = getPlayerPosition(cid)local pos2 = {x=208, y=87, z=15}doTeleportThing(cid, pos2)doPlayerSendTextMessage(cid,180,"!!!!")setPlayerStorageValue(cid,5801,1)doSendMagicEffect(frompos,98)elsesetPlayerStorageValue(cid,5801,-1)doTeleportThing(cid,pos)doSendMagicEffect(frompos,98)doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)setPlayerStorageValue(cid,5801,-1)doPlayerSendTextMessage(cid,180,"Libertaçao!")endend
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 thenlocal pos = getPlayerPosition(cid)local pos2 = {x=208, y=87, z=15}doTeleportThing(cid, pos2)doPlayerSendTextMessage(cid,180,"!!!!")setPlayerStorageValue(cid,5801,1)doSendMagicEffect(frompos,98)elsesetPlayerStorageValue(cid,5801,-1)doTeleportThing(cid,pos)doSendMagicEffect(frompos,98)doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)setPlayerStorageValue(cid,5801,-1)doPlayerSendTextMessage(cid,180,"Libertaçao!")endend
Vei esse até ta funcionando porem to levando debug =/ , alguma dica ?
Dá erro no distro? Poste uma SS do erro.
Tente assim:
function onWalkIn(cid, item, frompos)
queststatus = getPlayerStorageValue(cid,5801)if queststatus == -1 thenlocal 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)elsesetPlayerStorageValue(cid,5801,-1)doTeleportThing(cid,pos)doSendMagicEffect(frompos,98)doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)setPlayerStorageValue(cid,5801,-1)doPlayerSendTextMessage(cid,180,"Libertaçao!")endend
Ou assim:
function onWalkIn(cid, item, frompos)
queststatus = getPlayerStorageValue(cid,5801)if queststatus == -1 thenlocal 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)elsesetPlayerStorageValue(cid,5801,-1)doTeleportThing(cid,pos)doSendMagicEffect(frompos,98)doSendAnimatedText(getPlayerPosition(cid), "!!!", 71)setPlayerStorageValue(cid,5801,-1)doPlayerSendTextMessage(cid,180,"Libertaçao!")endend
Nem , da debug no cliente
O script ta funcionando 100% já
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
Ja consegui vlw galera !
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.