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

TFS 1.X+ Script for daily boss

Ciosny

Member
Joined
Aug 16, 2024
Messages
116
Solutions
1
Reaction score
15
Hello!
I have a question because I'm not sure if this can be done in Tibia on TFS 1.4.2.

I was thinking of creating a room with a daily boss where, for example, every 15 seconds the boss triggers an explosion throughout the room. For instance, 5 seconds before the explosion, he shouts (for example, "You will all perish!").

After 5 seconds, he triggers the explosion.

That part wouldn't be a problem. What I'm referring to is the second mechanic added to it.

Namely, the idea is that there are, for example, 10 random 2x2 spots in the room. Five seconds before the explosion, 3 out of these 10 spots (chosen at random) light up.


Players must run to them and stand on them. If they don't, they will take damage.


The spots light up randomly so that it's not just a matter of standing in the same place all the time.


In short:
  • The boss "shouts" 5 seconds before the explosion.
  • During that time, 3 out of 10 random spots in the room light up.
  • Players must stand on the lit tiles; otherwise, they will take damage.
 
Solution
Yes it can be done, without modifying the source.

For the boss itself, you can use globalevents

Then you have 2 choices:
1. make a spell that works like you described and assign it to your boss monster
1.a. Just take some timed spell examples you can find and base your development on them
1.b. TFS 1.2 looking for unique area spell (https://otland.net/threads/tfs-1-2-looking-for-unique-area-spell.278764/post-2678261)

2. in your globalevents scripts make a Event loop that will based on your defined area do what you want
2.a. You would need to define the area in which your explosion would work, and from that area pick randomly the sqm's that should be the safe spot. Just use MagicEffects to show the player the 10 times 2x2 then...
Yes it can be done, without modifying the source.

For the boss itself, you can use globalevents

Then you have 2 choices:
1. make a spell that works like you described and assign it to your boss monster
1.a. Just take some timed spell examples you can find and base your development on them
1.b. TFS 1.2 looking for unique area spell (https://otland.net/threads/tfs-1-2-looking-for-unique-area-spell.278764/post-2678261)

2. in your globalevents scripts make a Event loop that will based on your defined area do what you want
2.a. You would need to define the area in which your explosion would work, and from that area pick randomly the sqm's that should be the safe spot. Just use MagicEffects to show the player the 10 times 2x2 then used another effect for the 3 times 2x2 that are safe.
2.b. The above is simple programming, what you need is a table that will contain a table of 2x2, either generate them based on the area you're working with or predefine 10 times 2x2 static areas, this depends on you how you want to implement it.

To make it random use math.random with a table of sqm positions, i believe you also need to use math.randomseed.
In either case you will need to use
LUA:
addEvent(YourFunctionCall, YourDelayInMilliseconds)

Try coding it yourself, and if you get stuck post your code here, and i'll assist you ;)
 
Solution
Yes it can be done, without modifying the source.

For the boss itself, you can use globalevents

Then you have 2 choices:
1. make a spell that works like you described and assign it to your boss monster
1.a. Just take some timed spell examples you can find and base your development on them
1.b. TFS 1.2 looking for unique area spell (https://otland.net/threads/tfs-1-2-looking-for-unique-area-spell.278764/post-2678261)

2. in your globalevents scripts make a Event loop that will based on your defined area do what you want
2.a. You would need to define the area in which your explosion would work, and from that area pick randomly the sqm's that should be the safe spot. Just use MagicEffects to show the player the 10 times 2x2 then used another effect for the 3 times 2x2 that are safe.
2.b. The above is simple programming, what you need is a table that will contain a table of 2x2, either generate them based on the area you're working with or predefine 10 times 2x2 static areas, this depends on you how you want to implement it.

To make it random use math.random with a table of sqm positions, i believe you also need to use math.randomseed.
In either case you will need to use
LUA:
addEvent(YourFunctionCall, YourDelayInMilliseconds)

Try coding it yourself, and if you get stuck post your code here, and i'll assist you ;)
Okay, I'll try to do it taking your advice into account :D Thanks
 
You might find this script useful, made by Xikini!

 
It will definitely be useful. I've done simple mechanics but never (for me) such a complex one where it takes into account random places that are displayed a few seconds earlier and the boss doesn't deal damage in them
 

Similar threads

Back
Top