Para começar isso não é task, é raid.. edite seu tópico.
Scripts:
Raid/raid.xml
<raid name="Orshabaal" file="Orshabaal.xml" interval2="30" margin="1000" enabled="yes"/>
Creaturescripts/creaturescripts.xml
<globalevent name="raids" interval="15000" event="script" value="raid.lua"/>
Raid/ crie um arquivo .lua com o nome do monstro ex: Orshabaal.xml
<?xml version="1.0" encoding="utf-8"?>
<raid>
<!--
// Raid System by 5mok3
// DO NOT CHANGE INTERVAL UNLESS YOU ARE SURE WHAT YOU ARE DOING!!
-->
<!--Announcements-->
<announce delay="1000" type="Event" message="Orshabaal's minions are working on his return to the World. LEAVE Edron at once, mortals." />
<announce delay="20000" type="Event" message="Orshabaal is about to make his way into the mortal realm. Run for your lives!" />
<announce delay="60000" type="Event" message="Orshabaal has been summoned from hell to plague the lands of mortals once again." />
<!--Single Spawns-->
<singlespawn delay="60000" name="Orshabaal" x="33207" y="31719" z="7" />
<!--Area Spawns-->
</raid>
Creaturescripts/scripts crie um arquivo .lua com nome raid.lua
--[[- hour should be exact SERVER hour
- to do the raid at clock 00 minutes 00
- to do the raid at exaxt date use type "exact"
- to do the raid weekly use type "weekly"
- days names are used only for weekly type and should be
- "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"
- also should be inside a array -> {}
]]
local raids =
{
[1] =
{
name = 'Orshaball',
type = 'weekly',
days = {'friday'},
hour = 16,
minu = 00
},
[2] =
{
name = 'OutroMonstroParaAdicionarExemplo',
type = 'weekly',
days = {'tuesday'},
hour = 18,
minu = 00
}
}
local last_execsutes = {}
function onThink(interval, lastExecution, thinkInterval)
local static_time = os.time()
for k, raid in ipairs(raids) do
if (raid.type == 'weekly') then
local day = os.date("%A", static_time):lower()
if isInArray(raid.days, day) then
local hour = tonumber(os.date("%H", static_time))
if (raid.hour == hour) then
local minute = tonumber(os.date("%M", static_time))
if (raid.minu == minute) then
local day_number = tonumber(os.date("%d", static_time))
if (last_execsutes[k] ~= day_number) then
last_execsutes[k] = day_number
doExecuteRaid(raid.name)
end
end
end
end
elseif (raid.type == 'exact') then
local month = tonumber(os.date("%m", static_time))
if (raid.date.month == month) then
local day = tonumber(os.date("%d", static_time))
if (raid.date.day == day) then
local hour = tonumber(os.date("%H", static_time))
if (raid.hour == hour) then
local minute = tonumber(os.date("%M", static_time))
if (raid.minu == minute) then
if (last_execsutes[k] ~= day) then
last_execsutes[k] = day
doExecuteRaid(raid.name)
end
end
end
end
end
end
end
return true
end
Só configura a posição e etc.. ve as parte da script ai e vc sacara..









info
Grupo: Campones
Registrado: 10/12/10
Posts: 38
Reputação: 0
Char no Tibia: kitten lady
Minhas Task Estao Assim
<?xml version="1.0" encoding="utf-8"?>
<raid>
<!--Announcements-->
<announce delay="1000" type="Event" message="Orshabaal's minions are working on his return to the World. LEAVE Edron at once, mortals." />
<announce delay="20000" type="Event" message="Orshabaal is about to make his way into the mortal realm. Run for your lives!" />
<announce delay="60000" type="Event" message="Orshabaal has been summoned from hell to plague the lands of mortals once again." />
<!--Single Spawns-->
<singlespawn delay="60000" name="Orshabaal" x="33207" y="31719" z="7" />
<!--Area Spawns-->
</raid>
Eu Estou Modificando Meu Sever Costantimente Para Deixalo Atualisado
E Reinicio O Sever Pelo Menos Uma Ves Ao Dia E Alguns Players Reclamarao
Das Task E Eu Tive Pensando Se A Task Tiver Um Horario Progamado
Exemplo : O Orshabaal Nascer Todos Os Dias As 15:oo Horas
O Que Eu Presisaria Mudar Nessa Task E Nas Demais ?
Se Puder Mudar Essa Do Orshabaal Como Exemplo
As Outras Eu Mesmo Modifico Obrigado
Se Me Ajudar Do REP
Editado Abril 18 por melocom