• 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+ Problems with invisibility spell

Night Wolf

I don't bite.
Joined
Feb 10, 2008
Messages
580
Solutions
8
Reaction score
928
Location
Spain
Hi all, I've been trying to do a spell that makes your character invisible to monsters and players as well. So far I've been struggling with the following problems:

My first approach was to set the player outfit for an invisible item
1- If you add CONDITION_INVISIBLE with CONDITION_OUTFIT the sparks from CONDITION_INVISIBLE WILL ALWAYS OVERCOME the CONDITION_OUTFIT and therefore you'll be seen by the sparks of CONDITION_INVISIBLE.

2- Using CONDITION_OUTFIT for an invisible item (460 for example) along with setHiddenHealth(true) can still be spotted by the use of botting (mage bot for instance).

So the last thing I've tried was using setGhostMode. This time no botter could spot me and I was invisible and at the same time could use the CONDITION_INVISIBLE so the monsters wouldn't see me as well. It sounded perfect until I've noticed I was immune to attacks (both monsters and players).

Anyone can think about any other solution? Why in the first place players are immune to attacks when they use setGhostMode(true)?

Thanks in advance.
 
Hi all, I've been trying to do a spell that makes your character invisible to monsters and players as well. So far I've been struggling with the following problems:

My first approach was to set the player outfit for an invisible item
1- If you add CONDITION_INVISIBLE with CONDITION_OUTFIT the sparks from CONDITION_INVISIBLE WILL ALWAYS OVERCOME the CONDITION_OUTFIT and therefore you'll be seen by the sparks of CONDITION_INVISIBLE.

2- Using CONDITION_OUTFIT for an invisible item (460 for example) along with setHiddenHealth(true) can still be spotted by the use of botting (mage bot for instance).

So the last thing I've tried was using setGhostMode. This time no botter could spot me and I was invisible and at the same time could use the CONDITION_INVISIBLE so the monsters wouldn't see me as well. It sounded perfect until I've noticed I was immune to attacks (both monsters and players).

Anyone can think about any other solution? Why in the first place players are immune to attacks when they use setGhostMode(true)?

Thanks in advance.
setGhostMode(true) is mainly used by gamemaster, community managers and god characters just to be hidden. Im sure thay added that you are immune to attacks just to make sure the server wont send animations if a player UE or GFB etc...
But if you make a new function e.g. setPlayerGhostMode(true) and make sure the immune to attack isnt included in the function.
Im sorry but my knowledge in c++ is bad so that is a task i wouldnt take on for now, but atleast i give you a hint of where to start.

Edit:
Seems like my idea was a bad one, once i did look in to the source files i saw that the ghostmode is all over the place.
 
Last edited:
I wasn't here to help so I don't have much to say, but why the hell a function that is called setGhostMode makes you unhitable? or worse: why the condition invisible is attached to that looktype? Those things shouldn't be tied together.
 
Now I dont have an idea how to do that by spells but...

just make a second command like /ghost and then execute it in a spell.

The first problem is solved automatically
cause if you become invisible monsters wont be seeing you automatically.

The problem is that others people with the same group id will be see you even at ghost mod.

And this should have to be changed

talkaction.cpp/h

@edit ok I got it
I'm talking about to change the existing command "/ghost"

In player.cpp search for the function: Player::canSeeCreature
And remove that part:
C++:
|| getGhostAccess() >= player->getGhostAccess()

Now nobody won't be seen although you will be GOD, you won't see player.

Note: I noticed that walking through is blocking "There is not enough room".(if you are invisible)

In 8.6 is that function:
Lua:
doCreatureExecuteTalkAction(cid, "/ghost")
 
Last edited:
the ghost from 8.6 is different from the ghost in tfs 1.x :(

it doesn't use the same system of groups to know which player can see which one invisible, instead when you use player:setGhostMode(true) you'll be invisible for everyone that doesn't have the flag of CANSENSEINVISIBILITY. The problem is that unfortunately they merged this ghostMode function along with immune to hit and I don't really understand why's that since they are completely different functions
 
Back
Top