• 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 0.X player invisible as warlock

eyez

Member
Joined
Oct 11, 2016
Messages
129
Reaction score
19
I played a server who some vocations could be invisible as warlock monster is...
It was so fun, but server closed and i want to make like that...

Players was invisible to others monsters (who could se invisible, demons for example attacks and remove the inv), players
And the invisible removes when player get shot, in a area spell

I tried to make it, i dont know much, but there are a lot of requests about it here on forum so i put some scripts together i make it to work:

Code:
<instant name="Shadow Walker" words="utana vis" lvl="8" manapercent="70" exhaustion="2000" needlearn="0" event="script" value="shadow.lua">
        <vocation id="1"/>
</instant>

Code:
function onCastSpell(cid, var)
    parameters = {cid=cid}
    setPlayerGroupId(cid, 2)
    doCreatureExecuteTalkAction(cid, "/ghost", TRUE)
    addEvent(talk, 300000, parameters)
    return true
end

function talk(parameters)
    doCreatureExecuteTalkAction(parameters.cid, "/ghost", TRUE)
    setPlayerGroupId(parameters.cid, 1)
end

Code:
<event type="login" name="cancelInv" event="script" value="cancelinv.lua"/>

Code:
registerCreatureEvent(cid, "cancelInv")

Code:
if(getPlayerGroupId(cid) == 2) then
    setPlayerGroupId(cid, 1)
end
if(isPlayerGhost(cid)) then
    doCreatureExecuteTalkAction(cid, "/ghost", TRUE)
end

but there are a few things that i need to change and i don't know how
and i cant use as i make cause it is totally unplayable, much overpower


1) it's not reciving area damage, like gfbs UEs, it should give damage and cancel inv
2) players who are not invisible can enter on the same SQM of this inv player
3) monsters who can see utana vid should cancel players inv by attacking


is anyone know how to make this 3 changes?
if it is relevant, my source code is: Fir3element/3777 (https://github.com/Fir3element/3777/tree/master/src)
 
I do not know if this is the only way to go, but the easiest and most reliable for me would be go for sources edit, add new "type" of invisible - between God invisible with custom behavior.
 
I do not know if this is the only way to go, but the easiest and most reliable for me would be go for sources edit, add new "type" of invisible - between God invisible with custom behavior.

Idk if it is the way either
I made it by collect parts of requests, asks about it on forum
There is nothing working at all

I have no knowledge to source edit, do u have?
I didn't have even to do this script, just made by collect part of a lot of topics about it on this forum
 
source edit
and use this spell
Code:
local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)

function onCastSpell(cid, var)
    if exhaustion.check(cid, 5062) then
        doPlayerSendTextMessage(cid,27, "You Are Exhausted ("..exhaustion.get(cid,5062)..").")
        doPlayerSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
    else
        if isPlayerGhost(cid) then
            doCreatureExecuteTalkAction(cid, "/ghost", true)
        else
            addEvent(doCreatureExecuteTalkAction,3*1000,cid, "/ghost", true)
            doCreatureExecuteTalkAction(cid, "/ghost", true)
            exhaustion.set(cid, 5062,30)
        end
    end
    return true
end
 
source edit
and use this spell
Code:
local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)

function onCastSpell(cid, var)
    if exhaustion.check(cid, 5062) then
        doPlayerSendTextMessage(cid,27, "You Are Exhausted ("..exhaustion.get(cid,5062)..").")
        doPlayerSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
    else
        if isPlayerGhost(cid) then
            doCreatureExecuteTalkAction(cid, "/ghost", true)
        else
            addEvent(doCreatureExecuteTalkAction,3*1000,cid, "/ghost", true)
            doCreatureExecuteTalkAction(cid, "/ghost", true)
            exhaustion.set(cid, 5062,30)
        end
    end
    return true
end
It has been tested bro?
 
source edit
and use this spell
Code:
local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)

function onCastSpell(cid, var)
    if exhaustion.check(cid, 5062) then
        doPlayerSendTextMessage(cid,27, "You Are Exhausted ("..exhaustion.get(cid,5062)..").")
        doPlayerSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
    else
        if isPlayerGhost(cid) then
            doCreatureExecuteTalkAction(cid, "/ghost", true)
        else
            addEvent(doCreatureExecuteTalkAction,3*1000,cid, "/ghost", true)
            doCreatureExecuteTalkAction(cid, "/ghost", true)
            exhaustion.set(cid, 5062,30)
        end
    end
    return true
end

it still with that 3 problems:

1) it's not reciving area damage, like gfbs UEs from players (its rerciving from monsters [if monsters attacks players who is not inv closer to the player]), it should give damage and cancel inv
2) players who are not invisible can enter on the same SQM of this inv player, it should block the tile to avoid abuses
3) monsters who can see utana vid should cancel players inv by attacking, but the monsters are no targetting inv players
 
Last edited:
I do not know if this is the only way to go, but the easiest and most reliable for me would be go for sources edit, add new "type" of invisible - between God invisible with custom behavior.
^ This is the way.

All you have to do is make a copy of Ghost Mode, then tweak it a little.
Alternatively, make a copy of CONDITION_INVISIBLE and tweak it.
 
Back
Top