FE

(Resolvido) Sistema De Invasão

Por felipejf, 14 de abr. de 2012 em Scripts

otserv
tibia
script
18
9.4k
robiie123R
22 de janeiro de 2016 às 12:09

da para usar em TFS 1.2 ?

22 de janeiro de 2016 às 12:10

da para usar em TFS 1.2 ?

 

não precisa reviver o topico sendo que ja tinha a resposta.

 

''Servidor utilizado: TFS 0.4 SVN''

 

naquela epoca não existe nem tfs 1.x

Editado Janeiro 22 por kaleudd

5 anos depois...
DilooowD
28 de novembro de 2021 às 03:00
Em 14/04/2012 em 21:15, Vodkart disse:

inv.lua

 

local days = {
["Sunday"] = {
["00:00"] = {nome = "Demon Invasões", pos = {x=185, y=54, z=7}, monster = {"40 Demon", "50 Fire Devil", "4 Orshabaal"}, Time = 15},
["21:00"] = {nome = "Dragon Invasões", pos = {x=185, y=54, z=7}, monster = {"100 Dragon"}, Time = 15}
},
["Saturday"] = {
["00:00"] = {nome = "Demon Invasões", pos = {x=185, y=54, z=7}, monster = {"40 Demon", "50 Fire Devil", "4 Orshabaal"}, Time = 15},
["21:13"] = {nome = "Dragon Invasões", pos = {x=185, y=57, z=7},monster = {"100 Dragon"}, Time = 15}
}
}
function onThink(interval, lastExecution)
function getDayName()
local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
return days[os.date("*t")["wday"]]
end
hours = tostring(os.date("%X")):sub(1, 5)         
               tb = days[getDayName()][hours]
               if tb then
       function removeCreature()
for x = ((tb.pos.x)-10), ((tb.pos.x)+10) do
for y = ((tb.pos.y)-10), ((tb.pos.y)+10) do
local m = getTopCreature({x=x, y=y, z= tb.pos.z}).uid 
if m ~= 0 and isMonster(m) then
doRemoveCreature(m)
end
end
end
return true
end
                               addEvent(removeCreature, tb.Time*60*1000)
                               doBroadcastMessage(hours .. " - " .. tb.nome .. " Iníciou.")
                               for _,x in pairs(tb.monster) do
                                               for s = 1, tonumber(x:match("%d+")) do
                                                               doSummonCreature(x:match("%s(.+)"), tb.pos)
                                               end
                               end

               end
               return true
end
 

 

 

globalevents.xml

 

<globalevent name="Invasao" interval="60" event="script" value="inv.lua"/>
 

 

funciona tfs 1.2 1098?