Jump to content

[Encerrado] Adicionar check de monstro em invasão


yoroshigod

Recommended Posts

Gostaria de adicionar um check, se já existir o monstro/npc de mesmo nome no mapa a invasão não ocorre:

 

Citar

 

local i = {

["17:00"] = {nome = "boss", pos = {x=2637, y=2504, z=10}, npc = {"1 boss"}},

}

function onTime()

hours = tostring(os.date("%X")):sub(1, 5)

tb = i[hours]

if tb then

doBroadcastMessage(hours .. " - " .. tb.nome .. " invasao!.")
for _,x in pairs(tb.npc) do

for s = 1, tonumber(x:match("%d+")) do

doSummonCreature(x:match("%s(.+)"), tb.pos)

end

end

end

return true

end

 

 

Link to comment
Share on other sites

  • 5 weeks later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...