Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="xtibia.com" enabled="yes">
- <config name="raids_func"><![CDATA[
- days = {
- ["Monday"] = {
- ["21:45"] = {nome = "Pirate", pos = {fromPosition = {x=1909, y=598,z=4},toPosition = {x=1911, y=599, z=4}},m = {"1 Deadeye Devious","1 Ron the Ripper","1 Brutus Bloodbeard","1 Lethal Lissy","1 Captain Jones"}, Time = 300},
- ["01:00"] = {nome = "The Plasmother", pos = {fromPosition = {x=1175, y=986,z=8},toPosition = {x=1180, y=991, z=8}}, m = {"1 The Plasmother"}, Time = 300}
- },
- ["Tuesday"] = {
- ["10:30"] = {nome = "The old Window", pos = {fromPosition = {x=1697, y=867,z=9},toPosition = {x=1696, y=867, z=9}}, m = {"1 The old Window "}, Time = 300},
- ["22:00"] = {nome = "Massacre", pos = {fromPosition = {x=1149, y=1047,z=4},toPosition = {x=1150, y=1048, z=4}}, m = {"1 Massacre"}, Time = 300},
- ["17:39"] = {nome = "Massacre", pos = {fromPosition = {x=1435, y=1096,z=7},toPosition = {x=1436, y=1096, z=7}}, m = {"1 Massacre"}, Time = 300}
- },
- ["Wednesday"] = {
- ["20:30"] = {nome = "Morgaroth", pos = {fromPosition = {x=1685, y=1291,z=15},toPosition = {x=1684, y=1291, z=15}},m = {"1 Morgaroth"}, Time = 300},
- ["00:00"] = {nome = "Necropharus", pos = {fromPosition = {x=1932, y=1136,z=7},toPosition = {x=1931, y=1136, z=7}}, m = {"1 Necropharus"}, Time = 300}
- },
- ["Thursday"] = {
- ["23:00"] = {nome = "Ghazbaran", pos = {fromPosition = {x=1724, y=1428,z=9},toPosition = {x=1723, y=1428, z=9}},m = {"1 Ghazbaran"}, Time = 300},
- ["00:00"] = {nome = "Mr. Punish", pos = {fromPosition = {x=1238, y=1046,z=11},toPosition = {x=1240, y=1047, z=11}}, m = {"1 Mr. Punish"}, Time = 300}
- },
- ["Friday"] = {
- ["19:45"] = {nome = "Dracola", pos = {fromPosition = {x=1303, y=1001,z=9},toPosition = {x=1306, y=1002, z=9}},m = {"1 Dracola"}, Time = 300},
- ["00:00"] = {nome = "Mr. Punish", pos = {fromPosition = {x=1238, y=1046,z=11},toPosition = {x=1240, y=1047, z=11}}, m = {"1 Mr. Punish"}, Time = 300},
- },
- ["Saturday"] = {
- ["23:00"] = {nome = "Ghazbaran", pos = {fromPosition = {x=1724, y=1428,z=9},toPosition = {x=1725, y=1428, z=9}},m = {"1 Ghazbaran"}, Time = 300},
- ["19:00"] = {nome = "Orshabaal", pos = {fromPosition = {x=1687, y=1006,z=8},toPosition = {x=1689, y=1006, z=8}}, m = {"1 Orshabaal"}, Time = 300},
- },
- ["Sunday"] = {
- ["21:00"] = {nome = "Ferumbras", pos = {fromPosition = {x=184, y=55,z=7},toPosition = {x=188, y=58, z=7}}, m = {"1 Ferumbras", "8 Fire Devil"}, Time =300},
- ["23:00"] = {nome = "Morgaroth", pos = {fromPosition = {x=1844, y=1332,z=13},toPosition = {x=1845, y=1332, z=13}}, m = {"1 Morgaroth"}, Time = 300},
- ["15:00"] = {nome = "Tiquandas Revenge", pos = {fromPosition = {x=1731, y=987,z=7},toPosition = {x=1751, y=999, z=7}}, m = {"2 Tiquandas Revenge"}, Time = 300}
- }
- }
- ]]></config>
- <globalevent name="AutomaticRaids" interval="60" event="script"><![CDATA[
- domodlib('raids_func')
- function onThink(interval, lastExecution)
- hours = tostring(os.date("%X")):sub(1, 5)
- tb = days[os.date("%A")][hours]
- if days[os.date("%A")] and tb then
- function removeCreature(tb)
- for x = ((tb.pos.fromPosition.x)-10), ((tb.pos.toPosition.x)+10) do
- for y = ((tb.pos.fromPosition.y)-10), ((tb.pos.toPosition.y)+10) do
- local m = getTopCreature({x=x, y=y, z= tb.pos.fromPosition.z}).uid
- if m ~= 0 and isMonster(m) then
- doRemoveCreature(m)
- end
- end
- end
- end
- doBroadcastMessage("The invasion of " .. tb.nome .. " started")
- for _,x in pairs(tb.m) do
- for s = 1, tonumber(x:match("%d+")) do
- pos = {x = math.random(tb.pos.fromPosition.x, tb.pos.toPosition.x), y = math.random(tb.pos.fromPosition.y, tb.pos.toPosition.y), z =tb.pos.fromPosition.z}
- doSummonCreature(x:match("%s(.+)"), pos)
- end
- end
- addEvent(removeCreature, tb.Time*60*1000, tb)
- end
- return true
- end
- ]]></globalevent>
- </mod>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement