• 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+ Nostalrius 7.7 - (Floor Change, Monster Attack Delay)

Ahoi

Active Member
Joined
Sep 23, 2016
Messages
105
Reaction score
30
Hello. I mean these sources: GitHub - Ezzz-dev/Nostalrius: Nostalrius is a 7.7 Tibia Clone Project based on The Forgotten Server 1.2 and CipSoft files. (https://github.com/Ezzz-dev/Nostalrius). Stair hopping cannot be used at the moment, because monsters attack immediately after going down the stairs. As far as I remember, it should be possible until 8.4 version.

I think I should code that when player changes level -> the monsters pause their attack for 2 seconds. Right I think? Is this the way it should be? It's hard for me to find a solution to it. Someone can help? @kay @Ezzz @Peonso @ond Sorry for taggin you guys, but from what I saw on this forum, you are most knowledgeable about the old versions and Nostalrius sources.
 
Last edited:
I think I should code that when player changes level -> the monsters pause their attack for 2 seconds. Right I think? Is this the way it should be? It's hard for me to find a solution to it. Someone can help? @kay @Ezzz @Peonso @ond Sorry for taggin you guys, but from what I saw on this forum, you are most knowledgeable about the old versions and Nostalrius sources.
No, it would be highly abusable if you made it like that. The way it was possible (avoiding being hit) was that you had to time that 'hop' right when monster was 'on step'. It required some practice and didn't always work.
In older versions (7.4 and before) stairhopping wasn't really viable, cause monsters didn't move around without any player on their floor. And since 8.41 it didn't work anymore, cause they added 2s exhaust for players on floor change.
 
Last edited:
Maybe you have to add some IF there:
C++:
            } else if (isOpponent(creature)) {
                //we have no target lets try pick this one
                selectTarget(creature);
            }
Something like && newPos.z == oldPos.z to detect that player did not switch floor:
C++:
            } else if (isOpponent(creature) && newPos.z == oldPos.z) {
                //we have no target lets try pick this one
                selectTarget(creature);
            }
If player used stairs (changed z position), it will not start attacking him.
It should delay targeting for 0.0-0.99 sec - then default 1 sec interval will come and monster will pick new target.
 
Maybe you have to add some IF there:
C++:
            } else if (isOpponent(creature)) {
                //we have no target lets try pick this one
                selectTarget(creature);
            }
Something like && newPos.z == oldPos.z to detect that player did not switch floor:
C++:
            } else if (isOpponent(creature) && newPos.z == oldPos.z) {
                //we have no target lets try pick this one
                selectTarget(creature);
            }
If player used stairs (changed z position), it will not start attacking him.
It should delay targeting for 0.0-0.99 sec - then default 1 sec interval will come and monster will pick new target.

Hello, I use the same server, could you explain to me what this change consists of, thank you very much
 
Hello, I use the same server, could you explain to me what this change consists of, thank you very much
Monster that has no target searches for new target every second.
There is also code that detect new players coming on screen, to make monsters react faster.
My change removes that faster detection of attackable player, which should make monster react slow and let players jump up/down without getting hit by monster. Like in old Tibia versions.
To do not slow down all monster reactions, I made it only slow down reaction to players that change floor (change .z parameter of position).
 
Maybe you have to add some IF there:
C++:
            } else if (isOpponent(creature)) {
                //we have no target lets try pick this one
                selectTarget(creature);
            }
Something like && newPos.z == oldPos.z to detect that player did not switch floor:
C++:
            } else if (isOpponent(creature) && newPos.z == oldPos.z) {
                //we have no target lets try pick this one
                selectTarget(creature);
            }
If player used stairs (changed z position), it will not start attacking him.
It should delay targeting for 0.0-0.99 sec - then default 1 sec interval will come and monster will pick new target.

Thank you, but is it possible to make it, so that monsters stand idle, if the player is on lower or higher floor, like it was back in version 7.4?
 
Thank you, but is it possible to make it, so that monsters stand idle, if the player is on lower or higher floor, like it was back in version 7.4?
Here is line that make monster move around when players are on other floor:
It also makes it move around when player is behind wall and there is no way to that player.
You need code that checks, if there are players on same floor and add some if there.
 
Back
Top