tonynamoral 27 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 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 Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/ Compartilhar em outros sites More sharing options...
0 notle2012 233 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 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 Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365162 Compartilhar em outros sites More sharing options...
0 Slicer 1070 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 (editado) addEvent(onTeleport,time1*1000) addEvent(onReturn,time2*60) aki tem erro.. ;p --ou pelo menos era pra ser erro neh -- addEvent(onTeleport,time1*1000, cid) addEvent(onReturn,time2*60, cid) no addEvent, depois q vc coloca o tempo, vc tem q por os parametros da function... como por exemplo tb.. addEvent(doSendMagicEffect, 1000, getPlayerPosition(cid), 10) e na proxima tente postar o erro tb.. ajuda sabe.. ;p notle... mal consigo prever seus movimentos Editado Outubro 16, 2012 por Slicer Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365163 Compartilhar em outros sites More sharing options...
0 tonynamoral 27 Postado Outubro 16, 2012 Autor Share Postado Outubro 16, 2012 Agora quando eu falo , nao acontece nada . Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365165 Compartilhar em outros sites More sharing options...
0 Slicer 1070 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 tentase fazer oq eu flei tb? Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365166 Compartilhar em outros sites More sharing options...
0 tonynamoral 27 Postado Outubro 16, 2012 Autor Share Postado Outubro 16, 2012 Eu não entendi o que voce falou . Explica? Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365168 Compartilhar em outros sites More sharing options...
0 Slicer 1070 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 (editado) como vou explicar mais q isso? assim.. no teu script ta assim.. addEvent(onTeleport,time1*1000) addEvent(onReturn,time2*60) soh q isso esta ERRADO! depois q vc declara o tempo num addEvent vc tem q declarar os parametros da funçao q esta no addEvent... o certo seria assim.. addEvent(onTeleport,time1*1000, cid) addEvent(onReturn,time2*60, cid) Editado Outubro 16, 2012 por Slicer Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365171 Compartilhar em outros sites More sharing options...
0 tonynamoral 27 Postado Outubro 16, 2012 Autor Share Postado Outubro 16, 2012 ja fiz isso , porém , quando eu falo . nao acontece nada o/ Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365172 Compartilhar em outros sites More sharing options...
0 Slicer 1070 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 (editado) nd ms vc ta com um char com a vocation certa? e outro erro q eu vi foi.. addEvent(onReturn,time2*60, cid) o certo seria addEvent(onReturn, time2*60*1000, cid) alias achei o problema.. ;x odeio esse CODE... use esse... o problema tava no 'return true' q estava no lugar errado ;x 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, cid) addEvent(onReturn,time2*60*1000, cid) 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 elseif getPlayerVocation(cid) ~= vocationid then doPlayerTextMessage(cid,27,"Voce nao tem a vocaçao nesesária.") end return true end Editado Outubro 16, 2012 por Slicer Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365176 Compartilhar em outros sites More sharing options...
0 tonynamoral 27 Postado Outubro 16, 2012 Autor Share Postado Outubro 16, 2012 Continua nao fazendo nada . voce poderia fazer um remake da script ? se voce nao entendeu-a . ela funciona assim o player usa a funçao , ai ele é teleportado para x pos . depois de 5 mins , ele volta pra posiçao de que ele usou tele. Simplee . Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365177 Compartilhar em outros sites More sharing options...
0 Slicer 1070 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 olhe denovo o meu post acima.. ja arrumei o script.. n tem como n funcionar agora ;x Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365180 Compartilhar em outros sites More sharing options...
0 notle2012 233 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 troca todas function doPlayerTextMessage por doPlayerSendTextMessage Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365183 Compartilhar em outros sites More sharing options...
0 Slicer 1070 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 xi tem isso ae tb... ;/ recomendo um pouco mais de leitura em tutoriais de scripts e tente usar o OTScript Live! para editar scripts.. ele tem uma lista de funçoes 'imbutida' q ajuda muito nesses errinhus com funçoes... ;p Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365189 Compartilhar em outros sites More sharing options...
0 caotic 393 Postado Outubro 16, 2012 Share Postado Outubro 16, 2012 addEvent(onTeleport,time1*1000) addEvent(onReturn,time2*60) aki tem erro.. ;p --ou pelo menos era pra ser erro neh -- addEvent(onTeleport,time1*1000, cid) addEvent(onReturn,time2*60, cid) no addEvent, depois q vc coloca o tempo, vc tem q por os parametros da function... como por exemplo tb.. addEvent(doSendMagicEffect, 1000, getPlayerPosition(cid), 10) e na proxima tente postar o erro tb.. ajuda sabe.. ;p notle... mal consigo prever seus movimentos Exatamente mais toda regra a exceção. Não e necessário por se a função não apresenta parâmetros. Já que na função addEvent usa "func(...)" Só postei para completar você já sabe disso. Link para o comentário https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/#findComment-1365204 Compartilhar em outros sites More sharing options...
Pergunta
tonynamoral 27
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
Link para o comentário
https://xtibia.com/forum/topic/196687-errozinho-do-then-na-minha-talkaction-facil-de-arrumar/Compartilhar em outros sites
13 respostass a esta questão
Posts Recomendados