Esse script não é seu se você corrigiu bugs mesmo assim poste o nome do dono é 2 esse script tem milhares postado no fórum .
pesquise antes de postar
Por Fausto32, 02 de abr. de 2013 em Mods, funções e outros
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

Esse script não é seu se você corrigiu bugs mesmo assim poste o nome do dono é 2 esse script tem milhares postado no fórum .
pesquise antes de postar
info
Grupo: Campones
Registrado: 30/01/13
Posts: 26
Reputação: +2

Como colocar ele automatico? Para tais dias da semana e determinado horario?
info
Grupo: Campones
Registrado: 07/09/12
Posts: 35
Reputação: +2
Char no Tibia: Bannished!

a maioria das partes peguei de um servidor que tenho não tem creditos lá .. / Opa patrão, não quero vêr milhões não .. mim mostra só 1 tão completo e por teleport .. pqê a maioria só remove o bloqueio e o portal fica aberto .. me mostra um com explicação e completo como esse tópico q removo na hora (:Esse script não é seu se você corrigiu bugs mesmo assim poste o nome do dono é 2 esse script tem milhares postado no fórum .
pesquise antes de postar
Como colocar ele automatico? Para tais dias da semana e determinado horario?
Não tem como amigo \: a graça desse sistema e ter total controle sem ter q modificar nada em script ^^' na minha opinião pelo menos (:
info
Grupo: Herói
Registrado: 25/10/12
Posts: 2.4k
Reputação: +687
Gênero: Masculino
Char no Tibia: Nuncative

Muito bom, muito bom mesmo!
Da só mais uma organizadinha no tópico, que fica melhor ainda! "tatudojuntoemisturado"
Obrigado pela contribuição! ![]()
cara o meu abre o evento certinho mais tipo escrevo /zombiestart 12 ... ai entra um cara e o portal fexa ai o cara ganha e o evento não fexa mais fica sempre aberto no meu ot e não da pra abrir outra vez
axo que o erro é que não tem um comando pra fexar o evento sacas tipo o cara ganha mais continua a summonar zumbi na area
Editado Julho 1 por sk8sk8ter
info
Grupo: Campones
Registrado: 07/09/12
Posts: 35
Reputação: +2
Char no Tibia: Bannished!
Script/Tutorial+ Php +Map +Talkaction +Portal.
Ps: Antes de falar q o topico já existe no forum teste os outros scripts
Então começando por informações basícas :
Enfim Vamos ao Evento !
Primeiro vou estar postando a pagina classica do Zombie event no Gesior que seria a parte PHP para informar os players sobre o evento.
Pagina PHP + Tutorial de como implementar ela no seu site.
Vá ate "C:/xampp/htdcos/" crie um arquivo chamado Zombieevent.php dentro coloque isso.
<?PHP
$main_content .= '<h4 id="pt">
<br>
<center><h2><b> Zombie Event</b></h2></center><br><br>
<center><object height="350" width="425"><img
src="http://i52.tinypic.c...com/wjdth1.jpg" height="700"
width="525"></object></center><br>
<br><br> </h4>
<center><b>O que é o Zombie Event?</b><br>
<br>
É um evento que acontece todos os dias as 12:00, 18:30 e 21:30 hr no
servidor.<br>
<br>
<br>
<b>Como funciona?<br></b>
<br>
Quando estiver na hora irá abrir um teleport no mesmo lugar onde aparece o
teleport da WoE, basta você entrar e aguardar o tempo para inicio do Evento,
o objetivo do jogo é correr dos zombies, a cada 20 segundos irá nascer um novo em
alguma área randomica, você deve correr pois se eles te tocarem você
automaticamente é retirado do evento e volta para o seu temple.
O ultimo jogador que sobrar vivo vence o evento.<br>
<br>
<br>
<b>Quais são os prêmios?<br></b>
<br>
O ganhador irá ganhar<b> 100k</b>, uma <b>Boots of Haste</b> e um <b>Globet com o
nome dele</b>.<br>
<br>
</center>';
?>
Depois abra o index.php em "C:/xampp/htdcos/".
case "buypoints":
$topic = "Buy Points";
$subtopic = "buypoints";
include("buypoints.php");
break;
Cole isso:
case "zombieevent":
$topic = "Zombie event";
$subtopic = "zombieevent";
include("zombieevent.php");
break;
Agora vá em "C:/xampp/htdcos/layout/tibiacom/" abra o arquivo layout.php.
Depois de:
<a href='?subtopic=highscores'>
<div id='submenu_highscores' class='Submenuitem' onmouseover='MouseOverSubmenuItem(this)' onmouseout='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_highscores' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>Highscores</div>
<div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
</div>
</a>
Cole isso:
<a href='?subtopic=zombieevent'>
<div id='submenu_zombieevent' class='Submenuitem'
onmouseover='MouseOverSubmenuItem(this)' onmouseout='MouseOutSubmenuItem(this)'>
<div class='LeftChain' style='background-image:url(<?PHP echo $layout_name;
?>/images/general/chain.gif);'></div>
<div id='ActiveSubmenuItemIcon_highscores' class='ActiveSubmenuItemIcon'
style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-
activesubmenu.gif);'></div>
<div class='SubmenuitemLabel'>Zombie Event</div>
<div class='RightChain' style='background-image:url(<?PHP echo $layout_name;
?>/images/general/chain.gif);'></div>
</div>
</a>
- CREDITOS -
Isbigo [Por postar em outro forum]
AnneMotta [Por postar aqui.]
Agora alguns mapas para o zombie event:
http://www.4shared.c...atualizado.html - tiago.bordin1988
http://www.4shared.c...ZyebRN/map.html - ricardo3
No meu caso uso esse : http://www.speedysha...ombieEvent.otbm
Entre outros ..
Então Agora vamos ao script !
data\creaturescripts\scripts\zombie – A pasta ‘zombie’ deve ser criada no diretorio citado.
\data\creaturescripts\scripts\Zombie\onattack.lua
function loseOnZombieArena(cid) kickPlayerFromZombiesArea(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "BOOM! You are dead.") local players = getZombiesEventPlayers() if(#players <= 1) then local winner = players[1] if(winner) then doPlayerAddItem(winner, 2157, 5, true) doPlayerAddItem(winner, 6119, 1, true) doPlayerSendTextMessage(winner, MESSAGE_STATUS_CONSOLE_BLUE, "You won zombies arena event.") doBroadcastMessage("After " .. os.time() - getPlayerZombiesEventStatus(winner) .. " seconds of fight " .. getCreatureName(winner) .. " won Zombie Arena Event in game versus " .. getStorage(ZE_ZOMBIES_SPAWNED) .. " zombies!") kickPlayerFromZombiesArea(winner) else doBroadcastMessage("Zombie arena event finished! No one win?!?!?! WTF!") end doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) local width = (math.max(ZE_spawnFromPosition.x, ZE_spawnToPosition.x) - math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)) / 2 + 1 local height = (math.max(ZE_spawnFromPosition.y, ZE_spawnToPosition.y) - math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)) / 2 + 1 local centerPos = {x=math.min(ZE_spawnFromPosition.x, ZE_spawnToPosition.x)+width,y=math.min(ZE_spawnFromPosition.y, ZE_spawnToPosition.y)+height,z=ZE_spawnFromPosition.z} for z = math.min(ZE_spawnFromPosition.z, ZE_spawnToPosition.z), math.max(ZE_spawnFromPosition.z, ZE_spawnToPosition.z) do centerPos.z = z for i, uid in pairs(getSpectators(centerPos, width, height, false)) do if(isMonster(uid)) then doRemoveCreature(uid) end end end end end function onStatsChange(target, cid, changetype, combat, value) if((cid and isMonster(cid) and getCreatureName(cid) == "Zombie Event") or (isInRange(getThingPosition(target), ZE_spawnFromPosition, ZE_spawnToPosition) and changetype == STATSCHANGE_HEALTHLOSS and math.abs(value) >= getCreatureHealth(target))) then doCreatureAddHealth(target, getCreatureMaxHealth(target)) loseOnZombieArena(target) return false end return true end\data\creaturescripts\scripts\Zombie\ondeath.lua
\data\creaturescripts\scripts\Zombie\onthink.lua
\data\globalevents\scripts\zombie\ onstartup.lua
function onstartup() db.executeQuery("UPDATE `player_storage` SET `value` = 0 WHERE `key` = " .. ZE_isOnZombieArea .. ";") doSetStorage(ZE_STATUS, 0) doSetStorage(ZE_PLAYERS_NUMBER, ZE_DEFAULT_NUMBER_OF_PLAYERS) doSetStorage(ZE_ZOMBIES_TO_SPAWN, 0) doSetStorage(ZE_ZOMBIES_SPAWNED, 0) addZombiesEventBlockEnterPosition() return true end\data\globalevents\scripts\zombie\onthink.lua
\data\lib\zombie_event.lua
-- CONFIG ZE_DEFAULT_NUMBER_OF_PLAYERS = 20 ZE_ACCESS_TO_IGNORE_ARENA = 4 -- POSITIONS ZE_blockEnterItemPosition = {x=32341, y=32213, z=7} -- onde nasce o teleport? ZE_enterPosition = {x=32154, y=32578, z=7} -- onde os players nascem dentro da arena zombie? ZE_kickPosition = {x=32368, y=32241, z=7} -- quando morre vai para onde? ZE_spawnFromPosition = {x=32140,y=32566,z=7} -- para sumonar zombie (de) ZE_spawnToPosition = {x=32168,y=32590,z=7} -- para sumonar zombie (ate) -- ITEM IDS --ZE_blockEnterItemID = 2700 ZE_blockEnterItemID = 1387 -- STORAGES -- - player ZE_isOnZombieArea = 34370 -- - global ZE_STATUS = 34370 -- =< 0 - off, 1 - waiting for players, 2 - is running ZE_PLAYERS_NUMBER = 34371 ZE_ZOMBIES_TO_SPAWN = 34372 ZE_ZOMBIES_SPAWNED = 34373 -- FUNCTION function setZombiesEventPlayersLimit(value) doSetStorage(ZE_PLAYERS_NUMBER, value) end function getZombiesEventPlayersLimit() return getStorage(ZE_PLAYERS_NUMBER) end function addPlayerToZombiesArea(cid) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, ZE_enterPosition, true) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) if(getPlayerAccess(cid) < ZE_ACCESS_TO_IGNORE_ARENA) then setPlayerZombiesEventStatus(cid, os.time()) end end function kickPlayerFromZombiesArea(cid) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, ZE_kickPosition, true) doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT) setPlayerZombiesEventStatus(cid, 0) end function getPlayerZombiesEventStatus(cid) return getCreatureStorage(cid, ZE_isOnZombieArea) end function setPlayerZombiesEventStatus(cid, value) doCreatureSetStorage(cid, ZE_isOnZombieArea, value) end function getZombiesEventPlayers() local players = {} for i, cid in pairs(getPlayersOnline()) do if(getPlayerZombiesEventStatus(cid) > 0) then table.insert(players, cid) end end return players end function getZombiesCount() return getStorage(ZE_ZOMBIES_SPAWNED) end function addZombiesCount() doSetStorage(ZE_ZOMBIES_SPAWNED, getStorage(ZE_ZOMBIES_SPAWNED)+1) end function resetZombiesCount() doSetStorage(ZE_ZOMBIES_SPAWNED, 0) end function getZombiesToSpawnCount() return getStorage(ZE_ZOMBIES_TO_SPAWN) end function setZombiesToSpawnCount(count) doSetStorage(ZE_ZOMBIES_TO_SPAWN, count) end function addZombiesEventBlockEnterPosition() -- remove tp -- remove o TP local item = getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID) if(item.uid ~= 0) then doRemoveItem(item.uid) end --doRemoveItem(getThingFromPos(Castle.desde).uid) --[[ if(getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID).uid == 0) then doCreateItem(ZE_blockEnterItemID, 1, ZE_blockEnterItemPosition) end ]]-- end function removeZombiesEventBlockEnterPosition() -- add tp if(getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID).uid == 0) then --doCreateItem(ZE_blockEnterItemID, 1, ZE_blockEnterItemPosition) local tp = doCreateTeleport(ZE_blockEnterItemID, ZE_enterPosition, ZE_blockEnterItemPosition) doItemSetAttribute(tp, "aid", "5555") end --[[ local item = getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID) if(item.uid ~= 0) then doRemoveItem(item.uid) end ]]-- end function spawnNewZombie() local posx = {} local posy = {} local posz = {} local pir = {} for i=1, 5 do local posx_tmp = math.random(ZE_spawnFromPosition.x ,ZE_spawnToPosition.x) local posy_tmp = math.random(ZE_spawnFromPosition.y ,ZE_spawnToPosition.y) local posz_tmp = math.random(ZE_spawnFromPosition.z ,ZE_spawnToPosition.z) local pir_tmp = 0 local spec = getSpectators({x=posx_tmp, y=posy_tmp, z=posz_tmp}, 3, 3, false) if(spec and #spec > 0) then for z, pid in pairs(spec) do if(isPlayer(pid)) then pir_tmp = pir_tmp + 1 end end end posx[i] = posx_tmp posy[i] = posy_tmp posz[i] = posz_tmp pir[i] = pir_tmp end local lowest_i = 1 for i=2, 5 do if(pir[i] < pir[lowest_i]) then lowest_i = i end end local ret = doCreateMonster("Zombie Event", {x=posx[lowest_i], y=posy[lowest_i], z=posz[lowest_i]}, false) if type(ret) == "number" then addZombiesCount() setGlobalStorageValue(201201051801, ret) end return type(ret) == "number" end\data\movements\scripts\zombie\ onenter.lua
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if(not isPlayer(cid)) then return true end if(getPlayerAccess(cid) >= ZE_ACCESS_TO_IGNORE_ARENA) then addPlayerToZombiesArea(cid) elseif(#getZombiesEventPlayers() < getZombiesEventPlayersLimit() and getStorage(ZE_STATUS) == 1) then addPlayerToZombiesArea(cid) local players_on_arena_count = #getZombiesEventPlayers() if(players_on_arena_count == getZombiesEventPlayersLimit()) then addZombiesEventBlockEnterPosition() -- removeTP doSetStorage(ZE_STATUS, 2) doBroadcastMessage("Zombie Arena Event started.") else doBroadcastMessage(getCreatureName(cid) .. " has entered a Zombie Arena. We still need " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players.") end else doTeleportThing(cid, fromPosition, true) addZombiesEventBlockEnterPosition() end return true end\data\talkactions\scripts\zombie\ onsay.lua
function onSay(cid, words, param, channel) if(getStorage(ZE_STATUS) ~= 2) then local players_on_arena_count = #getZombiesEventPlayers() if(param == 'force') then if(players_on_arena_count > 0) then setZombiesEventPlayersLimit(players_on_arena_count ) addZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 2) doBroadcastMessage("Zombie Arena Event started.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event started.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cannot start Zombies event. There is no players on arena.") end else if(param ~= '' and tonumber(param) > 0) then setZombiesEventPlayersLimit(tonumber(param)) end removeZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Event started.") doPlayerBroadcastMessage(cid, "Zombie Arena Event teleport is opened. We are waiting for " .. getZombiesEventPlayersLimit() - players_on_arena_count .. " players to start.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Zombies event is already running.") end return true enddata\monster\zombie_event.xml
Agora as Tags nos xml’s .
/data/creaturescripts/creaturescripts.xml
/data/globalevents/globalevents.xml
/data/movements/movements.xml
/data/talkactions/talkactions.xml
/data/monster/monsters.xml
Script Terminado !
Next: Tutorial de como configurar o zombie event !
Estarei postando apenas as partes q podem ou devem ser editadas em cada script.
data\creaturescripts\scripts\zombiez\onattack.lua
[/b] function loseOnZombieArena(cid) kickPlayerFromZombiesArea(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "BOOM! You are dead.") local players = getZombiesEventPlayers() if(#players <= 1) then local winner = players[1] if(winner) then doPlayerAddItem(winner, 2157, 5, true) doPlayerAddItem(winner, 6119, 1, true) doPlayerSendTextMessage(winner, MESSAGE_STATUS_CONSOLE_BLUE, "You won zombies arena event.") doBroadcastMessage("After " .. os.time() - getPlayerZombiesEventStatus(winner) .. " seconds of fight " .. getCreatureName(winner) .. " won Zombie Arena Event in game versus " .. getStorage(ZE_ZOMBIES_SPAWNED) .. " zombies!") kickPlayerFromZombiesArea(winner) else doBroadcastMessage("Zombie arena event finished! No one win?!?!?! WTF!") end [b][/b]
Explicando:
Partes configuraveis no script no caso são os avisos do evento q não recomendo mudar na vdd e os premios que no caso são esses:
doPlayerAddItem(winner, 2157, 5, true) --/ 2157= ID do item no caso golden nugguets mais vc pode por o q quiser, 5= Quatidade do item a ser dado. True= no caso creio q seja para deixar essa premiação ativa ou não true = verdadeira no caso ativa para deixar a premiação inativa apenas mude o true por false ou remova a tag .. para adicionar mais premios e só adicionar mais tags como tá ae no script o outro premio no caso ali e uma boh.
Next: \data\lib\zombie_event.lua
-- CONFIG
ZE_DEFAULT_NUMBER_OF_PLAYERS = 20 –- Não precisa mexer.
ZE_ACCESS_TO_IGNORE_ARENA = 4 –- Não precisa mexer.
-- POSITIONS
ZE_blockEnterItemPosition = {x=32341, y=32213, z=7} -- onde nasce o teleport?
ZE_enterPosition = {x=32154, y=32578, z=7} -- onde os players nascem dentro da arena zombie?
ZE_kickPosition = {x=32368, y=32241, z=7} -- quando morre vai para onde?
ZE_spawnFromPosition = {x=32140,y=32566,z=7} -- para sumonar zombie (de)/ aqui vc pega no rme na area do seu evento o primeiro tile da arena </\ e copia a position.
ZE_spawnToPosition = {x=32168,y=32590,z=7} -- para sumonar zombie (ate) e aqui a mesma coisa mais o tile de\/> só lembrando e o ultimo tile da arena do lado de fora não o ultimo tile do mapa.
Exemplo:
Se no caso a área for redonda:
Então galera eh isso ai .-. meu primeiro post não mim crucifiquem k Duvidas, reclamações elogios chingamentos, só comentar.