• 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!

dialy boss faceless bane script tfs 0.4

ok moment plis
Post automatically merged:

knows the system of killing the boss Faceless Bane, so I wanted this system to put in my tfs 0.4 to create a daily boss for my tibia naruto server
 
You can try this one.
Globalevents script.

add this to globalevents/scripts/xxx.lua
Lua:
local config = {
   events = 60 * 5,   -- 5 * 60 * 1000 = 5 min then the boss will be spawned after the msg announcement
   deSummon = 3600 * 12, -- 3600 * 12 = 12 hours then it will be removed if no one killed it
   bossPos = {x=2497, y=2959, z=2},   -- position where boss should spawn
   eventMsg = "Beware! Zulazza the Corruptor will spawn in the Lizard city soon."
}

local boss = "Zulazza the Corruptor"


local function deSummonBoss()
    local m = getCreatureByName(boss)
       if m then
        doRemoveCreature(m)
        print(">> Nobody killed Zulazza the Corruptor.")
       end
end

local function summonBoss()
    doSummonCreature(boss, config.bossPos)
    doSendMagicEffect(config.bossPos, CONST_ME_TELEPORT)
    addEvent(deSummonBoss, config.deSummon * 1000)
end

function onTime()
    if(math.random(0, 100) <= 100) then
        addEvent(summonBoss, config.events * 1000)
      doBroadcastMessage(config.eventMsg)
    end
    return true
end

and add this line to globalevents.xml
XML:
<globalevent name="Zulazza the Corruptor" time="14:00:00" event="script" value="xxx.lua"/>

Change the boss name ofc.
So it will spawn everyday at 14:00 and will be removed automatic after 12 hours if no one killed it.
You can edit the deSummon time or remove it.
It is all up to you.
You can also remove the message.
It is just an idea of the script :)
 
I think he wants to make something like this
Yes man! this is exactly what i was looking for
Post automatically merged:

You can try this one.
Globalevents script.

add this to globalevents/scripts/xxx.lua
Lua:
local config = {
   events = 60 * 5,   -- 5 * 60 * 1000 = 5 min then the boss will be spawned after the msg announcement
   deSummon = 3600 * 12, -- 3600 * 12 = 12 hours then it will be removed if no one killed it
   bossPos = {x=2497, y=2959, z=2},   -- position where boss should spawn
   eventMsg = "Beware! Zulazza the Corruptor will spawn in the Lizard city soon."
}

local boss = "Zulazza the Corruptor"


local function deSummonBoss()
    local m = getCreatureByName(boss)
       if m then
        doRemoveCreature(m)
        print(">> Nobody killed Zulazza the Corruptor.")
       end
end

local function summonBoss()
    doSummonCreature(boss, config.bossPos)
    doSendMagicEffect(config.bossPos, CONST_ME_TELEPORT)
    addEvent(deSummonBoss, config.deSummon * 1000)
end

function onTime()
    if(math.random(0, 100) <= 100) then
        addEvent(summonBoss, config.events * 1000)
      doBroadcastMessage(config.eventMsg)
    end
    return true
end

and add this line to globalevents.xml
XML:
<globalevent name="Zulazza the Corruptor" time="14:00:00" event="script" value="xxx.lua"/>

Change the boss name ofc.
So it will spawn everyday at 14:00 and will be removed automatic after 12 hours if no one killed it.
You can edit the deSummon time or remove it.
It is all up to you.
You can also remove the message.
It is just an idea of the script :)
I tried but the monster doesn't appear in the spawn and I don't even receive the global message, tfs 0.4. tibia 8.6
 
Yes man! this is exactly what I want
Post automatically merged:


I tried but the monster doesn't appear in the spawn and I don't even receive the global message, tfs 0.4. tibia 8.6
You can check and print what is working.
My script is working on 0.3.7, 0.4 have no much changes.
Maybe some functions need to be changed to be suitable for your 0.4
Add print code at onTime function and check what is happened.
Also check if there is any error in console.
Btw i remeber Function onTime was onTimer at 0.4?
Try that.
I just gave you an idea how it could be :)
 
You can check and print what is working.
My script is working on 0.3.7, 0.4 have no much changes.
Maybe some functions need to be changed to be suitable for your 0.4
Add print code at onTime function and check what is happened.
Also check if there is any error in console.
Btw i remeber Function onTime was onTimer at 0.4?
Try that.
I just gave you an idea how it could be :)
thanks a lot man,
 
no error appears in the distro, the message appears that the boss will be born but do not be born
Post automatically merged:

Broadcasted message: "Beware! Lider Guard will spawn in the Lizard city soon.".
 
Back
Top