• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Help mod raid date and time

gmstrikker

Well-Known Member
Joined
Jul 30, 2014
Messages
458
Solutions
1
Reaction score
50
What's wrong with my MOD that every time I start an error occurs?

At start
07eh9nS.png


At finish start all
Flood it:
buXOQhy.png


All times flood it

My mod:
Code:
<?xml version="1.0" encoding="UTF-8"?>  
<mod name="Automatic Raids" version="1.0" author="Vodkart And xotservx" contact="tibiaking.com" enabled="yes">  
<config name="raids_func"><![CDATA[
days = {


["Monday"] = {
   ["00:00"] = {nome = "Munster", pos = {fromPosition = {x=402, y=944, z=10},toPosition = {x=401, y=944, z=10}},m = {"1 Munster"}, Time = 15}, <!-- rat mais fraco -->
   ["19:00"] = {nome = "Mr. Punish", pos = {fromPosition = {x=835, y=2090, z=10},toPosition = {x=834, y=2090, z=10}},m = {"1 Mr. Punish"}, Time = 15}, <!-- poi -->

},
["Tuesday"] = {
   ["15:00"] = {nome = "Apprentice Sheng", pos = {fromPosition = {x=593, y=969, z=9},toPosition = {x=592, y=969, z=9}},m = {"1 Apprentice Sheng"}, Time = 15}, <!-- mino rook mago lรก damino hell -->
   ["19:00"] = {nome = "Dracola", pos = {fromPosition = {x=924, y=2115, z=10},toPosition = {x=923, y=2115, z=10}},m = {"1 Dracola"}, Time = 15}, <!-- poi -->

},
["Wednesday"] = {
   ["19:00"] = {nome = "The Imperor", pos = {fromPosition = {x=974, y=2010, z=10},toPosition = {x=973, y=2010, z=10}},m = {"1 The Imperor"}, Time = 15}, <!-- poi -->
   ["14:00"] = {nome = "Zarabustor", pos = {fromPosition = {x=1534, y=1167, z=15},toPosition = {x=1533, y=1167, z=15}},m = {"1 Zarabustor"}, Time = 15}, <!-- warlocks -->

},
["Thursday"] = {
   ["19:00"] = {nome = "The Plasmother", pos = {fromPosition = {x=922, y=2161, z=10},toPosition = {x=921, y=2161, z=10}},m = {"1 The Plasmother"}, Time = 15}, <!-- poi -->
   ["15:00"] = {nome = "General Murius", pos = {fromPosition = {x=203, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 General Murius"}, Time = 15},

},
["Friday"] = {
   ["19:00"] = {nome = "Countess Sorrow", pos = {fromPosition = {x=886, y=1754, z=10},toPosition = {x=885, y=1754, z=10}},m = {"1 Countess Sorrow"}, Time = 15}, <!-- poi -->

   
   ["19:00"] = {nome = "The Handmaiden", pos = {fromPosition = {x=850, y=2023, z=10},toPosition = {x=849, y=2023, z=10}},m = {"1 The Handmaiden"}, Time = 15}, <!-- poi -->
     
   ["00:00"] = {nome = "Necropharus", pos = {fromPosition = {x=185, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"1 Necropharus"}, Time = 15},
   ["12:00"] = {nome = "Demodras", pos = {fromPosition = {x=185, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"1 Demodras"}, Time = 15},
   ["18:00"] = {nome = "Morgaroth", pos = {fromPosition = {x=185, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"1 Morgaroth"}, Time = 15},
},
["Saturday"] = {
   ["19:00"] = {nome = "Massacre", pos = {fromPosition = {x=862, y=2127, z=10},toPosition = {x=861, y=2127, z=10}},m = {"1 Massacre"}, Time = 15}, <!-- poi -->

   ["06:00"] = {nome = "Yakchal", pos = {fromPosition = {x=766, y=478, z=7},toPosition = {x=765, y=478, z=7}},m = {"1 Yakchal"}, Time = 15}, <!-- ice witch -->

   
   ["00:00"] = {nome = "Ferumbras", pos = {fromPosition = {x=185, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"1 Ferumbras"}, Time = 15},
   ["12:00"] = {nome = "Tiquandas Revenge", pos = {fromPosition = {x=185, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"1 Tiquandas Revenge"}, Time = 15},
   ["18:00"] = {nome = "Orshabaal", pos = {fromPosition = {x=185, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"1 Orshabaal"}, Time = 15},

},
["Sunday"] = {
   ["18:00"] = {nome = "Ghazbaran", pos = {fromPosition = {x=184, y=55, z=7},toPosition = {x=188, y=58, z=7}},m = {"1 Ghazbaran"}, Time = 15},
   ["15:00"] = {nome = "The Horned Fox", pos = {fromPosition = {x=202, y=11, z=7},toPosition = {x=204, y=12, z=7}}, m = {"1 The Horned Fox"}, Time = 15},
}



}
]]></config>   
<globalevent name="AutomaticRaids" interval="60" event="script"><![CDATA[
domodlib('raids_func')
function onThink(interval, lastExecution)  
if days[os.date("%A")] then
hours = tostring(os.date("%X")):sub(1, 5)   
tb = days[os.date("%A")][hours]
if 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
end
return true
end
]]></globalevent>
</mod>
 
Back
Top