Ir para conteúdo

Featured Replies

Postado
  Em 12/07/2014 em 17:17, maper007 disse:

rep pra vc por ter tentado me ajudar,, vlw. Ja resolvi o problema... ele é por tempo... e n por comando... porem tava testando aki e so na hora de sumonar o zumbi é q da erro alguem pode me ajudar ???

 

_upload_3.jpg

 

zombie system

Mostrar conteúdo oculto

--players variables

ze_join_storage = 1000 --player join storage

ze_min_players = 1 --min players needed when time runout

ze_max_players = 25 --max players to join

ze_trophy = 7369 --trophy id

ze_trophy_desc = "has won the Zombie Event." --winner description on the trophy

--other variables

ze_wait_minutes = 1 --when event has opened, how long until it starts?

ze_started = false --dont touch

ze_waiting_room_pos = {x = 380, y = 1138, z = 7} --middle of waiting room

ze_zombie_arena = {x = 345, y = 1138, z = 7} --when even start where should player be teleported in the zombie arena?

ze_Arena_fromPosition = {x = 299, y = 1116, z = 7} --pos of top left corner

ze_Arena_toPosition = {x = 335, y = 1173, z = 7} --pos of bottom right corner

ze_middle_zombie_arena = {x = 329, y = 1141, z = 7} --Middle pos of the arena

ze_joined_count = 0 --dont touch

ze_waiting_room_radius_x = 6 --depends how big the waiting room is 20sqm to x

ze_waiting_room_radius_y = 10 --depends how big the waiting room is 20sqm to y

ze_zombie_arena_radius_x = 51 --Depends how big the zombie arena is 50sqm to x

ze_zombie_arena_radius_y = 73 --Depends how big the zombie arena is 50sqm to y

function startZombie()

local specs = Game.getSpectators(ze_waiting_room_pos, false, true, 0, ze_waiting_room_radius_x, 0, ze_waiting_room_radius_y)

if ze_joined_count >= ze_min_players then

for i = 1, #specs do

specs:teleportTo(ze_zombie_arena, true)

end

broadcastMessage("Zombie Event has started, good luck to all participant.", MESSAGE_STATUS_WARNING)

ze_started = started

doStartZombieEvasion()

else

for i = 1, #specs do

specs:teleportTo(specs:getTown():getTemplePosition(), false)

specs:setStorageValue(ze_join_storage, 0)

end

resetVariables()

broadcastMessage("Zombie Event failed to start, because of to little players joined the event!", MESSAGE_STATUS_WARNING)

end

end

function doSummonZombie()

if ze_zombie_count < ze_max_zombies then

local zomb = Game.createMonster(ze_Zombie_Name, {x = math.random(ze_Arena_fromPosition.x, ze_Arena_toPosition.x), y = math.random(ze_Arena_fromPosition.y, ze_Arena_toPosition.y), z = math.random(ze_Arena_fromPosition.z, ze_Arena_toPosition.z)})

if zomb == false then

Game.createMonster(ze_Zombie_Name, {x = math.random(ze_Arena_fromPosition.x, ze_Arena_toPosition.x), y = math.random(ze_Arena_fromPosition.y, ze_Arena_toPosition.y), z = math.random(ze_Arena_fromPosition.z, ze_Arena_toPosition.z)})

end

ze_zombie_count = ze_zombie_count + 1

end

end

function doStartZombieEvasion()

if ze_started == started then

doSummonZombie()

addEvent(doStartZombieEvasion, 5 * 1000)

end

end

function resetVariables()

ze_started = false

ze_joined_count = 0

ze_zombie_count = 0

end

function doClearZombieArena()

local specs = Game.getSpectators(ze_middle_zombie_arena, false, false, 0, ze_zombie_arena_radius_x, 0, ze_zombie_arena_radius_y)

for i = 1, #specs do

if specs:getName() == ze_Zombie_Name then

specs:remove()

end

end

end

 

rep pra quem ajudar

@ UPPPPPPPP

Olha eu não sei nada de script, mais eu acho que ele esta tendo problemas com 2 Valores Nulo. Vou pedir ajuda para um amigo meu ver se ele resolve esse erro pra você !

Valeu pelo o +rep

  • Respostas 10
  • Visualizações 396
  • Created
  • Última resposta

Top Posters In This Topic

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo