Ir para conteúdo

Featured Replies

Postado

Ae pesoal, eu adicionei o Evento do Sociopata, e aparente mente na distro não me executa nenhum erro. porém ....

os zombies não são sumonados na area. que eu devo fazer?

[24/04/2012 09:57:16] Teste has logged in.

[24/04/2012 09:57:19] > Teste broadcasted message: "Zombie Arena Event teleport is opened. We are waiting for 1 players to start.".

[24/04/2012 10:19:21] > Broadcasted message: "Zicoo-z has entered a Zombie Arena. We still need 1 players.".

[24/04/2012 09:57:40] > Broadcasted message: "Zombie Arena Event started.".

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

  • 3 months later...
Postado

Tentem fazer isso

Coloque esta tag em movements.xml

<movevent type="StepIn" actionid="2008" event="script" value="zombievent.lua"/>

e crie um arquivo zombievent.lua Dentro adicione

local config = {

playerCount = 2001, -- Global storage for counting the players in the event

maxPlayers = 50, -- Max players who can participate

minLevel = 50

}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

if getPlayerLevel(cid) < config.minLevel then

addEvent(tpBack, 1000, cid, fromPosition)

doPlayerSendCancel(cid, "You need to be at least level " .. config.minLevel .. ".")

return false

end

if getGlobalStorageValue(config.playerCount) < config.maxPlayers then

setGlobalStorageValue(config.playerCount, getGlobalStorageValue(config.playerCount)+1)

if getGlobalStorageValue(config.playerCount) == config.maxPlayers then

doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(config.playerCount) .. " players]! The event will soon start.")

else

doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(config.playerCount) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED)

end

else

addEvent(tpBack, 1000, cid, fromPosition)

doPlayerSendCancel(cid, "The event is full. There is already " .. config.maxPlayers .. " players participating in the quest.")

return false

end

print(getStorage(config.playerCount) .. " Players in the zombie event.")

return true

end

function tpBack(cid, fromPosition)

doTeleportThing(cid, fromPosition, true)

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)

end

Comentem resultado, abraços!

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.9k

Informação Importante

Confirmação de Termo