• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Topic Options
Rate This Topic
#5862 - 10/03/09 12:02 AM Triggers v2
Freelancer Offline
newbie

Registered: 12/20/08
Posts: 44
Loc: USA
Multi-chan/network trigger script.

Code:
on *:TEXT:!*:*: {
  if ($nick isop $chan) {
    if ($1 == !add) {
      set %temp_commands [ %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] ]
      unset %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ]
      set %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] [ %temp_commands ] $2
      unset %temp_commands
      set %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ] $3-
      /notice $nick Command added successfully.
    }
    if ($1 == !append) {
      if (%command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ]) {
        set %temp_command [ %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ] ]
        unset %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ]
        set %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ] [ %temp_command ] $3-
        unset %temp_command
        /notice $nick Command appended successfully.
      }
    else {
      .notice $nick Cannot append $2 $+ . $2 doesn't exist!
    }
  }
   if ($1 == !del) {
     if (%command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ]) {
       set %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] ] $remove(%commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] ],$2)
       unset %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $2 ] ]
       .notice $nick Command deleted successfully.
     }
     else { .notice $nick Can't remove $2 $+ . $2 doesn't exist! }
   }
   if ($1 == !list) {
     notice $nick %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ] ]
   }
 }
  if ($1 isin %commands_ [ $+ [ $network ] $+ _ $+ [ $chan ]) {
    /notice $nick %command_ [ $+ [ $network ] $+ _ $+ [ $chan ] $+ _ $+ [ $1 ] ]
  }
}

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top


Moderator:  Jeff, mandy, usrbingeek