Code:
local talkstate = 0
function onSpeak(channel, message)
--Send Messages
if message == "walker" then
talkstate = 1
return true
elseif message == "looter" then
talkstate = 2
return true
elseif message == "target" then
talkstate = 3
return true
end
if(talkstate == 1) then
File:write("WPT: " .. message .. "--")
channel:SendOrangeMessage('', message .. 'Added as the answer.')
elseif (talkstate == 2) then
File:write("LOOTER: " .. message .. "--")
channel:SendOrangeMessage('', message .. 'Added as the answer.')
end
end
function onClose(channel)
print('Draky Casino closed. Go to Scripter and open it again if you want to use me.')
end
local canal = Channel.Open('canal', onSpeak, onClose)
if talkstate == 0 then
canal:SendOrangeMessage('canal', 'Options: Walker, Looter, Target')
end
this check the talkstate and write in correct lin