Sethric
Active Member
If I had Amadeus in my fleet and he said hello, I want to be able to echo to the console, but, I'm not getting the syntax correct.
Here's an example:
Thanks for any suggestions, just trying to learn.
I realize I need this snippet to stay running in a loop to watch for messages, and I slapped on a 'while 1 == 1', is that a particularly lame way to loop? I couldnt think of anything much better, is 'while ${Script[thisscript](exists)}' better to use since it'll run as long as the script runs?
Ok, thanks again while I brute force my way through scripting in lavishsoft!
Here's an example:
Code:
function main()
{
Event[EVE_OnChannelMessage]:AttachAtom[This:OnChannelMessage]
EVE:ActivateChannelMessageEvents
while 1 == 1
{
if (${Channel.Equal[fleet]} && ${Author.Equal[amadeus]} && ${MessageText.Find[hello]})
{
echo Ama says hi!
}
}
}
function Shutdown()
{
Event[EVE_OnChannelMessage]:DetachAtom[This:OnChannelMessage]
}
I realize I need this snippet to stay running in a loop to watch for messages, and I slapped on a 'while 1 == 1', is that a particularly lame way to loop? I couldnt think of anything much better, is 'while ${Script[thisscript](exists)}' better to use since it'll run as long as the script runs?
Ok, thanks again while I brute force my way through scripting in lavishsoft!