• 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 INV as Warlock,Stalker...

eyez

Member
Joined
Oct 11, 2016
Messages
129
Reaction score
19
I search and test everything about this in this forum, there are a lot of topics for requests, helps but no one works well as should be

  • monsters who can see inv stops the inv by atking
  • atk in area stops the inv (players/monsters)
  • players inv could be pushed
  • when you are inv and atk, it stops the inv

My favorite OT had an vocation called Rogue, who have utana vid, but it was not normal utana vid...
Using this spell i could be inv, like really inv to others players, it was amazing...


I'm doing a 0.4 server but doesn't matter i would like to play any ot with this feature

If there is any OT with this feature, pls share, i wanna play :)
 
@eyez That was werewolf and my server with the rogue.

We basically wiped out the 'tutor' position and named it rogue, and forcibly gave rogue's the /ghost command when they used the spell.
As well as the other checks, minus the 'being able to be pushed while invis", unless it was another rogue pushing you.

Only drawback was that all rogue's could see other invisible rogues, and when they went invis, they appeared offline in vip channel.

We could of fixed some of the issues if we did source edits.. but we never learned c++

Everything we did was pure Lua
 
@eyez That was werewolf and my server with the rogue.

We basically wiped out the 'tutor' position and named it rogue, and forcibly gave rogue's the /ghost command when they used the spell.
As well as the other checks, minus the 'being able to be pushed while invis", unless it was another rogue pushing you.

Only drawback was that all rogue's could see other invisible rogues, and when they went invis, they appeared offline in vip channel.

We could of fixed some of the issues if we did source edits.. but we never learned c++

Everything we did was pure Lua


Looking a lot on this forum i got a way to do something like u did:

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

shadow.lua
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,30*1000,cid, "/ghost", true)
            doCreatureExecuteTalkAction(cid, "/ghost", true)
            exhaustion.set(cid, 5062,300)
        end
    end
    return true
end




sources edits in:
player.cpp (Fir3element/3777 (https://github.com/Fir3element/3777/blob/master/src/player.cpp)):

Code:
// player inv 1
void Player::sendCreatureChangeVisible(const Creature* creature, Visible_t visible)
{
    if(!client)
        return;
    const Player* player = creature->getPlayer();
    if(player == this || (player && (visible < VISIBLE_GHOST_APPEAR || (getAccess() > 2 && getGhostAccess() >= player->getGhostAccess())))
    || (!player && canSeeInvisibility()))
        sendCreatureChangeOutfit(creature, creature->getCurrentOutfit());
    else if(visible == VISIBLE_DISAPPEAR || visible == VISIBLE_GHOST_DISAPPEAR)
        sendCreatureDisappear(creature, creature->getTile()->getClientIndexOfThing(this, creature));
    else
        sendCreatureAppear(creature);
}

Code:
// player inv 2
bool Player::canSeeCreature(const Creature* creature) const
{
    if(creature == this)
        return true;
    if(const Player* player = creature->getPlayer())
        return !player->isGhost() || (getAccess() > 2 && getGhostAccess() >= player->getGhostAccess());
        return !creature->isInvisible() || canSeeInvisibility();
}



creaturescripts

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

Code:
function onLogin(cid)
    if getPlayerGroupId(cid) == 2 then
        doPlayerSetGroupId(cid, 1)
    end
    if isPlayerGhost(cid) then
        doCreatureExecuteTalkAction(cid, "/ghost", TRUE)
    end
    return true
end


Without player needs to be a tutor...


But it stills with some BIG problems:

monsters that can see utana vid, cant see this spell
so a player could use this spell to finish a task or something

---

nowdays did u know a way to make it better?
 
Looking a lot on this forum i got a way to do something like u did:

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

shadow.lua
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,30*1000,cid, "/ghost", true)
            doCreatureExecuteTalkAction(cid, "/ghost", true)
            exhaustion.set(cid, 5062,300)
        end
    end
    return true
end




sources edits in:
player.cpp (Fir3element/3777 (https://github.com/Fir3element/3777/blob/master/src/player.cpp)):

Code:
// player inv 1
void Player::sendCreatureChangeVisible(const Creature* creature, Visible_t visible)
{
    if(!client)
        return;
    const Player* player = creature->getPlayer();
    if(player == this || (player && (visible < VISIBLE_GHOST_APPEAR || (getAccess() > 2 && getGhostAccess() >= player->getGhostAccess())))
    || (!player && canSeeInvisibility()))
        sendCreatureChangeOutfit(creature, creature->getCurrentOutfit());
    else if(visible == VISIBLE_DISAPPEAR || visible == VISIBLE_GHOST_DISAPPEAR)
        sendCreatureDisappear(creature, creature->getTile()->getClientIndexOfThing(this, creature));
    else
        sendCreatureAppear(creature);
}

Code:
// player inv 2
bool Player::canSeeCreature(const Creature* creature) const
{
    if(creature == this)
        return true;
    if(const Player* player = creature->getPlayer())
        return !player->isGhost() || (getAccess() > 2 && getGhostAccess() >= player->getGhostAccess());
        return !creature->isInvisible() || canSeeInvisibility();
}



creaturescripts

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

Code:
function onLogin(cid)
    if getPlayerGroupId(cid) == 2 then
        doPlayerSetGroupId(cid, 1)
    end
    if isPlayerGhost(cid) then
        doCreatureExecuteTalkAction(cid, "/ghost", TRUE)
    end
    return true
end


Without player needs to be a tutor...


But it stills with some BIG problems:

monsters that can see utana vid, cant see this spell
so a player could use this spell to finish a task or something

---

nowdays did u know a way to make it better?

any idea guys?
there are a lot of topics like this one, idk what to do now :(
 
Back
Top