-:- Setgreet -:-

By F R E E Z E on Jun 24, 2007

A setgreet script using variables :D

!Setgreet [GREET]
!Viewgreet
!Delgreet

;:::::::::::::::::::::::::::
;::::::SetGreet Script::::::
;:::::::F R R E E Z E:::::::
;::::::irc.swiftirc.net:::::
;:::::::::::::::::::::::::::
on *:TEXT:!Setgreet*:#: {
  set %greet [ $+ [ $nick ] ] $2-
  notice $nick Your greet is now: $2-
}
on *:TEXT:!Viewgreet*:#: {
  if (%greet [ $+ [ $nick ] ] == $null) notice $nick You haven't got a greet set! Type !Setgreet [GREET] to set it!
  else notice $nick Your current greet is: %greet [ $+ [ $nick ] ]
}
on *:TEXT:!Delgreet:#: {
  if (%greet [ $+ [ $nick ] ] == $null) notice $nick You can't delete your greet! You don't even have one!
  else unset %greet [ $+ [ $nick ] ]
  notice $nick You greet has been deleted!
}
on *:JOIN:#: {
  if (%greet [ $+ [ $nick ] ] == $null) notice $nick You don't have a greet set! Type !Setgreet [GREET] to set one!
  else msg $chan [ $+ $nick $+ ] %greet [ $+ [ $nick ] ]
}

Comments

Sign in to comment.
A Lot of Numbers   -  Nov 28, 2007

I Got An Error Msg:
/msg: insufficient parameters (line 21, Join)

 Respond  
zad0909   -  Aug 23, 2007

I keep getting this error message.

  • /msg: insufficient parameters (line 16, script19.ini)
  • /msg: insufficient parameters (line 17, script19.ini)

I have copy pasted the code exactly as you have it.

whats wrong?

 Respond  
`AlphA^   -  Jun 25, 2007

yeh i was thinking that, its setting s greet message but will never actually greet them as they join becuase there is a on JOIN :P

 Respond  
Olliegod   -  Jun 24, 2007

Maybe you should add an on join event, so the greets could actually \"greet\" them.

 Respond  
`AlphA^   -  Jun 24, 2007

i made one of these a while back, if i was you id use $address in stead of $nick becuase people will change thier nicks and not thier adresses :)

other than that n1

 Respond  
Lindrian   -  Jun 24, 2007

Also, whats the point of:
on :TEXT:!Viewgreet:#: {

(The * at !viewgreet) when it only checks for $nick? it doesnt check for $2.

You could advance and do;

on *:TEXT:!Viewgreet*:#: {
var %nick = $iif($2,$2,$nick)
  if (%greet [ $+ [ %nick ] ] == $null) .notice $nick $iif(%nick != $me,%nick,You) haven\'t got a greet set! Type !Setgreet [GREET] to set it!
  else .notice $nick $iif(%nick != $nick,%nick $+ \'s,Your) current greet is: %greet [ $+ [ %nick ] ]
}

For example...

 Respond  
F R E E Z E   -  Jun 24, 2007

Thanks Lindrian. Fixed.

 Respond  
Lindrian   -  Jun 24, 2007

if (%greet [ $+ [ $nick ] ] == $null) You haven\'t got a greet set! Type !Setgreet [GREET] to set it!

You forgot to \"msg/notice\" before the message.
Same with !delgreet

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.