xto94
12-01-2015, 11:34 PM
Hi, i have problem with custom channel
here's the code:
function onSpeak(channel, text)
channel:SendYellowMessage("Script",text)
if (text == '/help') then
channel:SendOrangeMessage('COMMANDS')
channel:SendYellowMessage('/quest - starts from the beginning')
channel:SendOrangeMessage('/task - get task from NPC')
elseif (text == 'quest') then
Walker.Start()
Targeting.Start()
elseif (text == 'task') then
gotoLabel("Task")
Walker.Start()
Targeting.Start()
elseif (text == 'testmsg') then
channel:SendYellowMessage('test message')
end
end
local channel = Channel.New("Script channel", onSpeak)
channel:SendYellowMessage('type /help')
channel:SendYellowMessage('testtesttesttesttest')
00:35 type /help: 0
00:35 testtesttesttesttest: 0
00:32 Script: /help
00:32 COMMANDS: 0
00:32 /quest - starts from the begi: 0 -- <<also here it cut some text
00:32 /task - get task from NPC: 0
and here's the result of trying commands... how to eliminate the "0"s and ":" at end of lines?
here's the code:
function onSpeak(channel, text)
channel:SendYellowMessage("Script",text)
if (text == '/help') then
channel:SendOrangeMessage('COMMANDS')
channel:SendYellowMessage('/quest - starts from the beginning')
channel:SendOrangeMessage('/task - get task from NPC')
elseif (text == 'quest') then
Walker.Start()
Targeting.Start()
elseif (text == 'task') then
gotoLabel("Task")
Walker.Start()
Targeting.Start()
elseif (text == 'testmsg') then
channel:SendYellowMessage('test message')
end
end
local channel = Channel.New("Script channel", onSpeak)
channel:SendYellowMessage('type /help')
channel:SendYellowMessage('testtesttesttesttest')
00:35 type /help: 0
00:35 testtesttesttesttest: 0
00:32 Script: /help
00:32 COMMANDS: 0
00:32 /quest - starts from the begi: 0 -- <<also here it cut some text
00:32 /task - get task from NPC: 0
and here's the result of trying commands... how to eliminate the "0"s and ":" at end of lines?