mIRC Home    About    Download    Register    News    Help

Print Thread
#11081 14/02/03 08:00 PM
Joined: Feb 2003
Posts: 15
J
jlb00h Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Feb 2003
Posts: 15
how do i get it to start? i dont have to do i?
i made remotes to respond when someone types one of the following messages:

on 1:text:*To which plant family (stricly genus) do jonquils and daffodils belong?*:#:/msg $chan narcissus
on 1:text:*Category: Food: Mexican dish with minced*:#:/msg $chan tamale


but nothing happens... no responses frown

Joined: Feb 2003
Posts: 15
J
jlb00h Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Feb 2003
Posts: 15
do you all need more info?
like that im running mIRC 6.03 and stuff?
i dont hafta be afk...

Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
on 1:text:*To which plant family $chr(040) $+ stricly genus $+ $chr(041) do jonquils and daffodils belong?*:#:say narcissus

By the way, this is bad sportsmanship. You should answer trivia questions manually instead of using a bot to do it. :tongue:

Joined: Feb 2003
Posts: 15
J
jlb00h Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Feb 2003
Posts: 15
no i mean, nothing happens AT ALL
this was just an excerpt of the full script...nothing ever happens



menu channel {
Moo
.happily:/describe # moos happily
.woefully:/describe # moos woefully
.philosophically:/describe # MUs
.colorfully:/describe # moos in several hues
}

;These add aliases for shortcuts to often used messages

alias how /msg $1 How now brown cow?
alias moo /sound moo.wav moooos

;This adds a ctcp command which reacts to a moo ctcp from someone

ctcp 1:moo:*:/notice $nick Sorry, I'm all out of moos right now.

;These add events which react to specific words said on a channel

on 1:text:*To which plant family (stricly genus) do jonquils and daffodils belong?*:#:/msg $chan narcissus

on 1:text:*Category: Food: Mexican dish with minced*:#:/msg $chan tamale

;These add join and part events which react to a user joining/parting
;the channel #moo

on 1:join:#moo:{
/msg $nick Welcome $nick to channel #moo!
/msg $nick This is a herd-oriented channel, there are calfs present!
/msg $nick Please refrain from profaine mooing and/or bleating
/msg $nick Mammals enaging in such acts will be promptly demooted
}

on 1:part:#moo:/msg $nick Thanks for grazing with us on #moo!

;The following line is processed while you're doing a channels list. It

;prints to the status window any channel name/topic that has the
;word moo in it

raw 322:*moo*:/echo -s $2-

Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
last time i saw "say" doesn't work in an on text event, needs to be msg #chan/nick in an event.

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
/remote on


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Okay sweet, you have, at least, two ON TEXT events in the same file. You need to either nest them in one event or shift one to another file so there's only one ON TEXT per file.

Joined: Feb 2003
Posts: 15
J
jlb00h Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Feb 2003
Posts: 15
OMG, the last two posts were the most helpful! thanx
but WatchDog, how could i have all those remote-script files running at once on the same chan?
maybe i could just do the nesting idea - got an example or something?
sorry and Thanks Again for helping the n00bs! :tongue:

Joined: Feb 2003
Posts: 15
J
jlb00h Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: Feb 2003
Posts: 15
im guessing nesting is like a procedure(turbo pascal)
or a Sub(visual basic)?
nesting = object oriented programming
? confused

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
A command is an alias that does not return a value that is called by using its name preceeded by a / (or whatever you have set your command character to) and followed by a space and then any parameters you wish to pass into the alias. This is equivalent to a Turbo Pascal Procedure or a Visual Basic Sub. For example:

/MyCommand parameter1 parameter2

An identifier is an alias that does return a value (even if that value is $null) that is called by using its name preceeded by a $ and followed immediately by your parameter list (if any) surrounded by parentheses and directly connected (no spaces between the alias name. This is equivalent to a Turbo Pascal or Visual Basic Function. For example,

var %variable = $MyIdentifier(parameter1, parameter2)

Nesting can be done in many ways using different control structures, such as If-ElseIf-Else, While or Goto. Goto's are not generally considered to be nested, nor would any programmer worth his pay remotely suggest that you use them that way. THAT is what leads to "spaghetti programming," which is difficult to comprehend and is a nightmare to debug/maintain. You might have If statements nested inside other If statements; you might also have nested loops using While.

Another form of nesting is called recursion, where a command or identifier calls itself. mIRC does not directly support recursive routines, though you can fake them with timers as long as you maintain your own "stack" so you unwind it in the correct order and "return control" whence it originated. That makes it "possible," though certainly not a beginner's exercise.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard