Ir para conteúdo

Featured Replies

Postado

Falai mulekadinha, to com um problema no script da INQ, quando mata algum boss ex: Zugurosh (mais testei nos demais mesmo problema), ocorre que não cria o TP após o boss morrer, a mensagem em si aparece porem o script não cria o TP para a próxima sala, o erro que segue no console é esse:


10508397_590160441098940_373535613_n.jpg

 

 

tentei mudar a função para 'doCreateItem' no script mais não resolveu :

segue o script:

local config = {
        
timeToRemove = 180, 
message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
        
teleportId = 1387,
        
bosses = { 
["Ushuriel"] = {  pos={ x=33157, y=31725, z=11, stackpos=1 }, aid=1001 },
				
["Zugurosh"] = {  pos={ x=33123, y=31689, z=11, stackpos=1 }, aid=1002},
				
["Madareth"] = {  pos={ x=33194, y=31768, z=11, stackpos=1 }, aid=1003},
               
["Annihilon"] = {  pos={ x=33200, y=31704, z=11, stackpos=1 }, aid=1005},
                
["Hellgorak"] = {  pos={ x=33107, y=31735, z=11, stackpos=1 }, aid=1006}
 },
		
brothers ={
        
["Golgordan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
        
["Latrivan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
        
brothersArea ={
                
fromPos = {x = 33224, y = 31722, z = 11},
                
toPos = {x = 33240, y = 31734, z = 11}	}	}
}

local function removal(position)
	
doRemoveItem(getTileItemById(position, config.teleportId).uid, 1)
    
return TRUE

end



function onKill(cid, target, lastHit)
    
if(config.bosses[getCreatureName(target)]) then
		
local t = config.bosses[getCreatureName(target)]
	    
local teleport = doCreateTeleport(config.teleportId, t.pos)
		
local position = t.pos
		
doSetItemActionId(teleport, t.aid)        
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
		
addEvent(removal, config.timeToRemove * 1000, position)
	
elseif(config.brothers[getCreatureName(target)]) then
		
local t = config.brothers[getCreatureName(target)]
        
local brother = getCreatureName(t.brother)
		
if(isMonster(brother) == true) then
            
if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
                
return TRUE
			
end
        
else
			
local teleport = doCreateTeleport(config.teleportId, t.pos)
			
local position = t.pos
			
doSetItemActionId(teleport, t.aid)		
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			
addEvent(removal, config.timeToRemove * 1000, position)
		
end
	
end
	
return TRUE

end

Gostou ? Rep + :P

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

Top Posters In This Topic

Most Popular Posts

  • Ok, então... Tenta esse, se não der certo, não sei :/   Esse é o script q eu uso.

Postado

Tenta esse:

local config = {
        
timeToRemove = 180, 
message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
        
teleportId = 1387,
        
bosses = { 
["Ushuriel"] = {  pos={ x=33157, y=31725, z=11, stackpos=1 }, aid=1001 },
				
["Zugurosh"] = {  pos={ x=33123, y=31689, z=11, stackpos=1 }, aid=1002},
				
["Madareth"] = {  pos={ x=33194, y=31768, z=11, stackpos=1 }, aid=1003},
               
["Annihilon"] = {  pos={ x=33200, y=31704, z=11, stackpos=1 }, aid=1005},
                
["Hellgorak"] = {  pos={ x=33107, y=31735, z=11, stackpos=1 }, aid=1006}
 },
		
brothers ={
        
["Golgordan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
        
["Latrivan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
        
brothersArea ={
                
fromPos = {x = 33224, y = 31722, z = 11},
                
toPos = {x = 33240, y = 31734, z = 11}	}	}
}

local function removal(position)
	
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    
return TRUE

end



function onKill(cid, target, lastHit)
    
if(config.bosses[getCreatureName(target)]) then
		
local t = config.bosses[getCreatureName(target)]
	    
local teleport = doCreateItem(config.teleportId, t.pos)
		
local position = t.pos
		
doItemSetAttribute(teleport, "aid", t.aid)
        
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
		
addEvent(removal, config.timeToRemove * 1000, position)
	
elseif(config.brothers[getCreatureName(target)]) then
		
local t = config.brothers[getCreatureName(target)]
        
local brother = getCreatureByName(t.brother)
		
if(isMonster(brother) == true) then
            
if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
                
return TRUE
			
end
        
else
			
local teleport = doCreateItem(config.teleportId, t.pos)
			
local position = t.pos
			
doItemSetAttribute(teleport, "aid", t.aid)
			
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			
addEvent(removal, config.timeToRemove * 1000, position)
		
end
	
end
	
return TRUE

end

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

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Postado
  • Autor

Tenta esse:

local config = {
        
timeToRemove = 180, 
message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
        
teleportId = 1387,
        
bosses = { 
["Ushuriel"] = {  pos={ x=33157, y=31725, z=11, stackpos=1 }, aid=1001 },
				
["Zugurosh"] = {  pos={ x=33123, y=31689, z=11, stackpos=1 }, aid=1002},
				
["Madareth"] = {  pos={ x=33194, y=31768, z=11, stackpos=1 }, aid=1003},
               
["Annihilon"] = {  pos={ x=33200, y=31704, z=11, stackpos=1 }, aid=1005},
                
["Hellgorak"] = {  pos={ x=33107, y=31735, z=11, stackpos=1 }, aid=1006}
 },
		
brothers ={
        
["Golgordan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
        
["Latrivan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
        
brothersArea ={
                
fromPos = {x = 33224, y = 31722, z = 11},
                
toPos = {x = 33240, y = 31734, z = 11}	}	}
}

local function removal(position)
	
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    
return TRUE

end



function onKill(cid, target, lastHit)
    
if(config.bosses[getCreatureName(target)]) then
		
local t = config.bosses[getCreatureName(target)]
	    
local teleport = doCreateItem(config.teleportId, t.pos)
		
local position = t.pos
		
doItemSetAttribute(teleport, "aid", t.aid)
        
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
		
addEvent(removal, config.timeToRemove * 1000, position)
	
elseif(config.brothers[getCreatureName(target)]) then
		
local t = config.brothers[getCreatureName(target)]
        
local brother = getCreatureByName(t.brother)
		
if(isMonster(brother) == true) then
            
if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
                
return TRUE
			
end
        
else
			
local teleport = doCreateItem(config.teleportId, t.pos)
			
local position = t.pos
			
doItemSetAttribute(teleport, "aid", t.aid)
			
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			
addEvent(removal, config.timeToRemove * 1000, position)
		
end
	
end
	
return TRUE

end

 

 

O erro prossegue, apareceu o mesmo erro no console porem oque percebi que você modificou o doCreateTeleport para doCreateItem

e isso eu ja fiz, em todo caso obrigado mesmo assim ...

Gostou ? Rep + :P

Postado

Ok, então... Tenta esse, se não der certo, não sei :/

local config = {
        
timeToRemove = 180, 
message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
        
teleportId = 9773,
        
bosses = { 
["Ushuriel"] = {  pos={ x=33157, y=31725, z=11, stackpos=1 }, aid=1001 },
				
["Zugurosh"] = {  pos={ x=33123, y=31689, z=11, stackpos=1 }, aid=1002},
				
["Madareth"] = {  pos={ x=33194, y=31768, z=11, stackpos=1 }, aid=1003},
               
["Annihilon"] = {  pos={ x=33200, y=31704, z=11, stackpos=1 }, aid=1005},
                
["Hellgorak"] = {  pos={ x=33107, y=31735, z=11, stackpos=1 }, aid=1006}
 },
		
brothers ={
        
["Golgordan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
        
["Latrivan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
        
brothersArea ={
                
fromPos = {x = 33224, y = 31722, z = 11},
                
toPos = {x = 33240, y = 31734, z = 11}	}	}
}

local function removal(position)
	
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    
return TRUE

end



function onKill(cid, target, lastHit)
    
if(config.bosses[getCreatureName(target)]) then
		
local t = config.bosses[getCreatureName(target)]
	    
local teleport = doCreateItem(config.teleportId, t.pos)
		
local position = t.pos
		
doItemSetAttribute(teleport, "aid", t.aid)
        
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
		
addEvent(removal, config.timeToRemove * 1000, position)
	
elseif(config.brothers[getCreatureName(target)]) then
		
local t = config.brothers[getCreatureName(target)]
        
local brother = getCreatureByName(t.brother)
		
if(isMonster(brother) == true) then
            
if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
                
return TRUE
			
end
        
else
			
local teleport = doCreateItem(config.teleportId, t.pos)
			
local position = t.pos
			
doItemSetAttribute(teleport, "aid", t.aid)
			
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			
addEvent(removal, config.timeToRemove * 1000, position)
		
end
	
end
	
return TRUE

end

 

Esse é o script q eu uso.

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Postado
  • Autor

Ok, então... Tenta esse, se não der certo, não sei :/

local config = {
        
timeToRemove = 180, 
message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
        
teleportId = 9773,
        
bosses = { 
["Ushuriel"] = {  pos={ x=33157, y=31725, z=11, stackpos=1 }, aid=1001 },
				
["Zugurosh"] = {  pos={ x=33123, y=31689, z=11, stackpos=1 }, aid=1002},
				
["Madareth"] = {  pos={ x=33194, y=31768, z=11, stackpos=1 }, aid=1003},
               
["Annihilon"] = {  pos={ x=33200, y=31704, z=11, stackpos=1 }, aid=1005},
                
["Hellgorak"] = {  pos={ x=33107, y=31735, z=11, stackpos=1 }, aid=1006}
 },
		
brothers ={
        
["Golgordan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Latrivan"},
        
["Latrivan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Golgordan"},
        
brothersArea ={
                
fromPos = {x = 33224, y = 31722, z = 11},
                
toPos = {x = 33240, y = 31734, z = 11}	}	}
}

local function removal(position)
	
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    
return TRUE

end



function onKill(cid, target, lastHit)
    
if(config.bosses[getCreatureName(target)]) then
		
local t = config.bosses[getCreatureName(target)]
	    
local teleport = doCreateItem(config.teleportId, t.pos)
		
local position = t.pos
		
doItemSetAttribute(teleport, "aid", t.aid)
        
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
		
addEvent(removal, config.timeToRemove * 1000, position)
	
elseif(config.brothers[getCreatureName(target)]) then
		
local t = config.brothers[getCreatureName(target)]
        
local brother = getCreatureByName(t.brother)
		
if(isMonster(brother) == true) then
            
if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then
                
return TRUE
			
end
        
else
			
local teleport = doCreateItem(config.teleportId, t.pos)
			
local position = t.pos
			
doItemSetAttribute(teleport, "aid", t.aid)
			
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			
addEvent(removal, config.timeToRemove * 1000, position)
		
end
	
end
	
return TRUE

end

 

Esse é o script q eu uso.

 

Obrigado fera, com base no seu modifiquei e consegui resolver, esta certinho agora !

 

Dúvidas sanadas, pode fexar !!

Gostou ? Rep + :P

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo