• 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+ CreatureScript target

mackerel

Well-Known Member
Joined
Apr 26, 2017
Messages
398
Solutions
18
Reaction score
72
I need a function onSelectTarget(cid) and onDeselectTarget(cid, oldTarget) in creaturescripts to optimize my code even better and not sure if this already exists in TFS that's why I am writing it here. The first one would execute when player select any target. The other one when they decide to deselect or switch the target along with the ability to check what target was deselected

That would be for TFS1.X+
 
this would require a source edit, there's nothing that exists like this by default in any 1.x version
 
Solution
I'm pretty sure you can do what you need in theese functions:

C++:
Player::setAttackedCreature

C++:
Game::playerSetAttackedCreature

C++:
Game::playerCancelAttackAndFollow
 
Back
Top