IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: Norrdec on November 13, 2006, 03:25:24 PM

Title: Use of Nicks Command
Post by: Norrdec on November 13, 2006, 03:25:24 PM
As i have NO exp. in using VB or other scripts I would like to ask for help.

I tried to do this in IC5 style

I wanted to get all nicks from a channel, and message them in that channel with ONTEXT
I wrote a scrip like this:
Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Message = "!help" then
SendCommand /msg " $ Channel $  Nicks("#oblivion_squadron",ServerNumber) "


And well... it didn't work.
Is there a lot of BS in it...?

Also if someone could show me how would it look like in IC7 style?
Title: Re: Use of Nicks Command
Post by: Snerf on November 13, 2006, 04:10:15 PM
Close, but not quite. Your not using SendCommand properly, and your not putting the quotes in the right places.
Also, use the & symbol for joining strings/messages together.


Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Message = "!help" then
  SendCommand "/msg " & Channel & " " & Nicks("#oblivion_squadron",ServerNumber), ServerNumber
end if
End Sub
Title: Re: Use of Nicks Command
Post by: Norrdec on November 13, 2006, 04:12:48 PM
Thank you.
/edit
Are you sure this is correct...? Its not working on my side.

If I would say !help (after loading the script of course) it should post all the names, and yet it does nothing.
Im really puzzled :|
Title: Re: Use of Nicks Command
Post by: DarkStar on November 13, 2006, 07:22:38 PM
Thank you.
/edit
Are you sure this is correct...? Its not working on my side.

If I would say !help (after loading the script of course) it should post all the names, and yet it does nothing.
Im really puzzled :|

the ONTEXT sub does not trigure when you use it.
Title: Re: Use of Nicks Command
Post by: Norrdec on November 15, 2006, 09:46:27 AM
Well even if someone else says it, it doesn't work.
Title: Re: Use of Nicks Command
Post by: Snerf on November 15, 2006, 10:23:09 AM
Well, I am assuming you are doing this in IceChat 7.
When you saved the Script file, since you are using an IceChat 5 style script, you need to change the file type from an IceChat Script, to an IceChat 5 Script.
Choosing file, Save as, lets you choose what type.
I am taking a wild guess, it was saved as the Default Type :)
Title: Re: Use of Nicks Command
Post by: Norrdec on November 16, 2006, 07:06:18 AM
That was it! Thanks ;)