• 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!

Problem auto death channel

All you said was "What do I have to do to make the death channel appear to everyone immediately after logging on to the character?" and then linked to a script. Sometimes you find the solution to a problem inside of an unrelated issue. The script I linked to is not related to yours however it does contain information which can be applied to the issue. "opening the chat window on login". If 0.4 does not allow this to take place without a source edit then please considering updating to a more current branch.
 
I don't know enough about your distro to be sure but this function exists:
Lua:
sendChannelMessage(channelId, type, message)
so you could write
Lua:
sendChannelMessage(10, TALKTYPE_SAY, '')
and, assuming it opens the channel to send the message, you would get a new line every time somebody logs in
 
I don't know enough about your distro to be sure but this function exists:
Lua:
sendChannelMessage(channelId, type, message)
so you could write
Lua:
sendChannelMessage(10, TALKTYPE_SAY, '')
and, assuming it opens the channel to send the message, you would get a new line every time somebody logs in
This is or something similar of what is available to his server is what he needs to open the chat window on login, but he didn't want to bother reading the page i linked. He just wanted someone to modify the script with the requirements all laid out.
Lua:
function onLogin(cid)
local player = Player(cid)
  player:openChannel(10)
  return true
end
 
May I ask where did you have to look to find that function

Not gonna do one of those "let me google that for you" haha, but thats what I normally do :p
Ex if it's 0.4 I just google "tfs 0.4 github" then find one with a source code, then open up luascript.cpp
global860/luascript.cpp at master · otservme/global860 · GitHub

If you got the source code downloaded you can just as easy check it on your computer.

Edit but it isn't easy when people don't write that TFS version they got, but he wrote above that he used 0.4
Problem auto death channel
 
no
Lua:
function onLogin(cid)
   doPlayerOpenChannel(cid,10)
   return true
end
is all you need
or you could add only this line
Lua:
doPlayerOpenChannel(cid,10)
to your existing login.lua if there already is one in your creaturescripts folder

also:
How to display CODE properly in your post
 
Back
Top