mIRC Home    About    Download    Register    News    Help

Print Thread
Remote code help #155343 05/08/06 08:20 PM
Joined: Oct 2003
Posts: 39
Matrixx Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2003
Posts: 39
In my remotes i have this:

Code:
on @*:text:!menu*:#matrixx:{ notice $nick Welcome to the Help Menu: Feel free to use the following commands: !register, !forum, !general, !welcome, !crazy, !rules, !faq } 


ive called it menu.mrc

I also have this:

Code:
 on @*:join:#:{
  .timer 1 3 check.reg $chan $nick
}
alias check.reg {
  if $2 isreg $1 {
    .mode $1 +v $2
  }
} 


and called it onjoin.mrc

What im looking to do is have both together as one so the result would be that it voices anyone who enters the channel then gives them a notice saying:

[color:red] Hello $nick Welcome to the Matrixx Help Menu: Feel free to use the following commands:
!register, !forum, !general, !welcome, !crazy, !rules, !faq /color]

in time i will want to add to the menu with other commands also,

can anyone help me with what snippet i need to place in my remotes as 1 .mrc file

Thank you


Gary
Re: Remote code help #155344 05/08/06 08:32 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Sounds easy.....

Code:
on *:JOIN:#matrixx:{
  mode $chan +v $nick
  .notice $nick Hello $nick Welcome to the Matrixx Help Menu: Feel free to use the following commands: !register, !forum, !general, !welcome, !crazy, !rules, !faq
}

on *:TEXT:!menu:#matrixx:{
  .notice $nick Welcome to the Help Menu: Feel free to use the following commands: !register, !forum, !general, !welcome, !crazy, !rules, !faq
}


Just unload the other 2 scripts that you now have.
Create 1 new remote file, and paste the above code.

It will:
- voice everyone that join channel #matrixx
- notice everyone that joins with the help menu.
- notice the help menu when someone types !menu

Good luck.

Re: Remote code help #155345 05/08/06 08:34 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
  
on @*:text:!menu*:#matrixx:{showmenus}
on @*:join:#matrixx:{
  .timer 1 3 check.reg $chan $nick
}
alias check.reg {
  if $2 isreg $1 {
    .mode $1 +v $2
    showmenus
  }
}
alias showmenus {
  notice $nick Welcome to the Help Menu: Feel free to use the following commands: !register, !forum, !general, !welcome, !crazy, !rules, !faq 
}


[edit]or what OrionsBelt said.. ;o)

Last edited by billythekid; 05/08/06 08:35 PM.
Re: Remote code help #155346 05/08/06 11:41 PM
Joined: Oct 2003
Posts: 39
Matrixx Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2003
Posts: 39
Thank for your help guys, one question thou

i dont want to voice anyone who has there nick already registered, so where inside the code would i add a command to do this?


Gary
Re: Remote code help #155347 05/08/06 11:46 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
I think Billy's script already contains that part...
The checkreg alias stuff....?

Re: Remote code help #155348 06/08/06 12:22 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
yep..it does

Re: Remote code help #155349 06/08/06 12:59 AM
Joined: Oct 2003
Posts: 39
Matrixx Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2003
Posts: 39
This is what i have so far:

Code:
on *:JOIN:#matrixx:{  
  mode $chan +v $nick
  .notice $nick Hello $nick ,Welcome to the matrixx: Feel free to use the help menu, please type: !menu
}
on *:TEXT:!menu:#matrixx:{ 
  .notice $nick Welcome to the Help Menu $nick: Feel free to use the following commands: !register, !forum, !general, !welcome, !crazy, !rules, !faq
}
on %*:text:!register*:#matrixx:{ notice $nick To register on the forum go here: http://www.some url }
on %*:text:!forum*:#matrixx:{ notice $nick The forum homepage is here: http://www.some url }
on %*:text:!general*:#matrixx:{ notice $nick For general chat go here: http://www.some url  }
on %*:text:!welcome*:#matrixx:{ notice $nick Introduce yourself on the forum here: http://www.some url  }
on %*:text:!crazy*:#matrixx:{ notice $nick crazy corner go here: http://www.some url  }
on %*:text:!rules*:#matrixx:{ notice $nick The forum rules are available here: http://www.some url }
on %*:text:!faq*:#matrixx:{ notice $nick The forum frequently asked questions are here: http://www.some url }
  


i cant seem to know where to place that code Billy added


Gary
Re: Remote code help #155350 06/08/06 01:09 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on %*:text:!register*:#matrixx:{ notice $nick To register on the forum go here: http://www.some url }
on %*:text:!forum*:#matrixx:{ notice $nick The forum homepage is here: http://www.some url }
on %*:text:!general*:#matrixx:{ notice $nick For general chat go here: http://www.some url  }
on %*:text:!welcome*:#matrixx:{ notice $nick Introduce yourself on the forum here: http://www.some url  }
on %*:text:!crazy*:#matrixx:{ notice $nick crazy corner go here: http://www.some url  }
on %*:text:!rules*:#matrixx:{ notice $nick The forum rules are available here: http://www.some url }
on %*:text:!faq*:#matrixx:{ notice $nick The forum frequently asked questions are here: http://www.some url }

on *:text:!menu:#matrixx:{
  showmenus $nick
}
on @*:join:#matrixx:{
  .timer 1 3 check.reg $chan $nick
}
alias check.reg {
  if $2 isreg $1 {
    .mode $1 +v $2
    showmenus $2
  }
}
alias showmenus {
  notice $1 Welcome to the Help Menu: Feel free to use the following commands: !register, !forum, !general, !welcome, !crazy, !rules, !faq 
}
 


I left the % prefixes in place, inspite of the fact that I was unable to locate them in the help file for that type of operation.

If you find that the code isn't working, I'd suggest you start by removing the % prefixes.

Re: Remote code help #155351 06/08/06 01:37 AM
Joined: Oct 2003
Posts: 39
Matrixx Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2003
Posts: 39
Looking good so far, its not voiceing anyone who has a registered nick, which is good and when they type a command like !register its replying ok,
but its not sending them this notice when they join the channel

Code:
 .notice $nick Hello $nick ,Welcome to the matrixx: Feel free to use the help menu, please type: !menu


any ideas?

Re: Remote code help #155352 06/08/06 02:25 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
In your posted code, you're still using $nick in the notice.
In the code I posted, that notice is in an alias.
some identifiers, like $nick and $chan return $null when used in an alias, so you have to pass the information as a parameter.

That's what the $1 in the alias (as I posted it) represents.

Please ensure that you're using the entire code I posted, or post your code so that I can see exactly what needs to be changed and where.

Re: Remote code help #155353 06/08/06 02:46 AM
Joined: Oct 2003
Posts: 39
Matrixx Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2003
Posts: 39
This is the full code that is being used at the moment in the channel

Code:
 on %*:text:!register*:#perpetual-night:{ notice $nick Hello $nick to register on the forum go here: http://www.perpetualnight.ca/forum/index.php?act=Reg&CODE=00 }
on %*:text:!forum*:#perpetual-night:{ notice $nick The forum homepage is here: http://www.perpetualnight.ca/forum }
on %*:text:!password*:#perpetual-night:{ notice $nick Sorry $nick you need to register on the forum to view passwords: please type !register }
on %*:text:!general*:#perpetual-night:{ notice $nick Hey $nick for general chat go here: http://www.perpetualnight.ca/forum/index.php?showforum=7 }
on %*:text:!welcome*:#perpetual-night:{ notice $nick Introduce yourself $nick on the forum by going here: http://www.perpetualnight.ca/forum/index.php?showforum=9 }
on %*:text:!crazy*:#perpetual-night:{ notice $nick Perpetualnight crazy corner go here: http://www.perpetualnight.ca/forum/index.php?showforum=16 }
on %*:text:!rules*:#perpetual-night:{ notice $nick The forum rules are available here: http://www.perpetualnight.ca/forum/index.php?showtopic=221 }
on %*:text:!faq*:#perpetual-night:{ notice $nick The forum frequently asked questions are here: http://www.perpetualnight.ca/forum/index.php?showtopic=287 }
on *:text:!menu:#perpetual-night:{
   showmenus $nick
}
on %*:join:#perpetual-night:{
     .timer 1 3 check.reg $chan $nick
}
alias check.reg {
   if $2 isreg $1 {
    .mode $1 +v $2
    showmenus $2
   }
 }
 alias showmenus {
     notice $1 Hello $nick welcome to the help menu: Feel free to use the following commands: !register, !forum, !password, !general, !welcome, !crazy, !rules, !faq
}


im useing 2 scripts:
1. is useing the code above (like a bot in the channel)
2. myself (this way i can test the code to see if its working)

the % means half op
the @ means full op

so the menu will only work if the script is half opped in the channel

now in the status window of the script that is giving the responses i see the replies given to the user, so that im happy with, but for instance when i join the channel as a fullop its not giving me the notice

so in a nutshell this is what im after

a user joins the channel and gives them this notice
Code:
.notice $nick Hello $nick ,Welcome to Perpetual-night: Feel free to use the help menu, please type: !menu


then when they type !menu

they get this as a notice
Code:
.notice $nick Welcome to the Help Menu $nick: Feel free to use the following commands: !register, !forum, !password, !general, !welcome, !crazy, !rules, !faq


Then the same when they type any of the following
!register
!forum

they get the responses from the ontext

etc...


Gary
Re: Remote code help #155354 06/08/06 03:06 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This goes on a bot, not your client.
Code:
 on *:text:!register*:#perpetual-night:{
  notice $nick Hello $nick to register on the forum go here: http://www.perpetualnight.ca/forum/index.php?act=Reg&CODE=00
}
on *:text:!forum*:#perpetual-night:{
  notice $nick The forum homepage is here: http://www.perpetualnight.ca/forum 
}
on *:text:!password*:#perpetual-night:{
  notice $nick Sorry $nick you need to register on the forum to view passwords: please type !register 
}
on *:text:!general*:#perpetual-night:{
  notice $nick Hey $nick for general chat go here: http://www.perpetualnight.ca/forum/index.php?showforum=7 
}
on *:text:!welcome*:#perpetual-night:{
  notice $nick Introduce yourself $nick on the forum by going here: http://www.perpetualnight.ca/forum/index.php?showforum=9 
}
on *:text:!crazy*:#perpetual-night:{
  notice $nick Perpetualnight crazy corner go here: http://www.perpetualnight.ca/forum/index.php?showforum=16 
}
on *:text:!rules*:#perpetual-night:{
  notice $nick The forum rules are available here: http://www.perpetualnight.ca/forum/index.php?showtopic=221 
}
on *:text:!faq*:#perpetual-night:{
  notice $nick The forum frequently asked questions are here: http://www.perpetualnight.ca/forum/index.php?showtopic=287 
}
on *:text:!menu:#perpetual-night:{
  notice $nick Hello $nick welcome to the help menu: Feel free to use the following commands: !register, !forum, !password, !general, !welcome, !crazy, !rules, !faq
}
on @%*:join:#perpetual-night:{
  .timer 1 3 check.reg $chan $nick
}
alias check.reg {
  if $2 isreg $1 {
    .mode $1 +v $2
    .notice $nick Hello $nick $+ , Welcome to Perpetual-night: Feel free to use the help menu, please type: !menu
  }
}
 

Re: Remote code help #155355 06/08/06 04:01 AM
Joined: Oct 2003
Posts: 39
Matrixx Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2003
Posts: 39
No such nick/channel: Hello

This is an error im getting from the bot

.notice $nick Hello $nick $+ , Welcome to Perpetual-night: Feel free to use the help menu, please type: !menu

so ive removed that word highlighted in red, and there is no error showing now, but even with the word there its still not showing me the notice, also ive see that on the

on *:text:!menu:#perpetual-night:{

there is no % before the *

as goes the same with all the other on *.text is there no need for that % now?


Gary
Re: Remote code help #155356 06/08/06 04:21 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The @ and % prefixes are only required if you want certain commands to be done when the bot has a certain level. Eg: setting a channel mode, voicing a user, etc.

I can't see anything wrong with the original .notice line, but it seems like the first occurance of $nick in that line is being ignored, so the server thinks it's seeing .notice Hello $nick rather than .notice $nick Hello $nick

That's why that error was coming up, now as to how to fix it, the only thing I can think of is to manually re-write that line, so that we're sure there aren't any hidden codes being transfered in a copy/paste.

Re: Remote code help #155357 06/08/06 12:47 PM
Joined: Oct 2003
Posts: 39
Matrixx Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Oct 2003
Posts: 39
ok thanks mate, and thanks for taking the time with the code etc.. im gonna re type it just as you said to make sure there is no errors with copy and pasteing..

Cheers


Gary