• 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+ Can you Hide a character?

leeebux

Awsome
Premium User
Joined
May 18, 2009
Messages
103
Reaction score
5
Location
Sweden
Hello! Quick question, can you hide a character so u dont see the name or the char itself on a specific Tile?
 
Code:
function onStepIn(cid, item, position, fromPosition)
   local player=Player(cid)  
   player:setGhostMode(true)
    end
end
Found out u can use Ghost mode, now i only need to put the code togheter, anyone knows whats wrong?
 
Last edited:
read the code.
Player isnt declared, yet you are setting ghostmode to it.


local player=Player(cid)
 
Code:
function onStepIn(cid, item, position, fromPosition)
    if isPlayer(cid) and getCreatureStorage(cid, 9999) == -1 then
    local player=Player(cid)
    player:setGhostMode(true)
    end
end
Like this?
 
I am not sure if I understand correctly but I am using TFS 1.3 there's a command called /hide you can use it like /hide itemID then you'll look exactly the same as the item without name or hp or anything.
 
im using TFS 1.3.
I made this Quick. It works on my server.

Put these two lines in movements.xml
You can change actionid to what you want, just make sure the floor item you wish to walk on matches that actionID.
Code:
<movevent event="StepOut" actionid="55557" script="test2.lua" />
<movevent event="StepIn" actionid="55557" script="test2.lua" />

Put this where you want it to be located in movements as a .lua file.
Code:
function onStepIn(creature, item, position, fromPosition)
    if item.actionid == 55557 then
    creature:getPosition():sendMagicEffect(6)
    creature:setGhostMode(true)
    end
    return true
end

function onStepOut(creature, item, position, fromPosition)
    if item.actionid == 55557 then
    creature:getPosition():sendMagicEffect(7)
    creature:setGhostMode(false)
    end
    return true
end

also this was a nice idea. I will have it on my server too, thanks <3
 
Back
Top