|
|
Joined: Sep 2003
Posts: 122
Vogon poet
|
OP
Vogon poet
Joined: Sep 2003
Posts: 122 |
Is there a way of combining these scripts so they are shorter?
on !*:JOIN:#Santharia:{ describe # watches as $nick makes their way into the channel. 4"Welcome to the elusive channel # $+ , $nick $+ ." }
on !*:PART:#Santharia:{ describe # watches as $nick leaves the channel. 7"Why they leave? If they wanted to quit why didn't they just quit instead of leaving the channel first then quiting." Gararion just doesn't understand why people can't make things simple for themselves. }
on *:QUIT:{ if ( $nick ison #Santharia ) { describe #Santharia watches as someone leaves the channel. 4"Ready to talk behind $nick $+ 's back?" } }
on !*:JOIN:#greyhawk:{ describe # watches as someone makes their way into the channel. 4"Welcome to the dedicated Dungeons and Dragons channel of # $+ , $nick $+ ." }
on !*:JOIN:#GM_Repo:{ describe # watches as someone makes their way into the channel. 4"Welcome to Friday Night at Repo's which take place in # $+ , $nick $+ ." }
on !*:JOIN:#ooc:{ describe # watches as someone makes their way into the channel. 4"Welcome to OOC: Sit down, shut up...and hold on $nick $+ !" }
on !*:PART:#ooc:{ describe # watches as $nick leaves the channel. 7"Why they leave? If they wanted to quit why didn't they just quit instead of leaving the channel first then quiting." Gararion just doesn't understand why people can't make things simple for themselves. }
on *:QUIT:{ if ( $nick ison #ooc ) { describe #ooc watches as someone leaves the channel. 4"Ready to talk behind $nick $+ 's back?" } }
on !*:JOIN:#klintorth:{ describe # watches as someone makes their way into the channel. 1"Welcome to the friendly and welcoming channel of # $nick $+ ." }
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
*Deleted my last reply* Hrm sorry I had totally missed the point. You can use general targets for your events and use /if to check which channel they're referring to, like this: Edit: since "watches as $nick makes their way into the channel" is always used, there is a better way.[color:green]; Supposing you have only 2 ON JOIN events.
; Instead of...[/color][color:#888888]
on !*:JOIN:#Santharia:{
describe # watches as $nick makes their way into the channel. $&
4"Welcome to the elusive channel # $+ , $nick $+ ."
}
on !*:JOIN:#greyhawk:{
describe # watches as someone makes their way into the channel. $&
4"Welcome to the dedicated Dungeons and Dragons channel of # $+ , $nick $+ ."
}
[/color]
[color:green]; ...You'd use only one event:[/color]
on !*:JOIN:[color:brown]#[/color]:{
[color:red]var %watches = describe # watches as $nick makes their way into the channel.[/color]
[color:brown]if (# == #Santharia) [color:red]%watches[/color][/color] 4"Welcome to the elusive channel # $+ , $nick $+ ."
[color:brown]elseif (# == #greyhawk) [color:red]%watches [/color]$&[/color]
4"Welcome to the dedicated Dungeons and Dragons channel of # $+ , $nick $+ ."
}
[color:green]; Note: actually you don't need to use $&, I just used it so I could break the line,
; otherwise the webboard width would be messed up.[/color] Try to do this with all your available channels and events, it's the same method for all of them.
Last edited by cold; 18/10/03 04:36 AM.
* cold edits his posts 24/7
|
|
|
|
Joined: Sep 2003
Posts: 58
Babel fish
|
Babel fish
Joined: Sep 2003
Posts: 58 |
Try this one :
[color:red]
on !*:join:*: {
if ($chan == #santharia) {
describe # watches as $nick makes their way into the channel. $&
4"Welcome to the elusive channel # $+ , $nick $+ ."
}
elseif ($chan == #grayhawk) {
describe # watches as someone makes their way into the channel. $&
4"Welcome to the dedicated Dungeons and Dragons channel of # $+ , $nick $+ ."
}
elseif ($chan == #GM_Repo) {
describe # watches as someone makes their way into the channel. $&
4"Welcome to Friday Night at Repo's which take place in # $+ , $nick $+ ."
}
elseif ($chan == #ooc) {
describe # watches as someone makes their way into the channel. $&
4"Welcome to OOC: Sit down, shut up...and hold on $nick $+ !"
}
elseif ($chan == #klintorth) {
describe # watches as someone makes their way into the channel. $&
1"Welcome to the friendly and welcoming channel of # $nick $+ ."
}
} [/color]
Also do this for the "PART" events Grtzzz
*************************** To chat, or not to chat. That's the question
|
|
|
|
Joined: Dec 2002
Posts: 1,544
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,544 |
Then of course there's always this (yes I realize the greetings arent 100% identical):
on !*:join:*: {
describe # watches as $nick makes their way into the channel.
if ($chan == #santharia) { //msg # 4"Welcome to the elusive channel # $+ , $nick $+ ." }
elseif ($chan == #grayhawk) { //msg # 4"Welcome to the dedicated Dungeons and Dragons channel of # $+ , $nick $+ ." }
elseif ($chan == #GM_Repo) { //msg # 4"Welcome to Friday Night at Repo's which take place in # $+ , $nick $+ ." }
elseif ($chan == #ooc) { //msg # 4"Welcome to OOC: Sit down, shut up...and hold on $nick $+ !" }
elseif ($chan == #klintorth) { //msg # 1"Welcome to the friendly and welcoming channel of # $nick $+ ." }
}
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Sep 2003
Posts: 58
Babel fish
|
Babel fish
Joined: Sep 2003
Posts: 58 |
But if you do it like that, than the first part of the message wil be shown in any channel that someone joins... And i think he means only the channels he mentioned..
That's why i didn't do it like you did... I thought about it do...
Grtzzz
*************************** To chat, or not to chat. That's the question
|
|
|
|
Joined: Dec 2002
Posts: 1,544
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,544 |
very true - however a simple change to get around that would be to put the channel names they wanted it to fire in on the eventline so instaed of * it would read #chan1,#chan2, etc
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
That's exactly what the solution I posted does, anyway.
Edit: Actually $nick is only used in the first one (I've missed that), which would easily be solved being replaced (in %watches) by $iif(# == #santharia,$nick,someone)
Last edited by cold; 20/10/03 03:08 PM.
* cold edits his posts 24/7
|
|
|
|
|
|