flakerzokejao
Member
- Joined
- Aug 18, 2020
- Messages
- 38
- Reaction score
- 7
hi guys it would be possible a script for tfs 0.4 of a boss of the global Faceless Bane
more explain pleasehi guys it would be possible a script for tfs 0.4 of a boss of the global Faceless Bane
you think you explained?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
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
<globalevent name="Zulazza the Corruptor" time="14:00:00" event="script" value="xxx.lua"/>
Yes man! this is exactly what i was looking forI think he wants to make something like this
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.6You 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![]()
You can check and print what is working.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
thanks a lot man,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 are welcome, i hope i helped youthanks a lot man,
Broadcasted message: "Beware! Lider Guard will spawn in the Lizard city soon.".