Ir para conteúdo

Featured Replies

Postado

boa noite galera, eu ando com um problema na anihi, ela está quase perfeita, só em uma parte que não está funcionando, quando eu uso uma alavanca a primeira vez Tudo ocorre certo, porém, se a equipe n conseguir matar os demons e dps vier outra equipe eles pegaram os demons acumulados, a parte de tirar/ "varrer" os demons remanescentes n está funcionando. Se alguem me ajudar serei grato, segue a parte do script que trata dessa parte:

if item.itemid == 1945 then

starting={x=495, y=757, z=10, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=502, y=753, z=10, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) == 0 and getPlayerAccess(creature.uid) == 3 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
    end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
trash= {x=640, y=65, z=7}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTransformItem(item.uid,1946)
end


end
end

Editado por trancx123
Mal organizado (veja o histórico de edições)

  • Respostas 15
  • Visualizações 843
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado

Esta é uma mensagem automática! Este tópico foi movido para a área correta.
Pedimos que você leia as regras do fórum.

Spoiler

This is an automated message! This topic has been moved to the correct area.
Please read the forum rules.

 

Postado

@trancx123

 

teste:

Spoiler


local room = { -- room with demons
        fromX = 1648,
        fromY = 1786,
        fromZ = 6,
      
		toX = 1655,
        toY = 1794,
        toZ = 6
        }

if item.itemid == 1945 then
starting={x=495, y=757, z=10, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=502, y=753, z=10, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) == 0 and getPlayerAccess(creature.uid) == 3 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
    end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
trash= {x=640, y=65, z=7}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTransformItem(item.uid,1946)
end

local thing = getThingfromPos(room)
                                                
if thing.itemid > 0 then                                                    
doRemoveCreature(thing.uid)                                             
end  
end
end

 

Em local room modifique as posições para o canto inferior direito e superior esquerdo do room onde ocorre o event.

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

Atenciosamente,

 0lxhEI2.jpg

 

 

Meu servidor:

 

pbOT

Postado
  • Autor
1 hora atrás, VictorTasquin disse:

@trancx123

 

teste:

  Ocultar conteúdo

 




local room = { -- room with demons
        fromX = 1648,
        fromY = 1786,
        fromZ = 6,
      
		toX = 1655,
        toY = 1794,
        toZ = 6
        }

if item.itemid == 1945 then
starting={x=495, y=757, z=10, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=502, y=753, z=10, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) == 0 and getPlayerAccess(creature.uid) == 3 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
    end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
trash= {x=640, y=65, z=7}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTransformItem(item.uid,1946)
end

local thing = getThingfromPos(room)
                                                
if thing.itemid > 0 then                                                    
doRemoveCreature(thing.uid)                                             
end  
end
end

 

Em local room modifique as posições para o canto inferior direito e superior esquerdo do room onde ocorre o event.

blz, vou tentar, mas apago aquela parte do script acima? pois aquela parte é o meio do script

tirei exatamente oq eu postei e botei exatamete oq vc postou,configurando as cordenadas mas n deu certo...

 

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

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.7k

Informação Importante

Confirmação de Termo