mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 4
P
pif Offline OP
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Jun 2004
Posts: 4
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.


--== There are 10 types of people in this world, Those who understand Binary and those who dont.
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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.


Last edited by Zyzzyx26; 04/06/04 09:40 PM.

"All we are saying is give peace a chance" -- John Lennon
Joined: Jun 2004
Posts: 4
P
pif Offline OP
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Jun 2004
Posts: 4
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.

Last edited by pif; 04/06/04 09:40 PM.

--== There are 10 types of people in this world, Those who understand Binary and those who dont.
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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


"All we are saying is give peace a chance" -- John Lennon
Joined: Jun 2004
Posts: 4
P
pif Offline OP
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Jun 2004
Posts: 4
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?

Last edited by pif; 04/06/04 09:59 PM.

--== There are 10 types of people in this world, Those who understand Binary and those who dont.
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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.


"All we are saying is give peace a chance" -- John Lennon
Joined: Jun 2004
Posts: 4
P
pif Offline OP
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Jun 2004
Posts: 4
ok, well doing this made it PM the person, but it was me PM'ing them insted of the bot frown


--== There are 10 types of people in this world, Those who understand Binary and those who dont.
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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


"All we are saying is give peace a chance" -- John Lennon
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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! }
  }
}

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
I must be missing something, because I see no reason not to use
Code:
on ^*:text:@rules:[color:red]#genoro,#mIRC[/color]:{
...

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You're absolutely right smile


Link Copied to Clipboard