• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Open Channel

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
Can I login my character and the channel that I created to open automatic? I wanna a function to open the channel.
 
creaturescripts/scripts/open_channel.lua

LUA:
function onLogin(cid)
		doPlayerOpenChannel(cid, CHANNEL_CUSTOM)
end

creaturescripts/scripts/login.lua
LUA:
registerCreatureEvent(cid,'open_channel')

creaturescripts/creaturescripts.xml
LUA:
<event type="login" name="open_channel" event="script" value="open_channel.lua"/>

xml/channels.xml
LUA:
<channel id="10" name="Custom-Channel"/>

http://otland.net/reputation.php?do=addreputation&p=1267014 ;)
 
Back
Top