'////////////////////////////////////////////////////////////////////////
'// CHANNEL HOPPER SCRIPT FOR 9.4
'// WRITTEN BY: Chriso
'// This script will join a list of channels saying the given message,
'// when the last channel is reached it will loop back to the start.
'////////////////////////////////////////////////////////////////////////

Dim Channels, CurChannel
Const Message = "My Message"

'// Return Script Information
Sub Script(Name, Major, Minor, Build, Author, Commands, Description)
	Name = "Channel Hopper Script"
	Major = 1
	Minor = 0
	Build = 0
	Author = "Chriso"
	Description = "Join a list of channels saying the given message, when the last channel is reached it will loop back to the start."
End Sub

'// Called when the script is loaded for a particular bot
Sub Event_Load()
	ReDim Channels(5)	'// Change the number in the brackets to increase/decrease the amount of channels
	Channels(0) = "Diablo Europe-DEU1"	
	Channels(1) = "Diablo Europe-DEU2"
	Channels(2) = "Diablo Europe-DEU3"
	Channels(3) = "Diablo Europe-DEU4"
	Channels(4) = "Diablo Europe-DEU5"
	Channels(5) = "Clan Recruitment"	'// To add another item, copy this line and +1 to the number in brackets
	CurChannel = 0
	AddTimer "ChannelHopper", "Hop_Timer", 15000, True
End Sub

'// Called every 10 seconds
Sub Hop_Timer()
	If CurChannel > UBound(Channels) Then CurChannel = 0
	Send "/join " & Channels(CurChannel)
	Send Message
	CurChannel = CurChannel + 1
End Sub