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

(Request) Spell/ Cancel target on yourself

Lakus

New Member
Joined
May 9, 2009
Messages
27
Reaction score
0
Hello, i have been searching this spell.
I want a spell that when you use it, if one or many players are atacking you in target, they automatically are going to loose you, i mean, they are gonna need to target you again.

(It is something like an inverse exeta res with players :p, but this idea can be confusing. Maybe the word correct is Untergetable, i dont know.)
Thank you.


I use TFS 0.3.7

I dont care if the script is for a differente version of TFS, i just need something to have an idea
 
Last edited:
Thank you MatheusMkalo.
Is TFS 0.3.7!

--------I dont care if the script is for a differente version of TFS, i just need something to have an idea, a function or something.
 
Last edited:
sending a cancel target is a bit trick i believe, an easy workaround is teleporting player away and instantly back (but the player will also lose target then)
 
First, thank you for your answEr Zothion. I tought that, teleporting the player, but is my last alternative..

What do you mean with the "cancel target", making a player untargetable for An instant should work but i dont have idea where start.

I searched in the npcs files why they untargetable, but i dont get it
 
idk if there is a function whre you can remove the target but a good solution is to make them invulnerable for the next attack or smth like that
 
that is not a solution, i dont want invulnerability or some kind of invincible spell, i just want to cancel the target
 
Code:
local radius_height = 6
local radius_width = 6

local s = getSpectators(getThingPos(cid), radius_height, radius_width)

for i = 1, #s do
    if isPlayer(s[i]) and getCreatureTarget(s[i]) == cid then
       ---- Something
    end
end

-- The code above checks all creatures around the caster in a radius of 6x6. If any of those creatures is a player + their target is the caster player, then do something to each of such players.

Now, this something should be a function that changes a player's target. However, something like that doesn't exist by default in that TFS.
There is
doMonsterChangeTarget(cid)
doMonsterSetTarget(cid, target)

But both apply only to monsters.
You'll probably need to source edit and create a function similar to doMonsterSetTarget that will work on players as well.
Gl
 
Is possible?
Ofc it is, this is how spell code have to looks like:

1. take your pos
2. tele you to your temple
3. tele you back to your previous pos from #1
4. enjoy

How it will looks like?
- Exactly like you need.
 
Back
Top