Ir para conteúdo

Featured Replies

Postado

Então Estou Com Um Problema Na Magia De Summon Que As Vezes Mostra Esse Error Para Mim

 

Error:

Spoiler

[23:8:43.808] [Error - Spell Interface] 
[23:8:43.808] In a timer event called from: 
[23:8:43.808] data/spells/scripts/lvl250/clone ghost brook.lua:onCastSpell
[23:8:43.808] Description: 
[23:8:43.808] (luaDoTeleportThing) Thing not found

 

Script:

Spoiler

function onCastSpell(cid, var)
	
	local cloth, health, maxhealth, summons = getCreatureOutfit(cid), getCreatureHealth(cid), getCreatureMaxHealth(cid), getCreatureSummons(cid)
	local MaximoSummon = 3

	if(table.maxn(summons) < MaximoSummon) then 
		local pos = getPlayerPosition(cid)
		local bpos = {x=pos.x+2, y = pos.y, z = pos.z}
		local farAwayPos = {x = 590, y = 464, z = 7}
		
		-- SUMMON 1
		local Teste1 = doCreateMonster("Ghost Brook", farAwayPos)
		doConvinceCreature(cid, Teste1)
		setCreatureMaxHealth(Teste1, maxhealth)
		doCreatureAddHealth(Teste1, health)
		addEvent(doTeleportThing, 100, Teste1, pos)
		
		addEvent(doSendMagicEffect, 100, pos, 10)
		return true	
	end
	
	return true	
end

 

 

E Aqui Estou Com Error Numa Porta Automatica

 

Error:

Spoiler

[23:54:53.594] [Error - MoveEvents Interface] 
[23:54:53.594] In a timer event called from: 
[23:54:53.594] data/movements/scripts/autodoor.lua:onStepIn
[23:54:53.594] Description: 
[23:54:53.594] (luaDoTransformItem) Item not found

 

Script:

Spoiler

local config = {
    delay = 275,                                  --Intervalo de tempo entre as "transformações" da porta, em milésimos.
    door = {13597, 13598, 13599},                       --{ID da porta fechada, ID da porta aberta pela metade, ID da porta aberta},
    ids = {
        [2701] = {                               --[action_id] = {
            {x = 100, y = 251, z = 7},
        },
    },
}
function onStepIn(cid, item, position, fromPosition)
    if config.ids[item.actionid] then
        for _, pos in pairs(config.ids[item.actionid]) do
            if getTileItemById(pos, config.door[1]).uid > 0 then
                for i = 1, 2 do
                    addEvent(function()
                        doTransformItem(getTileItemById(pos, i == 1 and config.door[1] or config.door[2]).uid, config.door[i + 1])
                    end, i * config.delay)
                end
            end 
        end
    end
    return true
end
function onStepOut(cid, item, position, fromPosition)
    if config.ids[item.actionid] then
        for _, pos in pairs(config.ids[item.actionid]) do
            local it = getTileItemById(pos, config.door[3]).uid
            if it > 0 then
			if getSpectators(pos, 2, 1) then
                    return true
                end
            end
        end
        for _, pos in pairs(config.ids[item.actionid]) do
            if getTileItemById(pos, config.door[3]).uid > 0 then
                for i = 1, 2 do
                    addEvent(function()
                        doTransformItem(getTileItemById(pos, i == 1 and config.door[3] or config.door[2]).uid, config.door[i == 1 and 2 or 1])
                    end, i * config.delay)
                end
            end
        end
    end
    return true
end

 

 

  • Respostas 6
  • Visualizações 399
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • spell function onCastSpell(cid, var) local cloth, health, maxhealth, summons = getCreatureOutfit(cid), getCreatureHealth(cid), getCreatureMaxHealth(cid), getCreatureSummons(cid) local MaximoSu

Postado

Apenas o erro? O resto funciona normal ou apresentar problema?

Os dois erro é mesmo problema, addEvent executou mas não encontrou o objeto. Se for apenas o erro é simples de tira-lo.

Discord: Naze#3578

 

Ter Linux Dentro de Windows com Acesso 'localhost' para testes e +

AutoLoot Otimizado Direto na Source (tfs 0.4/otx)

 

// Pirataria é crime, original é roubo, compartilhar é legal.

 

tumblr_muk78tEwDQ1qah4nko1_500.gif

Postado
  • Autor
6 horas atrás, Naze disse:

Apenas o erro? O resto funciona normal ou apresentar problema?

Os dois erro é mesmo problema, addEvent executou mas não encontrou o objeto. Se for apenas o erro é simples de tira-lo.

 

os script são totalmente funcionais porem as vezes aparece esses erros no log e eu gostaria de remove-los para nao ficar aparecendo no meu log

Postado

spell

function onCastSpell(cid, var)
	
	local cloth, health, maxhealth, summons = getCreatureOutfit(cid), getCreatureHealth(cid), getCreatureMaxHealth(cid), getCreatureSummons(cid)
	local MaximoSummon = 3

	if(table.maxn(summons) < MaximoSummon) then 
		local pos = getPlayerPosition(cid)
		local bpos = {x=pos.x+2, y = pos.y, z = pos.z}
		local farAwayPos = {x = 590, y = 464, z = 7}
		
		-- SUMMON 1
		local Teste1 = doCreateMonster("Ghost Brook", farAwayPos)
		doConvinceCreature(cid, Teste1)
		setCreatureMaxHealth(Teste1, maxhealth)
		doCreatureAddHealth(Teste1, health)
		addEvent(function() if isCreature(Teste1) then doTeleportThing(Teste1, pos) end end, 100)
		
		addEvent(doSendMagicEffect, 100, pos, 10)
		return true	
	end
	
	return true	
end

porta

local config = {
    delay = 275,                                  --Intervalo de tempo entre as "transformações" da porta, em milésimos.
    door = {13597, 13598, 13599},                       --{ID da porta fechada, ID da porta aberta pela metade, ID da porta aberta},
    ids = {
        [2701] = {                               --[action_id] = {
            {x = 100, y = 251, z = 7},
        },
    },
}
function onStepIn(cid, item, position, fromPosition)
    if config.ids[item.actionid] then
        for _, pos in pairs(config.ids[item.actionid]) do
            if getTileItemById(pos, config.door[1]).uid > 0 then
                for i = 1, 2 do
                  addEvent(function()
                      if getTileItemById(pos, i == 1 and config.door[1] or config.door[2]).uid > 0 then
                        doTransformItem(getTileItemById(pos, i == 1 and config.door[1] or config.door[2]).uid, config.door[i + 1])
                      end
                    end, i * config.delay)
                end
            end 
        end
    end
    return true
end
function onStepOut(cid, item, position, fromPosition)
    if config.ids[item.actionid] then
        for _, pos in pairs(config.ids[item.actionid]) do
            local it = getTileItemById(pos, config.door[3]).uid
            if it > 0 then
			if getSpectators(pos, 2, 1) then
                    return true
                end
            end
        end
        for _, pos in pairs(config.ids[item.actionid]) do
            if getTileItemById(pos, config.door[3]).uid > 0 then
                for i = 1, 2 do
                  addEvent(function()
                      if getTileItemById(pos, i == 1 and config.door[3] or config.door[2]).uid > 0 then
                        doTransformItem(getTileItemById(pos, i == 1 and config.door[3] or config.door[2]).uid, config.door[i == 1 and 2 or 1])
                      end
                    end, i * config.delay)
                end
            end
        end
    end
    return true
endlocal config = {
    delay = 275,                                  --Intervalo de tempo entre as "transformações" da porta, em milésimos.
    door = {13597, 13598, 13599},                       --{ID da porta fechada, ID da porta aberta pela metade, ID da porta aberta},
    ids = {
        [2701] = {                               --[action_id] = {
            {x = 100, y = 251, z = 7},
        },
    },
}
function onStepIn(cid, item, position, fromPosition)
    if config.ids[item.actionid] then
        for _, pos in pairs(config.ids[item.actionid]) do
            if getTileItemById(pos, config.door[1]).uid > 0 then
                for i = 1, 2 do
                  addEvent(function()
                      if getTileItemById(pos, i == 1 and config.door[1] or config.door[2]).uid > 0 then
                        doTransformItem(getTileItemById(pos, i == 1 and config.door[1] or config.door[2]).uid, config.door[i + 1])
                      end
                    end, i * config.delay)
                end
            end 
        end
    end
    return true
end
function onStepOut(cid, item, position, fromPosition)
    if config.ids[item.actionid] then
        for _, pos in pairs(config.ids[item.actionid]) do
            local it = getTileItemById(pos, config.door[3]).uid
            if it > 0 then
			if getSpectators(pos, 2, 1) then
                    return true
                end
            end
        end
        for _, pos in pairs(config.ids[item.actionid]) do
            if getTileItemById(pos, config.door[3]).uid > 0 then
                for i = 1, 2 do
                  addEvent(function()
                      if getTileItemById(pos, i == 1 and config.door[3] or config.door[2]).uid > 0 then
                        doTransformItem(getTileItemById(pos, i == 1 and config.door[3] or config.door[2]).uid, config.door[i == 1 and 2 or 1])
                      end
                    end, i * config.delay)
                end
            end
        end
    end
    return true
end

 

Discord: Naze#3578

 

Ter Linux Dentro de Windows com Acesso 'localhost' para testes e +

AutoLoot Otimizado Direto na Source (tfs 0.4/otx)

 

// Pirataria é crime, original é roubo, compartilhar é legal.

 

tumblr_muk78tEwDQ1qah4nko1_500.gif

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo