• Vote in May Mapping Competition to select a winner!
  • 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
Joined
May 18, 2009
Messages
92
Best answers
0
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
Joined
May 18, 2009
Messages
92
Best answers
0
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

Intermediate OT User
Joined
Dec 4, 2017
Messages
217
Best answers
29
Reaction score
102
Location
UK
read the code.
Player isnt declared, yet you are setting ghostmode to it.


local player=Player(cid)
 
OP
leeebux

leeebux

Awsome
Joined
May 18, 2009
Messages
92
Best answers
0
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,385
Best answers
37
Reaction score
891
Location
Arica - Chile
OP
leeebux

leeebux

Awsome
Joined
May 18, 2009
Messages
92
Best answers
0
Reaction score
3
Location
Sweden
Dosent work, and bo clue how to fix it
 

M0ustafa

1337
Support Team
Joined
Mar 4, 2017
Messages
1,590
Best answers
193
Reaction score
601
Location
Egypt
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
471
Best answers
0
Reaction score
183
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