Code Examples
The code below is in the remote scripts format. If placed into an alias file, the command names should not be preceded by the word "alias
". Test Comments include the common /* comment */
and ;comment
.
Here is an example of a Hello World alias:
;Defines the alias 'hello' in the remote script ;Note: if this is placed in an alias script, ;the 'alias' part must be removed (result: hello {) ;Usage: /hello alias hello { ;Displays(/echo) 'Hello World!' into the active window(-a) echo -a Hello World! }A remote script to automatically respond to certain text
;Placed in a remote script ;When a user types Hello! in a channel, ;you answer back: Hello, ! on *:TEXT:Hello!:#:{ msg $chan Hello, $nick $+ ! } ;When a user types Hello! in a private message, ;you answer back: Hello, ! on *:TEXT:Hello!:?: { msg $nick Hello, $nick $+ ! } ;Here is a script which automatically give's voice to a user ;who joins a particular channel(The Bot or user should have HOP) on *:JOIN:#?: { mode $chan +v $nick } ;A bad word script on *:Text:die*:#: { .mode $chan +b $nick | .kick $chan $nick dont say that, }Read more about this topic: MIRC Scripting Language
Famous quotes containing the words code and/or examples:
“Motion or change, and identity or rest, are the first and second secrets of nature: Motion and Rest. The whole code of her laws may be written on the thumbnail, or the signet of a ring.”
—Ralph Waldo Emerson (18031882)
“There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.”
—Bernard Mandeville (16701733)