mIRC Homepage
Posted By: pif bot script for /topic <channal name>? - 04/06/04 09:01 PM
im kinda new to mIRC and im working on scripting for the channal i use. such as the basic @commands making the bot give a list of commands you can use.

( server is irc.algolx.net channal #GenoRO )

one of the commands id like to get working, is when people say @topic, to have the Topic show up. only way i can think of doing this would be using the /topic <channal name> command. but when i do

on ^*:text:@topic:#:{
set %char
if (# == #genoro) /bs say #genoro /topic #genoro }

it just shows the bot saying

* GenoROBot /topic #genoro

rather then the bot saying that and the Topic showing up. like i said, im new to mIRC scripting so i probably did somthing wrong. if so could you try to help me out?

thanks.
Posted By: Zyzzyx26 Re: bot script for /topic <channal name>? - 04/06/04 09:15 PM
Try $chan(#GenoRO).topic smile

That will return the channel topic.
Code:
on *:text:@topic:#:{
if (# == #genoro) { /bs say #genoro $chan(#).topic }
}
I think this should do it smile

No need for the ^ there wink

Hope it helps,
Zyzzy.

Posted By: pif Re: bot script for /topic <channal name>? - 04/06/04 09:40 PM
Thanks worked perfectly, but like i said im new to the scripting, could you explain what $chan(#GenoRO).topic means in smei Laimen terms
thanks.
Posted By: Zyzzyx26 Re: bot script for /topic <channal name>? - 04/06/04 09:46 PM
Of course (ill try to do my best smile )

$chan(#) is a mIRC identifier - it has a few properties, like .topic

$chan(#).topic will return the topic of the channel between the parentesis.

You can find the rest of the properties in mIRC's help file, along with a better explanation by typing /help window identifiers while on mIRC.

I hope this turns out understandable :P

Zyzzy.

BTW - post above is edited
Posted By: pif Re: bot script for /topic <channal name>? - 04/06/04 09:58 PM
ok one other thing, ive got one script with it set up as.

on ^*:text:@rules:#:{
set %char
if (# == #genoro) /bs act #genoro The Rules are:
if (# == #genoro) /bs act #genoro --==:: In GenoRO ::==--
if (# == #genoro) /bs act #genoro 1) No Ascii characters in char names!!!
if (# == #genoro) /bs act #genoro 2) No Begging!!
if (# == #genoro) /bs act #genoro 3) No Spamming skills in Prontera!
if (# == #genoro) /bs act #genoro --==:: In mIRC ::==--
if (# == #genoro) /bs act #genoro 1) Dont Spam!!!
if (# == #genoro) /bs act #genoro 2) Dont use Color text!!
if (# == #genoro) /bs act #genoro 3) Dont Ghost other peoples Nicks!
if (# == #genoro) /bs act #genoro 4) DONT USE ALL CAPS! }

(probably more complecated then it needs to be)

is there a way to get th bot to PM the person that says @rules rather then the bot replying in the main chat?
Posted By: Zyzzyx26 Re: bot script for /topic <channal name>? - 04/06/04 10:05 PM
Use /msg $nick <rules here> instead of bs act #genoro The Rules are:

One suggestion though: It's not recommended to say those many lines in a row. That might flood off the bot, the users and you. Try putting them in 1 or 2 lines maximun smile

$nick here returns the nickname of the person who said @rules. And, again, you dont need to use that ^ in the on TEXT event. Using that will only be useful if halt or haltdef are in the script (/help $halt for more info)

Hope this does it smile
Zyzzyx.
Posted By: pif Re: bot script for /topic <channal name>? - 04/06/04 10:16 PM
ok, well doing this made it PM the person, but it was me PM'ing them insted of the bot frown
Posted By: Zyzzyx26 Re: bot script for /topic <channal name>? - 04/06/04 10:22 PM
Oh... i see now. If the bot is not owned by you, but it's the official Channel Service bot of the network you are in, then i don't think that is possble, unless the bot has the /msg command. You'd have to get that info from the network you use.

Good luck! smile
Posted By: Iori Re: bot script for /topic <channal name>? - 04/06/04 11:43 PM
Assuming /bs is an alias for "botspeak" and say and act are parameters specifying msg or action.
Code:
on ^*:text:@rules:#:{
  if !$istok(#mirc #genoro #add #more #chans #here #like #so,#,32) { return }
  bs act $nick --==:: The Rules  for # ::==--
  if (# == #genoro) {
    bs act $nick 1) No Ascii characters in char names!!!
    bs act $nick 2) No Begging!!
    bs act $nick 3) No Spamming skills in Prontera!
  }
  elseif (# == #mirc) {
    bs act $nick 1) Dont Spam!!!
    bs act $nick 2) Dont use Color text!!
    bs act $nick 3) Dont Ghost other peoples Nicks!
    bs act $nick 4) DONT USE ALL CAPS! }
  }
}
Posted By: Kelder Re: bot script for /topic <channal name>? - 05/06/04 12:01 AM
I must be missing something, because I see no reason not to use
Code:
on ^*:text:@rules:[color:red]#genoro,#mIRC[/color]:{
...
Posted By: Iori Re: bot script for /topic <channal name>? - 06/06/04 08:23 PM
You're absolutely right smile
© mIRC Discussion Forums