Postado Abril 21, 2012 13 anos queria saber qual desses lugar eu configuro onde aparece o teleport do zombie event e mais uma coisa eu adicionei dota event mais qeria saber se ele começa sozinho ou e a mesma coisa do teleport -- CONFIG ZE_DEFAULT_NUMBER_OF_PLAYERS = 100 ZE_ACCESS_TO_IGNORE_ARENA = 3 -- POSITIONS ZE_blockEnterItemPosition = {x= 349, y=255, z=7} ZE_enterPosition = {x = 1075, y =1052, z = 7} ZE_kickPosition = {x=1068, y=1055, z=7} ZE_spawnFromPosition = {x = 319, y = 293, z = 7} ZE_spawnToPosition = {x = 322, y = 249, z = 7} -- ITEM IDS ZE_blockEnterItemID = 2700 -- 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() if(getTileItemById(ZE_blockEnterItemPosition, ZE_blockEnterItemID).uid == 0) then doCreateItem(ZE_blockEnterItemID, 1, ZE_blockEnterItemPosition) end end function removeZombiesEventBlockEnterPosition() 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 = posx_tmp posy = posy_tmp posz = posz_tmp pir = pir_tmp end local lowest_i = 1 for i=2, 5 do if(pir < pir[lowest_i]) then lowest_i = i end end local ret = (type(doCreateMonster("Zombie Event", {x=posx[lowest_i], y=posy[lowest_i], z=posz[lowest_i]}, false)) == 'number') if(ret) then addZombiesCount() end return ret end e esse e o dota function onUse(cid, item, fromPosition, itemEx, toPosition) gatepos = {x=685, y=42, z=7, stackpos=1} -- Posição da Parede 1 getgate = getThingfromPos(gatepos) gatepos2 = {x=601, y=42, z=7, stackpos=1} -- Posição da Parede 2 getgate2 = getThingfromPos(gatepos2) if item.uid == 5533 and item.itemid == 1945 and getgate.itemid == 1304 and getgate2.itemid == 1304 then doRemoveItem(getgate.uid,1) doRemoveItem(getgate2.uid,1) doTransformItem(item.uid,1946) elseif item.uid == 5533 and item.itemid == 1946 and getgate.itemid == 1304 and getgate2.itemid == 1304 then doRemoveItem(getgate.uid,1) doRemoveItem(getgate2.uid,1) doTransformItem(item.uid,1945) end return 1 end Editado Abril 21, 2012 13 anos por matheusrenam consegui arrumar uma coisa e falta arrumar outra (veja o histórico de edições)
Postado Abril 21, 2012 13 anos Usa esse aqui: <?xml version="1.0" encoding="UTF-8"?> <globalevents> <globalevent name="save" interval="900" event="script" value="save.lua"/> <globalevent name="clean" interval="7200" event="script" value="clean.lua"/> <globalevent name="teleport" interval="1" event="script" value="teleport.lua"/> <globalevent name="mensagem" interval="200" script="mensagem.lua"/> <globalevent name="serverstart" type="start" event="script" value="start.lua"/> <globalevent name="playersrecord" type="record" event="script" value="record.lua"/> <globalevent name="timer_example" time="21:35" event="script" value="my_script.lua"/> <globalevent name="ZombieGlobalThink" interval="5" event="script" value="zombie/onthink.lua"/> <globalevent name="ZombieGlobalStartup" type="start" event="script" value="zombie/onstartup.lua"/> <globalevent name="lottery" interval="10800" event="script" value="lottery.lua"/> </globalevents> Se funcionar se eu te ajudei +REP Editado Abril 21, 2012 13 anos por EddyHavoc (veja o histórico de edições)
Postado Abril 21, 2012 13 anos faltou fechar a tag do lottery <globalevent name="lottery" interval="10800" event="script" value="lottery.lua"/> Editado Abril 21, 2012 13 anos por Vodkart (veja o histórico de edições) [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Abril 21, 2012 13 anos Autor se alguem tiver Editado Abril 21, 2012 13 anos por matheusrenam (veja o histórico de edições)
Postado Abril 23, 2012 13 anos esta teg. ZombieGlobalThink Funciona? Ajudei? REP+ http://www.youtube.com/watch?v=xHa6-y2hqrk&feature=youtu.be
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.