
NOMEZ
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
NOMEZ deu reputação a tev em [10.77] Mapa: ExysiaTamanho: 29.8 MB
Conteúdo: Há houses e spawns, tudo 100%.
Categoria: Mapa.
Versão: 10.77
Créditos: Peonso
Tópico: tev
Anexos: Scan | Download
Screenshot;
-
NOMEZ deu reputação a Tricoder em [TFS 1.x] Zombie EventNome: Zombie Event Versão TFS: 1.x Créditos: Printer Preview
http://2.1m.yt/xHhGcL9.png
Características
Quantidade minima e máxima de players e zombies. Começar automaticamente através do Globalevent ou por comando. Se juntar ao evento através do teleport ou do comando. Contagem de zumbis e de mortes. Três troféus com descrição e data. BUGS CORRIGIDOS!
Atenção
Adicione no-logout tool do RME na sala de espera e também na área do evento.
Tutorial
data/creaturescripts/creaturescripts.xml
<!-- Zombie Event --> <event type="preparedeath" name="ZombiePlayerDeath" script="player/zombieEventDeath.lua" /> <event type="death" name="ZombieOnDeath" script="player/zombieEventDeath.lua" /> data/creaturescripts/scripts/zombieEventDeath.lua
function onDeath(monster, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) -- Send text and effect monster:say("I WILL BE BACK!", TALKTYPE_MONSTER_YELL) monster:getPosition():sendMagicEffect(CONST_ME_MORTAREA) -- Remove zombie count, when it dies Game.setStorageValue(ze_zombieCountGlobalStorage, getZombieEventZombieCount() - 1) -- Store player kills local killerId = killer:getId() if zombieKillCount[killerId] ~= nil then zombieKillCount[killerId] = zombieKillCount[killerId] + 1 else zombieKillCount[killerId] = 1 end return true end function onPrepareDeath(player, killer) -- Remove player from count local count = getZombieEventJoinedCount() Game.setStorageValue(ze_joinCountGlobalStorage, count - 1) -- Reset player after death player:teleportTo(player:getTown():getTemplePosition()) player:setStorageValue(ze_joinStorage, 0) player:addHealth(player:getMaxHealth()) player:addMana(player:getMaxMana()) -- Let's reward the 3 last players if count <= 3 then local playerName = player:getName() local trophy = ze_trophiesTable[count] local item = player:addItem(trophy.itemid, 1) if item then item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, string.format("%s %s\n%s.", playerName, trophy.description, os.date("%x"))) end -- Store kill count and remove from table to avoid memory leak local playerId, killCount = player:getId(), 0 if zombieKillCount[playerId] ~= nil then killCount = zombieKillCount[playerId] zombieKillCount[playerId] = nil end -- Broadcast Game.broadcastMessage(string.format("%d place goes to %s of Zombie Event versus %d Zombies and slained %d Zombies.", count, playerName, getZombieEventZombieCount(), killCount)) -- The last player died, let's reset the event if count <= 1 then resetZombieEvent() end end return false end data/movements/movements.xml
<!-- Zombie Event --> <movevent event="StepIn" actionid="7000" script="zombieEventTeleport.lua" /> data/movements/scripts/zombieEventTeleport.lua
data/talkactions/talkactions.xml
<talkaction words="!zombie" separator=" " script="zombieEventCommands.lua" /> data/talkactions/scripts/zombieEventCommands.lua
data/global.lua
dofile('data/zombieEvent.lua') data/zombieEvent.lua
data/monsters/Zombie Event.xml