Ir para conteúdo

UroTTa

Campones
  • Total de itens

    31
  • Registro em

  • Última visita

Posts postados por UroTTa

  1. Demonbholder, pode me ajudar na ultima coisa? Seguinte,

     

    O script tem 3 funções la em baixo de executar depois de um certo tempo um addevent que teleporta os jogadores da area para o templo, eu gostaria que essa função so teleportaria jogadores com a storage (1050,19) e nessa função adicionar 2 storages nova (15335, 2) (1050, 20) ficaria mais ou menos assim.

    local pos = {
    	{x = 33258, y = 31079, z = 8},
    	{x = 33259, y = 31089, z = 8},
    	{x = 33266, y = 31084, z = 8},
    	{x = 33263, y = 31093, z = 8}
    }
    
    
    function doClearMissionArea(fromPos, toPos)
    	for x = fromPos.x, toPos.x do
    		for y = fromPos.y, toPos.y do
    			for z = fromPos.z, toPos.z do
    				if(getTopCreature({x = x, y = y, z = z}).uid > 0) then
    					if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
                                                    if getPlayerStorageValue(creature, 1050) == 19 then
    						doTeleportThing(getTopCreature({x = x, y = y, z = z}).uid, {x = 33353, y = 31410, z = 8})
    						doSendMagicEffect({x = 33353, y = 31410, z = 8}, CONST_ME_TELEPORT)
    			                        setPlayerStorageValue(cid, 15335, 2)
    			                        setPlayerStorageValue(cid, 1050, 20)
    					else
    						doRemoveCreature(getTopCreature({x = x, y = y, z = z}).uid)
    					end
    				end
                            end
    			end
    		end
    	end
    	return true
    end
    
    function TirarEscada()
        local escada = getTileItemById({x = 33265, y = 31116, z = 8}, 3687)
        local escada2 = getTileItemById({x = 33265, y = 31116, z = 7}, 3219)
        if escada then
            doRemoveItem(escada.uid, 1)
    	doRemoveItem(escada2.uid, 1)
    	doCreateItem(11097, 1, {x = 33265, y = 31116, z = 7})
        end
        return true
    end
    
    
    function onStepIn(cid, item, position, lastPosition)
    	start = 0
    	if item.actionid == 8014 then
    		for i = 1, 4 do
    			local creature = getTopCreature(pos[i]).uid
    			if creature > 0 then
    				if isPlayer(creature) then
    					if getGlobalStorageValue(8014) < 1 then
    						if getPlayerStorageValue(creature, 1050) == 19 then
    							start = start + 1
    							if creature == cid then
    								doCreatureSay(cid, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
    							end
    						end
    					end
    				end
    			end
    		end
    		if start == 4 then
    			doCreatureSayWithRadius(cid, "The army is complete again. You hear a hatch opening elsewhere, followed by a grinding sound.", TALKTYPE_ORANGE_1, 33261, 31086, {x =  33261, y = 31086, z = 8})
    			doCreateItem(3687, 1, {x = 33265, y = 31116, z = 8})
    			doCreateItem(3219, 1, {x = 33265, y = 31116, z = 7})
    			addEvent(TirarEscada, 30 * 1000)
    			setGlobalStorageValue(8014, 1)
    			addEvent(setGlobalStorageValue, 8014, 0)
    			creature = ""
    			for k = 1, 4 do
    				for j = 1, 20 do
    					if(k < 3) then
    						creature = "eternal guardian"
    					else
    						creature = "lizard chosen"
    					end
    					summonPos = {x = math.random(33239, 33295), y = math.random(31100, 31132), z = 7}
    					addEvent(doSummonCreature, k * 30 * 1000, creature, summonPos)
    					addEvent(doSendMagicEffect, k * 30 * 1000, summonPos, CONST_ME_TELEPORT)
    				end
    			end
    			addEvent(doClearMissionArea, 5 * 30 * 1000, {x = 33239, y = 31100, z = 7}, {x = 33295, y = 31132, z = 7})
    		end
    	end
    
    return true
    end
    

    Mas esses setPlayerStorageValue(cid, 15335, 2), setPlayerStorageValue(cid, 1050, 20) não seta a storage na function.

  2. Beholder, so tem um pequeno detalhe novamente no script:

     

    Desse metodo qualquer pessoa que passar em cima do action id 8014 iria aparecer a mensagem para ele, o certo era aparecer so para quem tivesse a storage (1050,19) e era pra checar se estava sendo executado o evento ou não exemplo:

     

    Estava assim:

    
    function onStepIn(cid, item, position, lastPosition)
    	start = 0
    	if item.actionid == 8014 then
    		doCreatureSay(cid, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
    		for i = 1, 4 do
    			local creature = getTopCreature(pos[i]).uid
    			if creature > 0 then
    				if isPlayer(creature) then
    					if getGlobalStorageValue(8014) < 1 then
    						if getPlayerStorageValue(creature, 1050) == 19 then
    							start = start + 1
    						end
    					end
    				end
    			end
    		end
    

    O certo era para ficar assim, mas não funcionou e bugou o evento:

    function onStepIn(cid, item, position, lastPosition)
    	start = 0
    	if item.actionid == 8014 then
    		if getPlayerStorageValue(creature, 1050) == 19 then
    			if getGlobalStorageValue(8014) < 1 then
    			doCreatureSay(cid, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
    				for i = 1, 4 do
    					local creature = getTopCreature(pos[i]).uid
    					if creature > 0 then
    						if isPlayer(creature) then
    							start = start + 1
    						end
    					end
    				end
    			end
    		end
    
  3. Juntei o do beholder e do techrlz deu certo, script ficou perfeito.

     

    Obrigado a todos que tentaram me ajudar, fico grato.

     

    script ficou assim:

    local pos = {
    	{x = 33258, y = 31079, z = 8},
    	{x = 33259, y = 31089, z = 8},
    	{x = 33266, y = 31084, z = 8},
    	{x = 33263, y = 31093, z = 8}
    }
    
    
    function doClearMissionArea(fromPos, toPos)
    	for x = fromPos.x, toPos.x do
    		for y = fromPos.y, toPos.y do
    			for z = fromPos.z, toPos.z do
    				if(getTopCreature({x = x, y = y, z = z}).uid > 0) then
    					if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
    						doTeleportThing(getTopCreature({x = x, y = y, z = z}).uid, {x = 33353, y = 31410, z = 8})
    						doSendMagicEffect({x = 33353, y = 31410, z = 8}, CONST_ME_TELEPORT)
    					else
    						doRemoveCreature(getTopCreature({x = x, y = y, z = z}).uid)
    					end
    				end
    			end
    		end
    	end
    	return true
    end
    
    function TirarEscada()
        local escada = getTileItemById({x = 33265, y = 31116, z = 8}, 3687)
        local escada2 = getTileItemById({x = 33265, y = 31116, z = 7}, 3219)
        if escada then
            doRemoveItem(escada.uid, 1)
    	doRemoveItem(escada2.uid, 1)
    	doCreateItem(11097, 1, {x = 33265, y = 31116, z = 7})
        end
        return true
    end
    
    
    function onStepIn(cid, item, position, lastPosition)
    	start = 0
    	if item.actionid == 8014 then
    		doCreatureSay(cid, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
    		for i = 1, 4 do
    			local creature = getTopCreature(pos[i]).uid
    			if creature > 0 then
    				if isPlayer(creature) then
    					if getGlobalStorageValue(8014) < 1 then
    						if getPlayerStorageValue(creature, 1050) == 19 then
    							start = start + 1
    						end
    					end
    				end
    			end
    		end
    		if start == 4 then
    			doCreatureSayWithRadius(cid, "The army is complete again. You hear a hatch opening elsewhere, followed by a grinding sound.", TALKTYPE_ORANGE_1, 33261, 31086, {x =  33261, y = 31086, z = 8})
    			doCreateItem(3687, 1, {x = 33265, y = 31116, z = 8})
    			doCreateItem(3219, 1, {x = 33265, y = 31116, z = 7})
    			addEvent(TirarEscada, 30 * 1000)
    			setGlobalStorageValue(8014, 1)
    			addEvent(setGlobalStorageValue, 8014, 0)
    			creature = ""
    			for k = 1, 4 do
    				for j = 1, 20 do
    					if(k < 3) then
    						creature = "eternal guardian"
    					else
    						creature = "lizard chosen"
    					end
    					summonPos = {x = math.random(33239, 33295), y = math.random(31100, 31132), z = 7}
    					addEvent(doSummonCreature, k * 30 * 1000, creature, summonPos)
    					addEvent(doSendMagicEffect, k * 30 * 1000, summonPos, CONST_ME_TELEPORT)
    				end
    			end
    			addEvent(doClearMissionArea, 5 * 30 * 1000, {x = 33239, y = 31100, z = 7}, {x = 33295, y = 31132, z = 7})
    			addEvent(setPlayerStorageValue, 5 * 30 * 1000, cid, 15335, 2)
    			addEvent(setPlayerStorageValue, 5 * 30 * 1000, cid, 1050, 20)
    		end
    	end
    
    return true
    end
    

    Pode fechar o topico.

     

    REP+

  4. E mais ou menos isso so que o seu doSendAnimatedText acho que não existe essa função no 1.0.

     

    [C]: in function 'debugPrint'
    data/compat.lua:305: in function 'doSendAnimatedText'
    ...volution quest/childrenOfTheRevolutionQuestClick.lua:48: in function <...volution quest/childrenOfTheRevolutionQuestClick.lua:39>

     

    E essa mensagem

     

    doCreatureSay(cid, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)

     

    Era pra quando o jogador pisase no tile ja soltava ela. Não quando executase as funções.

  5. O script funcionou porem, tem uns detalhes:

     

    Quando um jogador entra no tile e pra mandar uma mensagem:

     

    Children13.png

     

    E o seguinte, se tem 1 jogador numa pos manda 1x, se tem 2 manda 2x, se tem 3, vai mandar 4x o docreaturesay e o certo seria mandar somente uma.

     

    Outro detalhe tambem é que quando as funções fosse executada era pra executar um docreaturesay no meio da sala avisando, mas não consegui por.

     

    Children14.png

     

     

    codigo abaixo:

    local pos = {
    	{x = 33258, y = 31079, z = 8},
    	{x = 33259, y = 31089, z = 8},
    	{x = 33266, y = 31084, z = 8},
    	{x = 33263, y = 31093, z = 8}
    }
    
    
    function doClearMissionArea(fromPos, toPos)
    	for x = fromPos.x, toPos.x do
    		for y = fromPos.y, toPos.y do
    			for z = fromPos.z, toPos.z do
    				if(getTopCreature({x = x, y = y, z = z}).uid > 0) then
    					if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
    						doTeleportThing(getTopCreature({x = x, y = y, z = z}).uid, {x = 33353, y = 31410, z = 8})
    						doSendMagicEffect({x = 33353, y = 31410, z = 8}, CONST_ME_TELEPORT)
    					else
    						doRemoveCreature(getTopCreature({x = x, y = y, z = z}).uid)
    					end
    				end
    			end
    		end
    	end
    	return true
    end
    
    function TirarEscada()
        local escada = getTileItemById({x = 33265, y = 31116, z = 8}, 3687)
        local escada2 = getTileItemById({x = 33265, y = 31116, z = 7}, 3219)
        if escada then
            doRemoveItem(escada.uid, 1)
    	doRemoveItem(escada2.uid, 1)
    	doCreateItem(11097, 1, {x = 33265, y = 31116, z = 7})
        end
        return true
    end
    
    
    function onStepIn(cid, item, position, lastPosition)
    	start = 0
    	if item.actionid == 8014 then
    		for i = 1, 4 do
    			local creature = getTopCreature(pos[i]).uid
    			if creature > 0 then
    				if isPlayer(creature) then
    					if getGlobalStorageValue(8014) < 1 then
    						if getPlayerStorageValue(creature, 1050) == 19 then
    						doCreatureSay(cid, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
    							start = start + 1
    						end
    					end
    				end
    			end
    		end
    		if start == 4 then
    			doCreatureSay("The army is complete again. You hear a hatch opening elsewhere, followed by a grinding sound.", TALKTYPE_ORANGE_1, false, cid, {x =  33261, y = 31086, z = 8})
    			doCreateItem(3687, 1, {x = 33265, y = 31116, z = 8})
    			doCreateItem(3219, 1, {x = 33265, y = 31116, z = 7})
    			addEvent(TirarEscada, 30 * 1000)
    			setGlobalStorageValue(8014, 1)
    			addEvent(setGlobalStorageValue, 8014, 0)
    			creature = ""
    			for k = 1, 4 do
    				for j = 1, 20 do
    					if(k < 3) then
    						creature = "eternal guardian"
    					else
    						creature = "lizard chosen"
    					end
    					summonPos = {x = math.random(33239, 33295), y = math.random(31100, 31132), z = 7}
    					addEvent(doSummonCreature, k * 30 * 1000, creature, summonPos)
    					addEvent(doSendMagicEffect, k * 30 * 1000, summonPos, CONST_ME_TELEPORT)
    				end
    			end
    			addEvent(doClearMissionArea, 5 * 30 * 1000, {x = 33239, y = 31100, z = 7}, {x = 33295, y = 31132, z = 7})
    			addEvent(setPlayerStorageValue, 5 * 30 * 1000, cid, 15335, 2)
    			addEvent(setPlayerStorageValue, 5 * 30 * 1000, cid, 1050, 20)
    		end
    	end
    
    return true
    end
    
  6. E o seu ultimo script que tu edito, estava percebendo que esta checando as 4 posições sim, porque,

     

    function onStepIn(cid, item, position, lastPosition)
    start = 0
    if item.actionid == 8014 then
    for i = 1, 4 do
    local creature = getTopCreature(pos).uid
    if creature > 0 then
    if isPlayer(creature) then
    if getGlobalStorageValue(8014) < 1 then
    if getPlayerStorageValue(creature, 1050) == 19 then
    doCreatureSay(creature, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
    start = start + 1
    end
    end
    end
    end
    end

     

     

    Sempre quando um jogador passa no tile solta o doCreatureSay em cima dos outros jogadores que esta em suas respectivas posições, so que quando os 4 esta no tile o script não inicia o evento e essa mensagem o certo seria no final quando iniciase o evento.

     

     

    if start == 4 then
    doCreatureSay(creature, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
    doCreateItem(3687, 1, {x = 33265, y = 31116, z = 8})
    doCreateItem(3219, 1, {x = 33265, y = 31116, z = 7})
    addEvent(TirarEscada, 30 * 1000)
    setGlobalStorageValue(8014, 1)
    addEvent(setGlobalStorageValue, 8014, 0)
    creature = ""
    for k = 1, 4 do
    for j = 1, 20 do
    if(k < 3) then
    creature = "eternal guardian"
    else
    creature = "lizard chosen"
    end
    summonPos = {x = math.random(33239, 33295), y = math.random(31100, 31132), z = 7}
    addEvent(doSummonCreature, k * 30 * 1000, creature, summonPos)
    addEvent(doSendMagicEffect, k * 30 * 1000, summonPos, CONST_ME_TELEPORT)
    end
    end
    addEvent(doClearMissionArea, 5 * 30 * 1000, {x = 33239, y = 31100, z = 7}, {x = 33295, y = 31132, z = 7})
    addEvent(setPlayerStorageValue, 5 * 30 * 1000, cid, 15335, 2)
    addEvent(setPlayerStorageValue, 5 * 30 * 1000, cid, 1050, 20)
    end
    end

    return true
    end

  7. O seu ultimo script agora deu erro quando somente um passa na posição:

     

    Lua Script Error: [MoveEvents Interface]
    data/movements/scripts/children of the revolution quest/childrenOfTheRevolutionQuestClick.lua:onStepIn
    ...volution quest/childrenOfTheRevolutionQuestClick.lua:44: attempt to call global 'getThingFromPos' (a nil value)
    stack traceback:
    [C]: in function 'getThingFromPos'
    ...volution quest/childrenOfTheRevolutionQuestClick.lua:44: in function <...volution quest/childrenOfTheRevolutionQuestClick.lua:39>

  8. Gostaria de uma pequena ajuda em um script de movements de uma quest que estou fazendo, é o seguinte:

     

    E uma quest que 4 jogadores pisam em um tile é abre uma escada ao sul, eu consegui fazer tudo, porem quando somente um jogador pisa ja abre a escada e executa suas funções. Gostaria que somente quando os 4 jogadores com tal storage executava as funções.

    local pos = {
    	{x = 33258, y = 31079, z = 8},
    	{x = 33259, y = 31089, z = 8},
    	{x = 33266, y = 31084, z = 8},
    	{x = 33263, y = 31093, z = 8}
    }
    
    
    function doClearMissionArea(fromPos, toPos)
    	for x = fromPos.x, toPos.x do
    		for y = fromPos.y, toPos.y do
    			for z = fromPos.z, toPos.z do
    				if(getTopCreature({x = x, y = y, z = z}).uid > 0) then
    					if(isPlayer(getTopCreature({x = x, y = y, z = z}).uid)) then
    						doTeleportThing(getTopCreature({x = x, y = y, z = z}).uid, {x = 33353, y = 31410, z = 8})
    						doSendMagicEffect({x = 33353, y = 31410, z = 8}, CONST_ME_TELEPORT)
    					else
    						doRemoveCreature(getTopCreature({x = x, y = y, z = z}).uid)
    					end
    				end
    			end
    		end
    	end
    	return true
    end
    
    function TirarEscada()
        local escada = getTileItemById({x = 33265, y = 31116, z = 8}, 3687)
        local escada2 = getTileItemById({x = 33265, y = 31116, z = 7}, 3219)
        if escada then
            doRemoveItem(escada.uid, 1)
    	doRemoveItem(escada2.uid, 1)
    	doCreateItem(11097, 1, {x = 33265, y = 31116, z = 7})	
        end
        return true
    end
    
    
    function onStepIn(cid, item, position, lastPosition)
    	start = false
    	if(getPlayerStorageValue(cid, 1050) == 19) then
    		if(item.actionid == 8014) then
    			for i = 1, 4 do
    				if(getTopCreature(pos[i]).uid > 0) then
    					if(isPlayer(getTopCreature(pos[i]).uid)) then
    						if(getGlobalStorageValue(8014) < 1) then
    							doCreatureSay(getTopCreature(pos[i]).uid, "A clicking sound tatters the silence.", TALKTYPE_ORANGE_1)
    							start = true
    						end
    					end
    				end
    			end				
    			if(start == true) then				
    				doCreateItem(3687, 1, {x = 33265, y = 31116, z = 8})
    				doCreateItem(3219, 1, {x = 33265, y = 31116, z = 7})
    				addEvent(TirarEscada, 30 * 1000)
    				setGlobalStorageValue(8014, 1)
    				addEvent(setGlobalStorageValue, 8014, 0)
    				creature = ""
    				for k = 1, 4 do
    					for j = 1, 20 do
    						if(k < 3) then
    							creature = "eternal guardian"
    						else
    							creature = "lizard chosen"
    						end
    						summonPos = {x = math.random(33239, 33295), y = math.random(31100, 31132), z = 7}
    						addEvent(doSummonCreature, k * 30 * 1000, creature, summonPos)
    						addEvent(doSendMagicEffect, k * 30 * 1000, summonPos, CONST_ME_TELEPORT)
    					end
    				end
    				addEvent(doClearMissionArea, 5 * 30 * 1000, {x = 33239, y = 31100, z = 7}, {x = 33295, y = 31132, z = 7})
    				addEvent(setPlayerStorageValue, 5 * 30 * 1000, cid, 15335, 2)
    				addEvent(setPlayerStorageValue, 5 * 30 * 1000, cid, 1050, 20)
    			end
    		end
    	end
    	return true
    end
    
  9. Gostaria de um script da seguinte maneira: ao entrar em um teleport você cai em uma sala e depois de 2 minutos nasce o monstro, e quando tiver pessoas na sala ninguem poderá entrar no teleport ate que saiam, e gostaria tambem que se players ficassem mais de 10 minutos na sala tomar kick para uma tal pos automaticamente.

     

    Obrigado.

     

  10. Olá caros jogadores, sejam todos todos muito bem vindos ao Legend OT, depois de meses de um árduo trabalho, finalmente estamos lançando definitivamente este incrível servidor para o público, então não fique ai parado e venha logo aproveitar, chame seus amigos e venha fazer muitas WARs, quests, hunts... e quem sabe ser até o TOP por aqui!

     

    O Legend OT foi planejado nos mínimos detalhes e houve um grande investimento em cima dele, portanto tenha certeza que você está jogando um servidor seríssimo. O servidor conta com um mapa styller inteiramente próprio e com muito RPG, todas as quests no questlog, site/jogo totalmente em português, diversas hunts e sistemas exclusivos, além de possuir um ótimo host dedicado, proporcionando um jogo completamente sem lag e sem quedas.

     

    Todos os items são adquiridos no jogo, não temos a finalidade de obter lucros, teremos alguns privilégios para os jogadores que contribuírem com a estabilidade do servidor, teremos apenas premium account é uma boots/ring de regeneração que podem ser encontradas no shopping.

     

    Como o servidor acabou de ser lançado, pode ocorrer de ainda haver pequenos bugs, portanto, se você ver algum reporte-o utilizando nossa página de atendimento. Lembre-se de utilizar o comando !pos e nos enviar a posição se for bug de mapa ou algo do tipo.

     

    Navegue em nosso site para conferir todas as informações, caso tenha alguma duvida entre em contato pelo facebook ou in-game. Em breve estaremos fazendo promoções de pontos, não se esqueça de visitar o site diariamente.

     

    IP: www.legendot.net
    Site: www.legendot.net
    Versão: 8.60
    Exp: 150x

    Loot: 3.5x

    Skills: 30x

    Magic: 20x

     

    Atenciosamente,
    Legend Team

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...