Ir para conteúdo
  • Cadastre-se

Errro nesse script de tp help


Posts Recomendados

ola galera to com um problema quando todas salas de treiners estão lotadas aparece seguinte erro

[21/5/2015 15:18:20] [Error - MoveEvents Interface] 
[21/5/2015 15:18:20] data/movements/scripts/trainingroom.lua:onStepIn
[21/5/2015 15:18:20] Description: 
[21/5/2015 15:18:20] (luaGetThingPosition) Thing not found 

gostaria tb de por so para players level 50 entrar no tp

function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) then
doTeleportThing(cid, pos)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end

I like

Link para o post
Compartilhar em outros sites

Testa assim

function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) then
if getPlayerLevel(cid) >= 50 then
doTeleportThing(cid, fromPosition)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end
Link para o post
Compartilhar em outros sites
  Em 21/05/2015 em 18:24, TopllDanStar disse:

 

Testa assim

function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) then
if getPlayerLevel(cid) >= 50 then
doTeleportThing(cid, fromPosition)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end
Mostrar mais  

agora n ta indo para sala so fica com mensagem e vc esqueceu de adicionar um "end"

I like

Link para o post
Compartilhar em outros sites
  Em 21/05/2015 em 18:29, loreal disse:

agora n ta indo para sala so fica com mensagem e vc esqueceu de adicionar um "end"

Mostrar mais  

 

Teste assim

function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) and getPlayerLevel(cid) < 50 then
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end
Link para o post
Compartilhar em outros sites
  Em 21/05/2015 em 19:13, loreal disse:

so fica dando mensagem 

 

2Y05uOi.png

Mostrar mais  

 

function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) and getPlayerLevel(cid) < 50 then
doTeleportThing(cid, pos)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end
Link para o post
Compartilhar em outros sites

agora quando entra no tp da um loop infinito de erro

 

St5Q9Cm.png

I like

Link para o post
Compartilhar em outros sites
  Em 21/05/2015 em 19:48, loreal disse:

agora quando entra no tp da um loop infinito de erro

 

St5Q9Cm.png

Mostrar mais  

 

function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) and getPlayerLevel(cid) < 50 then
doTeleportThing(cid, pos, true)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end

desculpa já era pra ter resolvido, mais não estou em casa pra testar 

Link para o post
Compartilhar em outros sites
  Em 21/05/2015 em 19:53, TopllDanStar disse:
function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) and getPlayerLevel(cid) < 50 then
doTeleportThing(cid, pos, true)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end

desculpa já era pra ter resolvido, mais não estou em casa pra testar 

 

Mostrar mais  

mesmo erro amigo

I like

Link para o post
Compartilhar em outros sites

function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) and getPlayerLevel(cid) < 50 then
doTeleportThing(cid, pos, false)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end
Link para o post
Compartilhar em outros sites
  Em 21/05/2015 em 20:23, TopllDanStar disse:
function onStepIn(cid, item, position, fromPosition)
for i = 2700, 3900 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) and getPlayerLevel(cid) < 50 then
doTeleportThing(cid, pos, false)
doCreatureSay(cid, 'Using a tool to cast spells or to keep your character online is ok.', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return true
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
return true
end
Mostrar mais  

mesmo erro :(

I like

Link para o post
Compartilhar em outros sites

oq é esse 2700 a 3900?

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
  Em 21/05/2015 em 23:24, Vodkart disse:

oq é esse 2700 a 3900?

Expand   Mostrar mais  

função desse escript e checar x getThingPos(i) para ver se tem algum player em algum title com as uid de 2700 até 3900 e teletransportá-lo caso tenha ele pula para próximo getThingPos(i) que  eu tive que adicionar em cada title uid do 2700 até 3900. obs; eu n adicionei ate 3900 so um pouco..3900 e o limite que pode adicionar.

Editado por loreal (veja o histórico de edições)

I like

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Estatísticas dos Fóruns

    96835
    Tópicos
    519577
    Posts
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo