TFS 1.X+ Can you Hide a character?

leeebux

Awsome
Premium User
Joined
May 18, 2009
Messages
89
Reaction score
3
Location
Sweden
Hello! Quick question, can you hide a character so u dont see the name or the char itself on a specific Tile?
 
OP
leeebux

leeebux

Awsome
Premium User
Joined
May 18, 2009
Messages
89
Reaction score
3
Location
Sweden
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:

Leesne

Member
Joined
Dec 4, 2017
Messages
82
Reaction score
32
read the code.
Player isnt declared, yet you are setting ghostmode to it.


local player=Player(cid)
 
OP
leeebux

leeebux

Awsome
Premium User
Joined
May 18, 2009
Messages
89
Reaction score
3
Location
Sweden
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?
 

StreamSide

Joseluis Gonzalez
Support Team
Joined
Aug 31, 2007
Messages
3,233
Reaction score
754
Location
Arica - Chile
OP
leeebux

leeebux

Awsome
Premium User
Joined
May 18, 2009
Messages
89
Reaction score
3
Location
Sweden
Dosent work, and bo clue how to fix it
 

Mustafa1337

Î Àm ŁĕğẹňĎ
Joined
Mar 4, 2017
Messages
313
Reaction score
79
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.
 

Nemphis

Advanced OT User
Joined
Jun 22, 2009
Messages
321
Reaction score
111
Location
Sweden
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
 
Top