Ir para conteúdo
  • Cadastre-se

Normal dificuldades para adicionar mod Automatic raids


Posts Recomendados

Boa noite meus amigos do Tk, estava procurando um script de invasão e encontrei esse do Vodkart só que não consigo coloca ele pra funcionar .O meu ot e o Styller yoruts e já tem um sistema de invasão só que eu achei esse melhor porque eu posso escolher o dia e o horário, e o tempo se ninguém conseguir mata! 

<?xml version="1.0" encoding="UTF-8"?>  

<mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="tibiaking.com" enabled="yes">  

<config name="raids_func"><![CDATA[

days = {

["Monday"] = {

["21:30"] = {nome = "Orshabaal", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"5 Fire Devil", "2 Orshabaal"}, Time = 15},

["21:33"] = {nome = "Dragon", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}},m = {"100 Dragon"}, Time = 20}

},

["Sunday"] = {

["10:08"] = {nome = "Demon", pos = {fromPosition = {x=202, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 Demon"}, Time = 15},

["10:46"] = {nome = "Hydra", pos = {fromPosition = {x=197, y=57, z=7},toPosition = {x=203, y=60, z=7}}, m = {"7 Hydra", "4 Cyclops"}, Time = 20}

}

}

]]></config>    

<globalevent name="AutomaticRaids" interval="60" event="script"><![CDATA[

domodlib('raids_func')

function onThink(interval, lastExecution)  

if days[os.date("%A")] then

hours = tostring(os.date("%X")):sub(1, 5)       

tb = days[os.date("%A")][hours] 

if tb then        

function removeCreature(tb)

for x = ((tb.pos.fromPosition.x)-10), ((tb.pos.toPosition.x)+10) do

for y = ((tb.pos.fromPosition.y)-10), ((tb.pos.toPosition.y)+10) do

local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid

if m ~= 0 and isMonster(m) then

doRemoveCreature(m)

end

end

end

end

doBroadcastMessage("The invasion of " .. tb.nome .. " started")

for _,x in pairs(tb.m) do

for s = 1, tonumber(x:match("%d+")) do

pos = {x = math.random(tb.pos.fromPosition.x, tb.pos.toPosition.x), y = math.random(tb.pos.fromPosition.y, tb.pos.toPosition.y), z = tb.pos.fromPosition.z}

doSummonCreature(x:match("%s(.+)"), pos)

end

end

addEvent(removeCreature, tb.Time*60*1000, tb)

end

end

return true

end

]]></globalevent>

</mod>
Link para o post
Compartilhar em outros sites
  • Moderador

nossa , vo testa aqui depois e já te falo, mas agradeço a atenção brother!

COLOQUEI NO MOD E APARECEU ESSE ERRO !

[07/07/2016 22:16:48] [Error - GlobalEvent Interface] 
[07/07/2016 22:16:48] buffer:onThink
[07/07/2016 22:16:48] Description: 
[07/07/2016 22:16:48] [string "loadBuffer"]:5: attempt to index global 'days' (a nil value)
[07/07/2016 22:16:48] stack traceback:
[07/07/2016 22:16:48]     [string "loadBuffer"]:5: in function <[string "loadBuffer"]:3>
[07/07/2016 22:16:48] [Error - GlobalEvents::think] Couldn't execute event: AutomaticRaids

 

Link para o post
Compartilhar em outros sites
  • Moderador
  • 2 years later...
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="tibiaking.com" enabled="yes"> 
<config name="raids_func">

-- Mini-tutorial de configuração
-- Não esqueça de configurar os horários que o evento vai iniciar (OBS: O script sempre pega o horário da maquina caso a sua maquina ou vps
-- usar horário de outros lugares vai ter atraso dependendo do fuso-horário
-- nome =  Nome do evento que vai mostrar em mensagem vermelha para o servidor todo
-- pos = fromPosition = Canto Superior Direito
-- pos = toPosition = Canto Inferior Esquerdo
-- Configurando a pos corretamente pode formar um quadrado ou retangulo para os monstro não nascerem um em cima do outro
-- m = Quantidade e tipos de monstro a serem criados, pode seguir a lógica do nome do evento podendo colocar Orc porém na invasão vai ter orc, orc shaman, orc spear etc...
-- Time = Tempo que a invasão vai durar caso colocar time = 10 a invasão vai durar 10 minutos depois de 10 minutos os monstros restantes serão removidos

<![CDATA[
days = {
	-- Segunda
	["Monday"] = {
		["17:00"] = {nome = "Mulheres", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}},m = {"60 Demon", "50 Demon", "2 Lumenia"}, Time = 5},
		["21:58"] = {nome = "Homens", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}},m = {"70 Demon", "Hellhound", "3 Lazarus"}, Time = 10}
	},
	-- Terça
	["Tuesday"] = {
		["17:00"] = {nome = "Xinocas", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"90 Demon", "40 Hellhound", "1 Exp Bug"}, Time = 10},
		["22:00"] = {nome = "Xinocos", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"90 Hydra", "40 Cyclops", "2 Halloween Pumpkin"}, Time = 10}
	},
	-- Quarta
	["Wednesday"] = {
		["17:00"] = {nome = "Servegonhas", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Demon", "40 Grim Reaper", "10 Demora"}, Time = 10},
		["23:32"] = {nome = "Lazarentos", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Hydra", "40 Juggernaut", "2 Lazarus"}, Time = 10}
	},
	-- Quinta
	["Tursday"] = {
		["17:00"] = {nome = "Vizinhos", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Demon", "70 Grim Reaper", "1 Exp Bug"}, Time = 10},
		["23:15"] = {nome = "Fogosos", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Hellhound", "70 Grim Reaper", "3 The Incendier"}, Time = 10}
	},
	-- Sexta
	["Friday"] = {
		["17:00"] = {nome = "Diabolicos", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Hellhound", "70 Grim Reaper", "3 Demora"}, Time = 10},
		["22:00"] = {nome = "Sarninhas", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Hellhound", "70 Grim Reaper", "1 Exp Bug"}, Time = 10}
	},
	-- Sábado
	["Saturday"] = {
		["17:00"] = {nome = "Diabedo", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Hellhound", "70 Grim Reaper", "1 Lumenia"}, Time = 10},
		["22:00"] = {nome = "Lazarentos", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Hellhound", "70 Grim Reaper", "3 Lazarus"}, Time = 10}
	},
	-- Domingo
	["Sunday"] = {
		["20:33"] = {nome = "Malditos", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Hellhound", "70 Grim Reaper", "1 Exp Bug"}, Time = 10},
		["22:00"] = {nome = "Safados", pos = {fromPosition = {x=55, y=18, z=7},toPosition = {x=217, y=78, z=7}}, m = {"70 Demon", "Hellhound", "3 Halloween Pumpkin"}, Time = 10}
	}
}
]]></config>
<globalevent name="AutomaticRaids" interval="60000" event="script"><![CDATA[
domodlib('raids_func')
function onThink(interval, lastExecution)	
	function isWalkable(pos) -- by Nord / editado por Omega
		if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then
			return false
		elseif isCreature(getTopCreature(pos).uid) then
			return false
		elseif getTileInfo(pos).protection then
			return false
		elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then
			return false
		end
		return true
	end
	
	if days[os.date("%A")] then
		hours = tostring(os.date("%X")):sub(1, 5)
		tb = days[os.date("%A")][hours]
		if tb then
			function removeCreature(tb)
				for x = ((tb.pos.fromPosition.x)-20), ((tb.pos.toPosition.x)+20) do
					for y = ((tb.pos.fromPosition.y)-20), ((tb.pos.toPosition.y)+20) do
						local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid
						if m ~= 0 and isMonster(m) then
							doSendMagicEffect(getCreaturePosition(m), CONST_ME_MORTAREA)
							doRemoveCreature(m)
						end
					end
				end
			end
			doBroadcastMessage("Uma orda de " .. tb.nome .. " esta invadindo a cidade ajude a defende-la") -- Mensagem que vai aparecer para todos do servidor quando a invasão iniciar
			for _ , x in pairs(tb.m) do
				local c = tonumber(x:match("%d+"))
				if c > 0 then
					repeat
						local pos = {x = math.random(tb.pos.fromPosition.x, tb.pos.toPosition.x), y = math.random(tb.pos.fromPosition.y, tb.pos.toPosition.y), z = tb.pos.fromPosition.z}
						if isWalkable(pos) then
							doCreateMonster(x:match("%s(.+)"), pos)
							doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE)
							addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE)
							addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA)
							doSendMagicEffect(pos, CONST_ME_MORTAREA)
							c = c-1 
						end
					until c == 0
				end
			end
			addEvent(removeCreature, tb.Time*60*1000, tb)
			addEvent(doBroadcastMessage, tb.Time*60*1000, "A invasão de " .. tb.nome .. " acabou, os sobreviventes fugiram") -- Mensagem que vai aparecer para todos do servidor quando a invasão iniciar
		end
	end
	return true
end
]]></globalevent>
</mod>

Meu também não start... Porem quando testo em Windows vai embora.... Agora o que pode ser isso?

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.


  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo