Ir para conteúdo
  • Cadastre-se

Sitema/Mod [MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]


Posts Recomendados

  • Respostas 107
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Qual dúvida ou erro poste no tópico que estarei respondendo.     Obs: Antes que me falem besteiras, coloquei para os GM'S, CM'S E GOD'S não contarem no evento, então testem apenas com j

pronto

sim, abre a lib(se você usa tudo por lua) do zombie  ou no MODS e procure por essa linha:   doCreateMonster(zombie_config.monster_name, pos, false, false, false)   e troque por essa:

Posted Images

2 horas atrás, Weslley Kiyo disse:

 

E morreu kEOPWKEPOWKOEPW

 

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes">
<config name="zombie_config"><![CDATA[
zombie_config = {
	storages = {172100, 172101, 172102}, -- n edite
	players = {min = 2, max = 30}, -- min, max players no evento
	rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, 
	timeToStartEvent = 30, -- segundos para começar o evento
	CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
	teleport = {{x=147, y=55, z=7}, {x=125 , y=304, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp
	arena = {{x=110,y=297,z=7},{x=145,y=321,z=7}}, -- area positions
	monster_name = "Zombie Event",
	timeBetweenSpawns = 20,
	min_Level = 20
}
zombie_days = {
	["Monday"] = {"13:00","18:00","20:00","22:00"},
	["Tuesday"] = {"13:00","18:00","22:50","22:00"},
	["Wednesday"] = {"21:57","18:00","20:00","23:17"},
	["Thursday"] = {"13:00","18:00","20:00","22:00"},
	["Friday"] = {"13:00","18:00","21:45","22:00"},
	["Saturday"] = {"13:00","18:00","20:00","22:00"},
	["Sunday"] = {"13:00","18:00","20:00","22:00"}
}
function removeZombieTp()
	local t = getTileItemById(zombie_config.teleport[1], 1387).uid
	return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF)
end
function ZerarStoragesZombie()
	for _, stor in pairs(zombie_config.storages) do
		setGlobalStorageValue(stor, 0)
	end
end
function getPlayersInZombieEvent()
	local t = {}
	for _, pid in pairs(getPlayersOnline()) do
		if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then 
			t[#t+1] = pid
		end
	end
	return t
end
function getZombieRewards(cid, items)
	local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID
	for _, i_i in ipairs(items) do
		local item, amount = i_i[1],i_i[2]
		if isItemStackable(item) or amount == 1 then
			doAddContainerItem(backpack, item, amount)
		else
			for i = 1, amount do
				doAddContainerItem(backpack, item, 1)
			end
		end
	end
end
function HaveCreatureZombie(area, remove)
	for x = area[1].x - 1, area[2].x + 1 do
		for y = area[1].y - 1, area[2].y + 1 do
			local pos = {x=x, y=y, z=area[1].z}
			local m = getTopCreature(pos).uid
			if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end
		end
	end
end
function spawnZombie()
   if #getPlayersInZombieEvent() > 1 then
      local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z}
         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)
         doSummonCreature(zombie_config.monster_name, pos, false)
         setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1)
         doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)
         addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000)
   end
end
function CheckZombieEvent(delay)
	if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then
		if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then
			doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
		elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then
			for _, cid in pairs(getPlayersInZombieEvent()) do
				doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
				doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
			end
			removeZombieTp()
			doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING)
			ZerarStoragesZombie()
		elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then
			removeZombieTp()
			doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.")
			for _, var in pairs(getPlayersInZombieEvent()) do
				doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
			end
			addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
		end
		addEvent(CheckZombieEvent, 60000, delay-1)
	end
end]]></config>
<event type="statschange" name="ZombieStats" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
	if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
		if #getPlayersInZombieEvent() > 1 then
			doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
			local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
			doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
			if #getPlayersInZombieEvent() == 1 then
				local winner = getPlayersInZombieEvent()[1]
				doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
				local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
				doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
				getZombieRewards(winner, zombie_config.rewards.items)
				doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false)
				doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
				doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
				HaveCreatureZombie(zombie_config.arena, true)
				ZerarStoragesZombie()
			end
		else
			doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
			HaveCreatureZombie(zombie_config.arena, true)
			ZerarStoragesZombie()
		end
		return false
	end
end
return true]]></event>
<globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[
domodlib('zombie_config')
function onThink(interval, lastExecution)
	if zombie_days[os.date("%A")] then
		local hrs = tostring(os.date("%X")):sub(1, 5)
		if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then
			local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
			doItemSetAttribute(tp, "aid", 45110)
			CheckZombieEvent(zombie_config.CheckTime)
			setGlobalStorageValue(zombie_config.storages[1], 0)
			setGlobalStorageValue(zombie_config.storages[2], 0)
			HaveCreatureZombie(zombie_config.arena, true) 
		end
	end
	return true
end]]></globalevent>
<event type="login" name="Zombie_Login" event="script"><![CDATA[
domodlib('zombie_config')
function onLogin(cid)
	registerCreatureEvent(cid, "ZombieBattle")
	registerCreatureEvent(cid, "ZombieStats")
	if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
		doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
	end
	return true
end]]></event>
<event type="combat" name="ZombieBattle" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
	doPlayerSendCancel(cid, "You may not attack this player.") return false
end
return true
]]></event>
<movevent type="StepIn" actionid ="45110" event="script"><![CDATA[
domodlib('zombie_config')
function onStepIn(cid, item, position, fromPosition)
	if not isPlayer(cid) then return true end
	if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end
	if getPlayerLevel(cid) < zombie_config.min_Level then
		doTeleportThing(cid, fromPosition, true)
		doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".")
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
		return true
	end
	if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then
		doTeleportThing(cid, zombie_config.teleport[2])
		setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
		doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
		if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then
			setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
			removeZombieTp()
			doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.")
			for _, var in pairs(getPlayersInZombieEvent()) do
				doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
			end
			addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
		end 
	end
	return true
end]]></movevent>
<talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[
domodlib('zombie_config')
	if getGlobalStorageValue(zombie_config.storages[3]) > 0 then
		doPlayerSendCancel(cid, "The event is already starting.") return true
	elseif not param or not tonumber(param) then 
		doPlayerSendCancel(cid, "Use only numbers.") return true 
	end
	local param = tonumber(param) <= 0 and 1 or tonumber(param)
	local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
		doItemSetAttribute(tp, "aid", 45110)
		CheckZombieEvent(tonumber(param))
		ZerarStoragesZombie()
		setGlobalStorageValue(zombie_config.storages[3], 1)
		HaveCreatureZombie(zombie_config.arena, true)
]]></talkaction>
<globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[
domodlib('zombie_config')
ZerarStoragesZombie()
return true]]></globalevent>
</mod>

 

-------------------

não esquece de mudar a tag do globalevents se o seu servidor for em milesegundos... de 60 para 60000

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
6 horas atrás, Vodkart disse:

 

 

  Mostrar conteúdo oculto

 



<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes">
<config name="zombie_config"><![CDATA[
zombie_config = {
	storages = {172100, 172101, 172102}, -- n edite
	players = {min = 2, max = 30}, -- min, max players no evento
	rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, 
	timeToStartEvent = 30, -- segundos para começar o evento
	CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
	teleport = {{x=147, y=55, z=7}, {x=125 , y=304, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp
	arena = {{x=110,y=297,z=7},{x=145,y=321,z=7}}, -- area positions
	monster_name = "Zombie Event",
	timeBetweenSpawns = 20,
	min_Level = 20
}
zombie_days = {
	["Monday"] = {"13:00","18:00","20:00","22:00"},
	["Tuesday"] = {"13:00","18:00","22:50","22:00"},
	["Wednesday"] = {"21:57","18:00","20:00","23:17"},
	["Thursday"] = {"13:00","18:00","20:00","22:00"},
	["Friday"] = {"13:00","18:00","21:45","22:00"},
	["Saturday"] = {"13:00","18:00","20:00","22:00"},
	["Sunday"] = {"13:00","18:00","20:00","22:00"}
}
function removeZombieTp()
	local t = getTileItemById(zombie_config.teleport[1], 1387).uid
	return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF)
end
function ZerarStoragesZombie()
	for _, stor in pairs(zombie_config.storages) do
		setGlobalStorageValue(stor, 0)
	end
end
function getPlayersInZombieEvent()
	local t = {}
	for _, pid in pairs(getPlayersOnline()) do
		if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then 
			t[#t+1] = pid
		end
	end
	return t
end
function getZombieRewards(cid, items)
	local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID
	for _, i_i in ipairs(items) do
		local item, amount = i_i[1],i_i[2]
		if isItemStackable(item) or amount == 1 then
			doAddContainerItem(backpack, item, amount)
		else
			for i = 1, amount do
				doAddContainerItem(backpack, item, 1)
			end
		end
	end
end
function HaveCreatureZombie(area, remove)
	for x = area[1].x - 1, area[2].x + 1 do
		for y = area[1].y - 1, area[2].y + 1 do
			local pos = {x=x, y=y, z=area[1].z}
			local m = getTopCreature(pos).uid
			if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end
		end
	end
end
function spawnZombie()
   if #getPlayersInZombieEvent() > 1 then
      local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z}
         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)
         doSummonCreature(zombie_config.monster_name, pos, false)
         setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1)
         doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)
         addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000)
   end
end
function CheckZombieEvent(delay)
	if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then
		if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then
			doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
		elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then
			for _, cid in pairs(getPlayersInZombieEvent()) do
				doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
				doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
			end
			removeZombieTp()
			doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING)
			ZerarStoragesZombie()
		elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then
			removeZombieTp()
			doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.")
			for _, var in pairs(getPlayersInZombieEvent()) do
				doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
			end
			addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
		end
		addEvent(CheckZombieEvent, 60000, delay-1)
	end
end]]></config>
<event type="statschange" name="ZombieStats" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
	if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
		if #getPlayersInZombieEvent() > 1 then
			doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
			local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
			doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
			if #getPlayersInZombieEvent() == 1 then
				local winner = getPlayersInZombieEvent()[1]
				doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
				local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
				doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
				getZombieRewards(winner, zombie_config.rewards.items)
				doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false)
				doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
				doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
				HaveCreatureZombie(zombie_config.arena, true)
				ZerarStoragesZombie()
			end
		else
			doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
			HaveCreatureZombie(zombie_config.arena, true)
			ZerarStoragesZombie()
		end
		return false
	end
end
return true]]></event>
<globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[
domodlib('zombie_config')
function onThink(interval, lastExecution)
	if zombie_days[os.date("%A")] then
		local hrs = tostring(os.date("%X")):sub(1, 5)
		if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then
			local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
			doItemSetAttribute(tp, "aid", 45110)
			CheckZombieEvent(zombie_config.CheckTime)
			setGlobalStorageValue(zombie_config.storages[1], 0)
			setGlobalStorageValue(zombie_config.storages[2], 0)
			HaveCreatureZombie(zombie_config.arena, true) 
		end
	end
	return true
end]]></globalevent>
<event type="login" name="Zombie_Login" event="script"><![CDATA[
domodlib('zombie_config')
function onLogin(cid)
	registerCreatureEvent(cid, "ZombieBattle")
	registerCreatureEvent(cid, "ZombieStats")
	if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
		doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
	end
	return true
end]]></event>
<event type="combat" name="ZombieBattle" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
	doPlayerSendCancel(cid, "You may not attack this player.") return false
end
return true
]]></event>
<movevent type="StepIn" actionid ="45110" event="script"><![CDATA[
domodlib('zombie_config')
function onStepIn(cid, item, position, fromPosition)
	if not isPlayer(cid) then return true end
	if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end
	if getPlayerLevel(cid) < zombie_config.min_Level then
		doTeleportThing(cid, fromPosition, true)
		doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".")
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
		return true
	end
	if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then
		doTeleportThing(cid, zombie_config.teleport[2])
		setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
		doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
		if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then
			setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
			removeZombieTp()
			doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.")
			for _, var in pairs(getPlayersInZombieEvent()) do
				doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
			end
			addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
		end 
	end
	return true
end]]></movevent>
<talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[
domodlib('zombie_config')
	if getGlobalStorageValue(zombie_config.storages[3]) > 0 then
		doPlayerSendCancel(cid, "The event is already starting.") return true
	elseif not param or not tonumber(param) then 
		doPlayerSendCancel(cid, "Use only numbers.") return true 
	end
	local param = tonumber(param) <= 0 and 1 or tonumber(param)
	local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
		doItemSetAttribute(tp, "aid", 45110)
		CheckZombieEvent(tonumber(param))
		ZerarStoragesZombie()
		setGlobalStorageValue(zombie_config.storages[3], 1)
		HaveCreatureZombie(zombie_config.arena, true)
]]></talkaction>
<globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[
domodlib('zombie_config')
ZerarStoragesZombie()
return true]]></globalevent>
</mod>

 

-------------------

não esquece de mudar a tag do globalevents se o seu servidor for em milesegundos... de 60 para 60000

 

AH que delicia cara. Me come, vai '-'

 

Vlw preta <3 

Link para o post
Compartilhar em outros sites
  • 2 weeks later...

Estou com o seguinte problema, ao liberar o portal o player entra nele e vai pra um local bugado, todos os pisos pretos com um único piso vermelho, como se ele fosse pra um local do mapa inexistente x=0, y=0, z-0. Eu coloquei no templo pra testar e mesmo assim ocorre o problema, minhas configurações estão assim:

 

    storages = {172100, 172101, 172102}, -- n edite
    players = {min = 3, max = 30}, -- min, max players no evento
    rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, 
    timeToStartEvent = 30, -- segundos para começar o evento
    CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
    teleport = {{x=145, y=50, z=7},{x=145 , y=46, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp
    arena = {{x=2315,y=1984,z=7},{x=2390,y=2050,z=7}}, -- area positions
    monster_name = "Zombie Event",
    timeBetweenSpawns = 20,
    min_Level = 8

 

Pode me ajudar?

Editado por davidguimaraesdrum (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 2 weeks later...

Desculpe o doble post, sei que é contra as regras, é que eu realmente estou com esse problema e precisava de uma ajuda, dessa vez trouxe mais detalhes.

 

Problema: Quando eu inicio o EVENTO, o teleporte aparece a cordenada, ao entrar no teleporte eu vou pra um local inexistente igual na imagem ANEXADA.

 

 

ARENA.png

GLOBAL.png

LIB.png

MAPA.png

ERRO.png

Link para o post
Compartilhar em outros sites

Estou com problemas, quando acaba o evento o premio vai para um player aleatório sendo que o player nem estava no evento.

E o vencedor fica no evento e não é teleportado para o templo. E não da nenhum erro na distro.

  • Will :)
Link para o post
Compartilhar em outros sites
  • 4 months later...

Aqui no meu, funcionou em partes, com alguns erros:

 

1 - Como fazer nascer mais Zombies? Pois nasceu no máximo 5. De 7 a 10 seria ótimo.

 

10:47 A zombie has spawned! There is currently 1 zombies in the zombie event!
10:47 A zombie has spawned! There is currently 2 zombies in the zombie event!

 

3 - Como remover essa premiação de trophy do script?

 

rewards = {items ={{10503,1},{9971,15}}, trophy = 6573},

 

 

 

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes">
<config name="zombie_config"><![CDATA[
zombie_config = {
	storages = {172100, 172101, 172102}, -- n edite
	players = {min = 2, max = 30}, -- min, max players no evento
	rewards = {items ={{10503,1},{9971,15}}, trophy = 6573}, 
	timeToStartEvent = 30, -- segundos para começar o evento
	CheckTime = 2, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
	teleport = {{x=1114, y=979, z=7}, {x=1839 , y=1188, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp
	arena = {{x=1825,y=1130,z=7},{x=1872,y=1192,z=7}}, -- area positions
	monster_name = "Zombie Event",
	timeBetweenSpawns = 30,
	min_Level = 500
}
zombie_days = {
	["Monday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"},
	["Tuesday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"},
	["Wednesday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"},
	["Thursday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"},
	["Friday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"},
	["Saturday"] = {"10:45","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"},
	["Sunday"] = {"09:30","11:30","13:30","15:30","17:30","19:30","21:30","23:30","01:30"}
}
function removeZombieTp()
	local t = getTileItemById(zombie_config.teleport[1], 1387).uid
	return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF)
end
function ZerarStoragesZombie()
	for _, stor in pairs(zombie_config.storages) do
		setGlobalStorageValue(stor, 0)
	end
end
function getPlayersInZombieEvent()
	local t = {}
	for _, pid in pairs(getPlayersOnline()) do
		if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then 
			t[#t+1] = pid
		end
	end
	return t
end
function getZombieRewards(cid, items)
	local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID
	for _, i_i in ipairs(items) do
		local item, amount = i_i[1],i_i[2]
		if isItemStackable(item) or amount == 1 then
			doAddContainerItem(backpack, item, amount)
		else
			for i = 1, amount do
				doAddContainerItem(backpack, item, 1)
			end
		end
	end
end
function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    if getTopCreature(pos).uid > 0 and creature then return false end
    if getTileInfo(pos).protection and pz then return false, true end
    local n = not proj and 3 or 2
    for i = 0, 255 do
        pos.stackpos = i
        local tile = getTileThingByPos(pos)
        if tile.itemid ~= 0 and not isCreature(tile.uid) then
            if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
                return false
            end
        end
    end
    return true
end
function HaveCreatureZombie(area, remove)
	for x = area[1].x - 1, area[2].x + 1 do
		for y = area[1].y - 1, area[2].y + 1 do
			local pos = {x=x, y=y, z=area[1].z}
			local m = getTopCreature(pos).uid
			if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end
		end
	end
end
function spawnZombie()
	if #getPlayersInZombieEvent() > 1 then
		local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z}
		if not isWalkable(pos, false, false, false) then 
			spawnZombie() 
		else
			doSummonCreature(zombie_config.monster_name, 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)
			setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1)
			doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)
			addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000)
		end
	end
end
function CheckZombieEvent(delay)
	if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then
		if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then
			doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
		elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then
			for _, cid in pairs(getPlayersInZombieEvent()) do
				doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
				doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
			end
			removeZombieTp()
			doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING)
			ZerarStoragesZombie()
		elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then
			removeZombieTp()
			doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.")
			for _, var in pairs(getPlayersInZombieEvent()) do
				doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
			end
			addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
		end
		addEvent(CheckZombieEvent, 60000, delay-1)
	end
end]]></config>
<event type="statschange" name="ZombieStats" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
	if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
		if #getPlayersInZombieEvent() > 1 then
			doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
			local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
			doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
			if #getPlayersInZombieEvent() == 1 then
				local winner = getPlayersInZombieEvent()[1]
				doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
				local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
				doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
				getZombieRewards(winner, zombie_config.rewards.items)
				doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false)
				doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
				doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
				HaveCreatureZombie(zombie_config.arena, true)
				ZerarStoragesZombie()
			end
		else
			doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
			HaveCreatureZombie(zombie_config.arena, true)
			ZerarStoragesZombie()
		end
		return false
	end
end
return true]]></event>
<globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[
domodlib('zombie_config')
function onThink(interval, lastExecution)
	if zombie_days[os.date("%A")] then
		local hrs = tostring(os.date("%X")):sub(1, 5)
		if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then
			local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
			doItemSetAttribute(tp, "aid", 45110)
			CheckZombieEvent(zombie_config.CheckTime)
			setGlobalStorageValue(zombie_config.storages[1], 0)
			setGlobalStorageValue(zombie_config.storages[2], 0)
			HaveCreatureZombie(zombie_config.arena, true) 
		end
	end
	return true
end]]></globalevent>
<event type="login" name="Zombie_Login" event="script"><![CDATA[
domodlib('zombie_config')
function onLogin(cid)
	registerCreatureEvent(cid, "ZombieBattle")
	registerCreatureEvent(cid, "ZombieStats")
	if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
		doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
	end
	return true
end]]></event>
<event type="combat" name="ZombieBattle" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
	doPlayerSendCancel(cid, "You may not attack this player.") return false
end
return true
]]></event>
<movevent type="StepIn" actionid ="45110" event="script"><![CDATA[
domodlib('zombie_config')
function onStepIn(cid, item, position, fromPosition)
	if not isPlayer(cid) then return true end
	if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end
	if getPlayerLevel(cid) < zombie_config.min_Level then
		doTeleportThing(cid, fromPosition, true)
		doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".")
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
		return true
	end
	if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then
		doTeleportThing(cid, zombie_config.teleport[2])
		setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
		doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
		if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then
			setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
			removeZombieTp()
			doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.")
			for _, var in pairs(getPlayersInZombieEvent()) do
				doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
			end
			addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
		end 
	end
	return true
end]]></movevent>
<talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[
domodlib('zombie_config')
	if getGlobalStorageValue(zombie_config.storages[3]) > 0 then
		doPlayerSendCancel(cid, "The event is already starting.") return true
	elseif not param or not tonumber(param) then 
		doPlayerSendCancel(cid, "Use only numbers.") return true 
	end
	local param = tonumber(param) <= 0 and 1 or tonumber(param)
	local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
		doItemSetAttribute(tp, "aid", 45110)
		CheckZombieEvent(tonumber(param))
		ZerarStoragesZombie()
		setGlobalStorageValue(zombie_config.storages[3], 1)
		HaveCreatureZombie(zombie_config.arena, true)
]]></talkaction>
<globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[
domodlib('zombie_config')
ZerarStoragesZombie()
return true]]></globalevent>
</mod>

 

 

 

 

Editado por JcA (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 3 months later...

@Vodkart ,

Evento perfeito, funcionando filé.. Porem tem algo errado, ele só sumona 7 zombies. 
Queria que fosse nascendo até o evento acabar, seguindo a ordem de 20 seg pra cada um nascer..
Pois eu uso esse mapa do meu amigo Bordin e como ele é grande, fica geral parado nas pontas sem nenhum zombie achar eles.

10:14 A zombie has spawned! There is currently 1 zombies in the zombie event!
10:15 A zombie has spawned! There is currently 2 zombies in the zombie event!
10:15 A zombie has spawned! There is currently 3 zombies in the zombie event!
10:15 A zombie has spawned! There is currently 4 zombies in the zombie event!
10:16 A zombie has spawned! There is currently 5 zombies in the zombie event!
10:16 A zombie has spawned! There is currently 6 zombies in the zombie event!
10:16 A zombie has spawned! There is currently 7 zombies in the zombie event!

 

Spoiler

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes">
<config name="zombie_config"><![CDATA[
zombie_config = {
    storages = {172100, 172101, 172102}, -- n edite
    players = {min = 2, max = 30}, -- min, max players no evento
    rewards = {items ={{9971,10},{8301,1}}, trophy = 5805}, 
    timeToStartEvent = 30, -- segundos para começar o evento
    CheckTime = 1, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
    teleport = {{x=175, y=51, z=7}, {x=549 , y=131, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp
    arena = {{x=522,y=106,z=7},{x=573,y=165,z=7}}, -- area positions
    monster_name = "Zombie Event",
    timeBetweenSpawns = 20,
    min_Level = 80
}
zombie_days = {
    ["Monday"] = {"13:00","18:00","20:00","22:00"},
    ["Tuesday"] = {"13:00","18:00","22:50","22:00"},
    ["Wednesday"] = {"21:57","18:00","20:00","23:17"},
    ["Thursday"] = {"13:00","18:00","20:00","22:00"},
    ["Friday"] = {"13:00","18:00","21:45","22:00"},
    ["Saturday"] = {"13:00","18:00","20:00","22:00"},
    ["Sunday"] = {"13:00","18:00","20:00","22:00"}
}
function removeZombieTp()
    local t = getTileItemById(zombie_config.teleport[1], 1387).uid
    return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF)
end
function ZerarStoragesZombie()
    for _, stor in pairs(zombie_config.storages) do
        setGlobalStorageValue(stor, 0)
    end
end
function getPlayersInZombieEvent()
    local t = {}
    for _, pid in pairs(getPlayersOnline()) do
        if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then 
            t[#t+1] = pid
        end
    end
    return t
end
function getZombieRewards(cid, items)
    local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID
    for _, i_i in ipairs(items) do
        local item, amount = i_i[1],i_i[2]
        if isItemStackable(item) or amount == 1 then
            doAddContainerItem(backpack, item, amount)
        else
            for i = 1, amount do
                doAddContainerItem(backpack, item, 1)
            end
        end
    end
end
function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    if getTopCreature(pos).uid > 0 and creature then return false end
    if getTileInfo(pos).protection and pz then return false, true end
    local n = not proj and 3 or 2
    for i = 0, 255 do
        pos.stackpos = i
        local tile = getTileThingByPos(pos)
        if tile.itemid ~= 0 and not isCreature(tile.uid) then
            if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
                return false
            end
        end
    end
    return true
end
function HaveCreatureZombie(area, remove)
    for x = area[1].x - 1, area[2].x + 1 do
        for y = area[1].y - 1, area[2].y + 1 do
            local pos = {x=x, y=y, z=area[1].z}
            local m = getTopCreature(pos).uid
            if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end
        end
    end
end
function spawnZombie()
    if #getPlayersInZombieEvent() > 1 then
        local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z}
        if not isWalkable(pos, false, false, false) then 
            spawnZombie() 
        else
            doSummonCreature(zombie_config.monster_name, 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)
            setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1)
            doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)
            addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000)
        end
    end
end
function CheckZombieEvent(delay)
    if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then
        if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then
            doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
        elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then
            for _, cid in pairs(getPlayersInZombieEvent()) do
                doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
            end
            removeZombieTp()
            doBroadcastMessage("[Zombie Event] The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING)
            ZerarStoragesZombie()
        elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then
            removeZombieTp()
            doBroadcastMessage("[Zombie Event] The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.")
            for _, var in pairs(getPlayersInZombieEvent()) do
                doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "[Zombie Event] The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
            end
            addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
        end
        addEvent(CheckZombieEvent, 60000, delay-1)
    end
end]]></config>
<event type="statschange" name="ZombieStats" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
    if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
        if #getPlayersInZombieEvent() > 1 then
            doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
            local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
            doItemSetAttribute(corpse, "description", "[Zombie Event] You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
            doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
            if #getPlayersInZombieEvent() == 1 then
                local winner = getPlayersInZombieEvent()[1]
                doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
                local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
                doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
                getZombieRewards(winner, zombie_config.rewards.items)
                doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false)
                doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
                doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
                HaveCreatureZombie(zombie_config.arena, true)
                ZerarStoragesZombie()
            end
        else
            doBroadcastMessage("[Zombie Event] No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
            HaveCreatureZombie(zombie_config.arena, true)
            ZerarStoragesZombie()
        end
        return false
    end
end
return true]]></event>
<globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[
domodlib('zombie_config')
function onThink(interval, lastExecution)
    if zombie_days[os.date("%A")] then
        local hrs = tostring(os.date("%X")):sub(1, 5)
        if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then
            local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
            doItemSetAttribute(tp, "aid", 45110)
            CheckZombieEvent(zombie_config.CheckTime)
            setGlobalStorageValue(zombie_config.storages[1], 0)
            setGlobalStorageValue(zombie_config.storages[2], 0)
            HaveCreatureZombie(zombie_config.arena, true) 
        end
    end
    return true
end]]></globalevent>
<event type="login" name="Zombie_Login" event="script"><![CDATA[
domodlib('zombie_config')
function onLogin(cid)
    registerCreatureEvent(cid, "ZombieBattle")
    registerCreatureEvent(cid, "ZombieStats")
    if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    end
    return true
end]]></event>
<event type="combat" name="ZombieBattle" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
    doPlayerSendCancel(cid, "You may not attack this player.") return false
end
return true
]]></event>
<movevent type="StepIn" actionid ="45110" event="script"><![CDATA[
domodlib('zombie_config')
function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) then return true end
    if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end
    if getPlayerLevel(cid) < zombie_config.min_Level then
        doTeleportThing(cid, fromPosition, true)
        doPlayerSendCancel(cid, "[Zombie Event] You need to be at least level " .. zombie_config.min_Level .. ".")
        doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
        return true
    end
    if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then
        doTeleportThing(cid, zombie_config.teleport[2])
        setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
        doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
        if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then
            setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
            removeZombieTp()
            doBroadcastMessage("[Zombie Event] The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.")
            for _, var in pairs(getPlayersInZombieEvent()) do
                doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "[Zombie Event] The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
            end
            addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
        end 
    end
    return true
end]]></movevent>
<talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[
domodlib('zombie_config')
    if getGlobalStorageValue(zombie_config.storages[3]) > 0 then
        doPlayerSendCancel(cid, "[Zombie Event] The event is already starting.") return true
    elseif not param or not tonumber(param) then 
        doPlayerSendCancel(cid, "[Zombie Event] Use only numbers.") return true 
    end
    local param = tonumber(param) <= 0 and 1 or tonumber(param)
    local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
        doItemSetAttribute(tp, "aid", 45110)
        CheckZombieEvent(tonumber(param))
        ZerarStoragesZombie()
        setGlobalStorageValue(zombie_config.storages[3], 1)
        HaveCreatureZombie(zombie_config.arena, true)
]]></talkaction>
<globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[
domodlib('zombie_config')
ZerarStoragesZombie()
return true]]></globalevent>
</mod>

 

Link para o post
Compartilhar em outros sites
Em 04/12/2017 em 10:37, brendoonh disse:

@Vodkart ,

Evento perfeito, funcionando filé.. Porem tem algo errado, ele só sumona 7 zombies. 
Queria que fosse nascendo até o evento acabar, seguindo a ordem de 20 seg pra cada um nascer..
Pois eu uso esse mapa do meu amigo Bordin e como ele é grande, fica geral parado nas pontas sem nenhum zombie achar eles.

10:14 A zombie has spawned! There is currently 1 zombies in the zombie event!
10:15 A zombie has spawned! There is currently 2 zombies in the zombie event!
10:15 A zombie has spawned! There is currently 3 zombies in the zombie event!
10:15 A zombie has spawned! There is currently 4 zombies in the zombie event!
10:16 A zombie has spawned! There is currently 5 zombies in the zombie event!
10:16 A zombie has spawned! There is currently 6 zombies in the zombie event!
10:16 A zombie has spawned! There is currently 7 zombies in the zombie event!

 

  Mostrar conteúdo oculto

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes">
<config name="zombie_config"><![CDATA[
zombie_config = {
    storages = {172100, 172101, 172102}, -- n edite
    players = {min = 2, max = 30}, -- min, max players no evento
    rewards = {items ={{9971,10},{8301,1}}, trophy = 5805}, 
    timeToStartEvent = 30, -- segundos para começar o evento
    CheckTime = 1, -- tempo que o TP fica aberto para os jogadores adrentarem o evento
    teleport = {{x=175, y=51, z=7}, {x=549 , y=131, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp
    arena = {{x=522,y=106,z=7},{x=573,y=165,z=7}}, -- area positions
    monster_name = "Zombie Event",
    timeBetweenSpawns = 20,
    min_Level = 80
}
zombie_days = {
    ["Monday"] = {"13:00","18:00","20:00","22:00"},
    ["Tuesday"] = {"13:00","18:00","22:50","22:00"},
    ["Wednesday"] = {"21:57","18:00","20:00","23:17"},
    ["Thursday"] = {"13:00","18:00","20:00","22:00"},
    ["Friday"] = {"13:00","18:00","21:45","22:00"},
    ["Saturday"] = {"13:00","18:00","20:00","22:00"},
    ["Sunday"] = {"13:00","18:00","20:00","22:00"}
}
function removeZombieTp()
    local t = getTileItemById(zombie_config.teleport[1], 1387).uid
    return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF)
end
function ZerarStoragesZombie()
    for _, stor in pairs(zombie_config.storages) do
        setGlobalStorageValue(stor, 0)
    end
end
function getPlayersInZombieEvent()
    local t = {}
    for _, pid in pairs(getPlayersOnline()) do
        if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then 
            t[#t+1] = pid
        end
    end
    return t
end
function getZombieRewards(cid, items)
    local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID
    for _, i_i in ipairs(items) do
        local item, amount = i_i[1],i_i[2]
        if isItemStackable(item) or amount == 1 then
            doAddContainerItem(backpack, item, amount)
        else
            for i = 1, amount do
                doAddContainerItem(backpack, item, 1)
            end
        end
    end
end
function isWalkable(pos, creature, proj, pz)-- by Nord
    if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
    if getTopCreature(pos).uid > 0 and creature then return false end
    if getTileInfo(pos).protection and pz then return false, true end
    local n = not proj and 3 or 2
    for i = 0, 255 do
        pos.stackpos = i
        local tile = getTileThingByPos(pos)
        if tile.itemid ~= 0 and not isCreature(tile.uid) then
            if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
                return false
            end
        end
    end
    return true
end
function HaveCreatureZombie(area, remove)
    for x = area[1].x - 1, area[2].x + 1 do
        for y = area[1].y - 1, area[2].y + 1 do
            local pos = {x=x, y=y, z=area[1].z}
            local m = getTopCreature(pos).uid
            if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end
        end
    end
end
function spawnZombie()
    if #getPlayersInZombieEvent() > 1 then
        local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z}
        if not isWalkable(pos, false, false, false) then 
            spawnZombie() 
        else
            doSummonCreature(zombie_config.monster_name, 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)
            setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1)
            doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED)
            addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000)
        end
    end
end
function CheckZombieEvent(delay)
    if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then
        if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then
            doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING)
        elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then
            for _, cid in pairs(getPlayersInZombieEvent()) do
                doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
                doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
            end
            removeZombieTp()
            doBroadcastMessage("[Zombie Event] The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING)
            ZerarStoragesZombie()
        elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then
            removeZombieTp()
            doBroadcastMessage("[Zombie Event] The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.")
            for _, var in pairs(getPlayersInZombieEvent()) do
                doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "[Zombie Event] The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
            end
            addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
        end
        addEvent(CheckZombieEvent, 60000, delay-1)
    end
end]]></config>
<event type="statschange" name="ZombieStats" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
    if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
        if #getPlayersInZombieEvent() > 1 then
            doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
            local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
            doItemSetAttribute(corpse, "description", "[Zombie Event] You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
            doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
            if #getPlayersInZombieEvent() == 1 then
                local winner = getPlayersInZombieEvent()[1]
                doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
                local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
                doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
                getZombieRewards(winner, zombie_config.rewards.items)
                doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false)
                doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
                doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
                HaveCreatureZombie(zombie_config.arena, true)
                ZerarStoragesZombie()
            end
        else
            doBroadcastMessage("[Zombie Event] No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
            HaveCreatureZombie(zombie_config.arena, true)
            ZerarStoragesZombie()
        end
        return false
    end
end
return true]]></event>
<globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[
domodlib('zombie_config')
function onThink(interval, lastExecution)
    if zombie_days[os.date("%A")] then
        local hrs = tostring(os.date("%X")):sub(1, 5)
        if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then
            local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
            doItemSetAttribute(tp, "aid", 45110)
            CheckZombieEvent(zombie_config.CheckTime)
            setGlobalStorageValue(zombie_config.storages[1], 0)
            setGlobalStorageValue(zombie_config.storages[2], 0)
            HaveCreatureZombie(zombie_config.arena, true) 
        end
    end
    return true
end]]></globalevent>
<event type="login" name="Zombie_Login" event="script"><![CDATA[
domodlib('zombie_config')
function onLogin(cid)
    registerCreatureEvent(cid, "ZombieBattle")
    registerCreatureEvent(cid, "ZombieStats")
    if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    end
    return true
end]]></event>
<event type="combat" name="ZombieBattle" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
    doPlayerSendCancel(cid, "You may not attack this player.") return false
end
return true
]]></event>
<movevent type="StepIn" actionid ="45110" event="script"><![CDATA[
domodlib('zombie_config')
function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) then return true end
    if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end
    if getPlayerLevel(cid) < zombie_config.min_Level then
        doTeleportThing(cid, fromPosition, true)
        doPlayerSendCancel(cid, "[Zombie Event] You need to be at least level " .. zombie_config.min_Level .. ".")
        doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
        return true
    end
    if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then
        doTeleportThing(cid, zombie_config.teleport[2])
        setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
        doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)
        if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then
            setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1)
            removeZombieTp()
            doBroadcastMessage("[Zombie Event] The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.")
            for _, var in pairs(getPlayersInZombieEvent()) do
                doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "[Zombie Event] The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!")
            end
            addEvent(spawnZombie, zombie_config.timeToStartEvent*1000)
        end 
    end
    return true
end]]></movevent>
<talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[
domodlib('zombie_config')
    if getGlobalStorageValue(zombie_config.storages[3]) > 0 then
        doPlayerSendCancel(cid, "[Zombie Event] The event is already starting.") return true
    elseif not param or not tonumber(param) then 
        doPlayerSendCancel(cid, "[Zombie Event] Use only numbers.") return true 
    end
    local param = tonumber(param) <= 0 and 1 or tonumber(param)
    local tp = doCreateItem(1387, 1, zombie_config.teleport[1])
        doItemSetAttribute(tp, "aid", 45110)
        CheckZombieEvent(tonumber(param))
        ZerarStoragesZombie()
        setGlobalStorageValue(zombie_config.storages[3], 1)
        HaveCreatureZombie(zombie_config.arena, true)
]]></talkaction>
<globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[
domodlib('zombie_config')
ZerarStoragesZombie()
return true]]></globalevent>
</mod>

 

 

creio que não... tente mudar o valor das storages ai no script e depois abrir o serve e evento.

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
19 horas atrás, Vodkart disse:

 

creio que não... tente mudar o valor das storages ai no script e depois abrir o serve e evento.

Quando eu mudo a storage, ele n sumona nada.. 
Da forma que tá o script, ele sumona só 7 , as vezes só 8 e as vezes ele sumona normal, parece que buga ... e não apresenta nenhum erro na distro

Veja na imagem, ele sumona uma quantia e para, ja aconteceu de sumunar 7, 8 e agora sumonou 13 e parou como pode ver na imagem, e o intervalo de 2 minutos sem sumonar..

Spoiler

2DaIyhh.jpg

 

Editado por brendoonh (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 2 months later...

Olar desculpa reviver mais to com problema o evento ta 99,99% para mim aqui unico problema e q qando o evento acaba ele da vitoria para um q foi morto mesmo tendo player la dentro do evento o pq disso se alguem poder ajuda???

Link para o post
Compartilhar em outros sites
  • 4 months later...
52 minutos atrás, Andersen96 disse:

Cara, achei a Postagem muito bagunçada, não se sabe aonde é pra botar os SCRIPTS.. acredito que tem muita gente leiga no assunto.. poderia melhorar a postagem?

E eu achei que você não sabe ler, porque se prestar atenção, isso é um MOD, tudo que tu tem que fazer alem de saber ler, é criar um arquivo no mode e jogar isso dentro, e depois criar seu monstro CHAMADO ZOMBIE, da uma lida no post antes de bostejar !

       112674.gif

 

 

 

Link para o post
Compartilhar em outros sites
17 minutos atrás, Andersen96 disse:

@Zzyzx Quando você fez seu cadastro no TK, você estava ciente de todas as Regras, então.. Respeita.

Você conseguiu ler as regras, ou tava bagunçada?

       112674.gif

 

 

 

Link para o post
Compartilhar em outros sites

16:40 You see a golden goblet.
It weighs 15.00 oz.
Awarded to King for winning the Zombie event.
ItemID: [5805].

Onde mudo a descrição do trofeu? (gostaria de passar para portugues)

 

JA ACHEI

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

VlVKQKC.png&key=d5c17620ae9567a1f898dd7a

 

 

 

  • 532144234_Logo_NTO_BLOOD_Finish_HIM_By_Antonio_Luckas(3).png.fd58d1af125a7e82ccdd751637e9ca93.png
Link para o post
Compartilhar em outros sites
  • 2 weeks later...

@Vodkart

Ótimo MOD, eu tive apenas 1 erro.

 

Quando o evento termina o ganhador recebe os prêmios e continua na ilha de zombie.

Quando o ganhador tenta se 'matar' indo até os zombies, os zombies desaparecem e recebo a seguinte mensagem:

15:28 No one survived in the Zombie Event.

O ganhador permanece na ilha.

 

Alguém teve este erro e sabe como resolver?

Procurei por algum erro no código comparando a parte em que o player morto é enviado para o templo e o ganhador também, não achei nada de diferente, mas não sou muito bom em programação, talvez alguém que entenda melhor saiba me dizer.

 

Parte do código:

<event type="statschange" name="ZombieStats" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
	if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
		if #getPlayersInZombieEvent() > 1 then
			doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
			local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
			doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
			if #getPlayersInZombieEvent() == 1 then
				local winner = getPlayersInZombieEvent()[1]
				doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
				local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
				doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
				getZombieRewards(winner, zombie_config.rewards.items)
				doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false)
				doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
				doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
				HaveCreatureZombie(zombie_config.arena, true)
				ZerarStoragesZombie()
			end
		else
			doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
			HaveCreatureZombie(zombie_config.arena, true)
			ZerarStoragesZombie()
		end
		return false
	end
end
return true]]></event>

 

Editado por William Oliveira (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

@William Oliveira

qual versão do seu distro e ot?

tenta usar aasim

 

<event type="statschange" name="ZombieStats" event="script"><![CDATA[
domodlib('zombie_config')
if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then
	if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then
		if #getPlayersInZombieEvent() > 1 then
			doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED)
			local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid))
			doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".")
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
			doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
			if #getPlayersInZombieEvent() == 1 then
				local winner = getPlayersInZombieEvent()[1]
				doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!')
				local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1)
				doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.")
				getZombieRewards(winner, zombie_config.rewards.items)
				doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)))
				doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT)
				doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!")
				HaveCreatureZombie(zombie_config.arena, true)
				ZerarStoragesZombie()
			end
		else
			doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE)
			HaveCreatureZombie(zombie_config.arena, true)
			ZerarStoragesZombie()
		end
		return false
	end
end
return true]]></event>

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

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 Absolute
      Olá amigos, membros, visitantes, papagaios, enfim...

      Depois de muito me pedirem o evento SNOWBAL WAR EVENT, trago ele 100% pra vocês.

      Como funciona?
      Os jogadores irão se divertir em uma emocionante partida de guerra de bolas de neve. O objetivo principal do evento é derrubar o número máximo de jogadores durante uma partida - atirando bolas de neve contra seus inimigos. O jogador que mais pontos fizer até o termino do evento será o vencedor (recompensa pode ser configurada).

      Sem delongas, vamos ao que interessa...
       
       
       
       

      Em data/actions abra o seu actions.xml e insira a seguinte linha:
       
       
      <action actionid="7900" event="script" value="snowballaction.lua" />

      Em data/actions/scripts crie um arquivo com o nome de snowballaction.lua e insira o seguinte conteúdo:
      function onUse(cid, item, frompos, item2, topos) if item.actionid == 7900 then if(SBW_AMMOINFI) then doPlayerSendTextMessage(cid, 27, "as bolas de neve sao infinitas, nao ha necessidade que voce compre-as.") else if (getPlayerStorageValue(cid, SBW_SCORE) > 0) and (getPlayerStorageValue(cid, SBW_AMMO) < 30) then doPlayerSetStorageValue(cid, SBW_SCORE, getPlayerStorageValue(cid, SBW_SCORE)-1) doPlayerSetStorageValue(cid, SBW_AMMO, getPlayerStorageValue(cid, SBW_AMMO)+SBW_AMMOBUY) doPlayerSendTextMessage(cid, 27, "Voce trocou " .. SBW_AMMOBUY .. "x bolas de neve por 1 ponto de placar.") doSendMagicEffect(getCreaturePosition(cid),4) else doPlayerSendTextMessage(cid, 27, "Voce nao possui pontos de jogo o suficiente ou ja esta carregando muitas bolas de neve.") end end end end  
       
       
       

      Em data/talkactions abra o seu talkactions.xml e insira a seguinte linha:
       
      <talkaction words="!snowball" event="script" value="snowballtalk.lua"/>

      Em data/talkactions/scripts crie um arquivo com o nome de snowballtalk.lua e insira o seguinte conteúdo:
      function onSay(cid, words, param, channel) local k = string.explode(param, ",") if(k[1] ~= nil) then if(string.upper(k[1]) == 'INFO') then local score = {} local output = "Voce tem " .. getPlayerStorageValue(cid, SBW_SCORE) .. " pontos.\nVoce tem "..getPlayerStorageValue(cid, SBW_AMMO).."x municoes.\n------------------\nO maior matador:\n" for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, SBW_INEVENT) then table.insert(score, {getCreatureName(pid), getPlayerStorageValue(pid, SBW_SCORE)}) end end local lx = table.getn(score) if(lx > 3) then lx = 3 end table.sort(score, function(a, b) return a[2] > b[2] end) for k = 1,lx do output = output .. k..". "..score[k][1] .." [".. score[k][2] .."].\n" end doPlayerPopupFYI(cid, output) end if (string.upper(k[1]) == 'ATIRAR') then if(getPlayerStorageValue(cid, SBW_INEVENT) == 1) and not getTileInfo(getThingPos(cid)).protection then if getPlayerStorageValue(cid, SBW_EXAUSTHED) <= 1 then if(getPlayerStorageValue(cid, SBW_AMMO) > 0) then if SBW_STATUS == 'on' then if(SBW_AMMOINFI == false) then doPlayerSetStorageValue(cid, SBW_AMMO, getPlayerStorageValue(cid, SBW_AMMO)-1) end doPlayerSetStorageValue(cid, SBW_EXAUSTHED, 2) lineAnimation(getPlayerLookDirection(cid),getCreaturePosition(cid),12,cid,1,0,1,0,0,0,1,0) addEvent(doPlayerSetStorageValue, SBW_SHOOTEXAUSTHED, cid, SBW_EXAUSTHED, 1) if (getPlayerStorageValue(cid, SBW_AMMO) ~= 1) then doPlayerSendTextMessage(cid, 27, "Restam "..getPlayerStorageValue(cid, SBW_AMMO).."x bolas de neve.") else doPlayerSendTextMessage(cid, 27, "Usando sua ultima bola de neve, recarregue.") end end else doPlayerSendCancel(cid, "Voce esta sem bolas de neve, recarregue no centro do campo ou mate um inimigo.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end else doPlayerPopupFYI(cid, "Acalme-se voce deve esperar para atirar novamente.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end else doPlayerPopupFYI(cid, "Voce precisa estar dentro evento ou fora da pz.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end end end return true end function lineAnimation(lookDir,playerPos,effect,cid,fvar,fpos,ffound,fposV,fcheck,fvcid,floopCounter,fvpid, name) local var = fvar local pos = fpos local found = ffound local posV = fposV local check = fcheck local vcid = fvcid local loopCounter = floopCounter local vpid = fvpid local storage = SBW_EXAUSTHED if var < 2 then vcid = cid end pos = playerPos if not isInWallArray(convert(lookDir,pos)) then--isInWallArray({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z}) then --isInArray(t.onShoot.misc.walls_id, getThingfromPos({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z, stackpos=0}).itemid) then doSendDistanceShoot(pos, convert(lookDir,pos),effect) pos = convert(lookDir,pos) var=var+1 posV = convertV(lookDir,playerPos) for _, pid in ipairs(getPlayersOnline()) do if (getCreaturePosition(pid).x == pos.x and getCreaturePosition(pid).y == pos.y and getCreaturePosition(pid).z == pos.z) then --if loopCounter > 2 then vpid = pid --end if (vpid ~= vcid) then if var > 2 then if (getCreaturePosition(pid).x == posV.x and getCreaturePosition(pid).y == posV.y and getCreaturePosition(pid).z == posV.z) then killPlayer(pid,pos,getCreatureName(vcid)) if (lookDir == 0) or (lookDir == 2) then var = 6 else var = 8 end end end killPlayer(pid,pos,vcid) if (lookDir == 0) or (lookDir == 2) then var = 6 else var = 8 end end end loopCounter = loopCounter +1 end if (lookDir == 0) or (lookDir == 2) then if var ~= 6 then addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) else var = 1 end else if var ~= 8 then addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) else var = 1 end end else doSendMagicEffect(convert(lookDir,pos),2) var = 1 end end local ret = {} function convert(lookDir,pos) local positions = { [0] = {x = pos.x, y = pos.y-1, z = pos.z}, [1] = {x = pos.x+1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y+1, z = pos.z}, [3] = {x = pos.x-1, y = pos.y, z = pos.z} } ret = positions[lookDir] return ret end local ret = {} function convertV(lookDir,pos) local positions = { [0] = {x = pos.x, y = pos.y+1, z = pos.z}, [1] = {x = pos.x-1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y-1, z = pos.z}, [3] = {x = pos.x+1, y = pos.y, z = pos.z} } ret = positions[lookDir] return ret end function isInWallArray(pos) for k = 0, table.getn(SBW_WALLSID) do if getTileItemById(pos, SBW_WALLSID[k]).itemid == SBW_WALLSID[k] then --this doesn't even make sense but tried other ways and it gave errors, so meh 2lazy2search return true end end return false end function killPlayer(cid, pos, killer) local t_l = SBW_AREA[1] local b_r = SBW_AREA[2] local posti = {} local isPossibleToTeleportPlayer = false while (isPossibleToTeleportPlayer == FALSE) do posti = Position(math.random(t_l.x,b_r.x), math.random(t_l.y, b_r.y), 7) if isInWallArray(posti) == FALSE then isPossibleToTeleportPlayer = TRUE end end doTeleportThing(cid, posti) doSendMagicEffect(pos,2) doSendMagicEffect(posti,6) doSendAnimatedText(pos, ""..getCreatureName(killer).." ", 55) doPlayerSendTextMessage(cid, 27, "Voce morreu para "..getCreatureName(killer)..".") doPlayerSetStorageValue(killer, SBW_SCORE, getPlayerStorageValue(killer, SBW_SCORE)+SBW_POINTSKILL) doPlayerSendTextMessage(killer, 27, "You've killed "..getCreatureName(cid)..".") if SBW_LOSTSCORE then doPlayerSetStorageValue(cid, SBW_SCORE, getPlayerStorageValue(cid, SBW_SCORE)-1) end if SBW_RESETAMMO then doPlayerSetStorageValue(cid, SBW_AMMO, SBW_MINAMMO) end end  
       
       
       
       
      Em data/globalevents abra o seu globalevents.xml e insira a seguinte linha:
      <globalevent name="StartSBW" time="19:00" event="script" value="events/snowballglobalevent.lua"/>
      Em data/globalevents/scripts crie um arquivo com o nome de snowballglobalevent.lua e insira o seguinte conteúdo:
      function onTime() function isInWallArray(pos) for k = 0, table.getn(SBW_WALLSID) do if (getTileItemById(pos, SBW_WALLSID[k]).itemid == SBW_WALLSID[k]) then return true end end return false end function endsnowball() local score = {} if not SBW_USEWAIT then doRemoveItem(getTileItemById(SBW_TP, 1387).uid) end for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, SBW_INEVENT) > 0 then table.insert(score, {getCreatureName(pid), getPlayerStorageValue(pid, SBW_SCORE)}) doPlayerSetStorageValue(pid, SBW_INEVENT, 0) doPlayerSetStorageValue(pid, SBW_SCORE, 0) doPlayerSetStorageValue(pid, SBW_AMMO, 0) doTeleportThing(pid, SBW_TPEND) end end table.sort(score, function(a, b) return a[2] > b[2] end) --local random_item = SBW_REWARDS[math.random(1, #SBW_REWARDS)] local hora = os.date("%X") local data = os.date("%x") if table.getn(score) > 0 then if SBW_ADDREWARD then for _, pid in ipairs(getPlayersOnline()) do if getCreatureName(pid) == score[1][1] then for op,ad in pairs(SBW_REWARDS) do doPlayerAddItem(pid, ad[1], ad[2]) end break end end end db.query("INSERT INTO `snowballwar` VALUES ('', ".. db.escapeString(score[1][1]) .. ",".. score[1][2] ..", ".. db.escapeString(data) ..", ".. db.escapeString(hora) ..");") db.query("UPDATE `players` SET `sbw_points`=`sbw_points`+".. score[1][2] .." WHERE `name` = " .. db.escapeString(score[1][1]) .. ";") doBroadcastMessage("[SNOWBALL EVENT] encerrou-se, parabens ao jogador "..score[1][1].." que venceu o SnowBall Event com "..score[1][2].." pontos.") end return true end local t_l = SBW_AREA[1] local b_r = SBW_AREA[2] function moveToEvent() for _, pid in ipairs(getPlayersOnline()) do if isInRange(getCreaturePosition(pid), SBW_WAITROOM[1], SBW_WAITROOM[2]) then local posti = {} local isPossibleToTeleportPlayer = false while (isPossibleToTeleportPlayer == FALSE) do posti = Position(math.random(t_l.x,b_r.x), math.random(t_l.y, b_r.y), 7) if (isInWallArray(posti) == FALSE) then isPossibleToTeleportPlayer = TRUE end end doTeleportThing(pid, posti) doPlayerSetStorageValue(pid, SBW_INEVENT, 1) doPlayerSetStorageValue(pid, SBW_AMMO, SBW_MINAMMO) doPlayerSetStorageValue(pid, SBW_SCORE, 0) doPlayerSendTextMessage(pid, 27, "[SNOWBALL WAR] Seja bem vindo, aqui estao os comandos que voce vai usar durante o evento\n!snowball atirar --Atirar uma bola de neve.\n!snowball info --Isso mostra seus pontos de jogos e a quantia de bolas de neve que voce tem. Tambem mostra o ranking de pontos do evento.\n Recarregue suas bolas de neve clicando em frente ao gerador no centro do campo.\nAltamente recomendado adicionar estes comandos a sua hotkeys.") end end doRemoveItem(getTileItemById(SBW_TP, 1387).uid) addEvent(endsnowball, SBW_DURATION*1000*60) doBroadcastMessage(SBW_MSGSTART) end local time = os.date("*t") local timeopen1 = math.ceil(SBW_TIMEWAIT / 4) local timeopen2 = math.ceil(SBW_TIMEWAIT / 2) if (SBW_STARTAUTO) and (isInArray(SBW_DAYS,time.wday)) then doBroadcastMessage(SBW_MSGWARNING) if SBW_USEWAIT then addEvent(doBroadcastMessage, timeopen1*1000*60, "[SNOWBALL WAR] - Resta(m) ".. timeopen2 .." minuto(s) para iniciar o evento!") if (timeopen2 ~= timeopen1) then addEvent(doBroadcastMessage, timeopen2*1000*60, "[SNOWBALL WAR] - Resta(m) ".. timeopen1 .." minuto(s) para iniciar o evento!") end addEvent(moveToEvent, SBW_TIMEWAIT*1000*60) doCreateTeleport(1387, SBW_TPGO, SBW_TP) else if SBW_TFS == "0.3" then doItemSetAttribute(doCreateItem(1387, SBW_TP), "aid", 2880) else doSetItemActionId(doCreateItem(1387, SBW_TP), 2880) end if(SBW_DURATION > 0) then addEvent(endsnowball, SBW_DURATION*1000*60) end end end return true end  
       
       
       
       
      Em data/movements abra o seu movements.xml e insira a seguinte linha:
      <movevent type="StepIn" actionid ="2880" event="script" value="snowballmovement.lua"/>  
      Em data/movements/scripts crie um arquivo com o nome de snowballglobalmovement.lua e insira o seguinte conteúdo:
      function onStepIn(cid, item, pos) doTeleportThing(cid, SBW_TPGO) doBroadcastMessage("[SNOWBALL WAR] O " ..getCreatureName(cid).. " player esta participando do evento snowball.", MESSAGE_STATUS_CONSOLE_ORANGE) doPlayerSetStorageValue(cid, SBW_INEVENT, 1) doPlayerSetStorageValue(cid, SBW_AMMO, SBW_MINAMMO) doPlayerSetStorageValue(cid, SBW_SCORE, 0) end  
       
       
       
       
      Já estamos quase terminando!
      Agora em data/lib crie um arquivo com o nome de SBW.lua com o seguinte conteúdo:
       
      -- This script is part of Snow Ball War Event Tibiaking Absolute -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // -- POSIÇÕES IMPORTANTES SBW_AREA = {{x = 1214, y = 1205, z = 7}, {x = 1251, y = 1242, z = 7}}-- AREA DO EVENTO | Canto superior esquerdo / inferior direito SBW_WAITROOM = {{x = 1229, y = 1220, z = 6}, {x = 1235, y = 1226, z = 6}} -- AREA DE ESPERA | Canto superior esquerdo / inferior direito SBW_TP = {x = 165, y = 45, z = 7} -- local onde teleport sera criado (entrada de jogadores) SBW_TPGO = {x = 1232, y = 1223, z = 6} -- local onde teleport vai levar (saida de jogadores) SBW_TPEND = {x = 155, y = 54, z = 7} -- local onde serao teleport ao final do evento SBW_GERADOR = {x = 1232, y = 1223, z = 7} -- local onde gerador vai ficar -- CONFIGURAÇÕES DO EVENTO SBW_DAYS = {1,2,3,4,5,6,7} -- dias de semana que vai abrir SBW_DURATION = 10 -- duração do evento em minutos SBW_POINTSKILL = 1 -- pontos de jogo por morte SBW_AMMOBUY = 20 -- quantia de munições compradas por cada ponto SBW_MINAMMO = 50 -- munição inicial dos jogadores SBW_TIMEWAIT = 3 -- tempo na sala de espera em minutos SBW_AMMOINFI = false SBW_LOSTSCORE = true SBW_RANDOMIZE = true SBW_RESETAMMO = true SBW_STARTAUTO = true SBW_USEWAIT = true --PREMIO DO EVENTO SBW_ADDREWARD = true SBW_REWARDS = { {6527,500}, {2345,1} } -- // Não mexa daqui para baixo SBW_TFS = "0.4" -- STORAGES SBW_EXAUSTHED = 2455 SBW_INEVENT = 2460 SBW_SCORE = 2465 SBW_AMMO = 2400 SBW_WALLSID = {5324,7003,7021,6712,7023,7002,6713,6714,6869,6822,6823,6824,6825,6826,6827,6828,6829,6830,6831,6832,6833,6707,6708,6709,6710,6711,2698,2697,7020,6719,6720,6721,6722,6723,6724,6725,6726,6727,6761,6762,6768,6769,4608,4609,4610,4611,4612,4613,4614,4615,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4664,4665,4666,7008,7009,7010,7011,8239,7004,7005,7006,7007,6627,6628,6629,6630,6631,6632,6633,6634,6635,6636,6637,6638,7022} SBW_BALLSPEED = 150 SBW_SHOOTEXAUSTHED = 1000 SBW_SHOOTDIR = 0 SBW_STATUS = 'on' -- MENSAGENS SBW_MSGWARNING = "[SNOWBALL WAR] Abriu o teleport de ingresso para o evento, para participar se dirija ate o templo do servidor." SBW_MSGSTART = "[SNOWBALL WAR] O teleport foi removido e o evento foi iniciado, boa sorte a todos participantes." A frente das configuração solicitadas explica onde devem ser modificados.
       
       
       
       
       
      E por fim, vá até o seu banco de dados (phpmyadmin) e insira a seguinte query:
      CREATE TABLE IF NOT EXISTS `snowballwar` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `score` int(11) NOT NULL, `data` varchar(255) NOT NULL, `hora` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;  
      Ainda no phpmyadmin execute:
      ALTER TABLE `players` ADD `sbw_points` int(11);  
       
      Importe o arquivo SNOWBALL.otbm em seu mapa!
      Imagem do mapa:


      Download do mapa: https://www.sendspace.com/file/mae37z
      Scan do mapa: https://www.virustotal.com/pt/file/94a507c71ef4cc241e415f2a8290441f7fa77809d804e24be18e9581a85c4740/analysis/1479161634/
       
       


      É importante lembrar que peguei o script de um autor e realizei as modificações o tornando público para a comunidade exclusiva do TIBIAKING.

      Espero que façam um ótimo proveito.

      See you later.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo