mIRC Home    About    Download    Register    News    Help

Print Thread
Auto Reply #53999 12/10/03 07:26 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
I am working on a script that replies to a friends scripts automatically. I am working with the following script:

on *:ACTION:*:#:{
if (*flamethrower* iswm $1- || *barbeques* iswm $1- || *Gar* iswn $1- || *Gararion* $1-) {
describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before Bahran gets a chance to grab it and sits back to watch the show.
}
}

What is is reply to is:

* Bahran takes out a flamethrower and barbeques gar then takes a piece of their crispy arm and chews on it...

It works yes but if he does this script to someone else it replies as well. For examples if he does:

* Bahran takes out a flamethrower and barbeques himself then takes a piece of their crispy arm and chews on it...

it replies as well, which is useless cause the my script is only meant to happen when he does it to me. What would I need to change to make it only reply when he does it to me?

Re: Auto Reply #54000 12/10/03 08:00 PM
Joined: Sep 2003
Posts: 8
M
mancontr Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Sep 2003
Posts: 8
This should work:
Code:
on *:ACTION:*:#:{
if ($(takes out a flamethrower and barbeques $me then takes a piece of their crispy arm and chews on it...) == $1-) {
describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show.
}
}

Re: Auto Reply #54001 12/10/03 08:06 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
so I would have to put the entire saying in, there is now way of shortening it?

Re: Auto Reply #54002 12/10/03 08:11 PM
Joined: Sep 2003
Posts: 8
M
mancontr Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Sep 2003
Posts: 8
Yes, you can... something like:
Code:
on *:ACTION:*:#:{
if ($4 == flamethrower) && ($6 == barbeques) && ($7 == $me) {
describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show.
}
}


or if you want... just add to your code the "($7 == $me)" smile

Re: Auto Reply #54003 12/10/03 08:28 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
okay I tried that one but I got this message in my status window:

* /if: 'iswn' unknown operator (line 113, script.ini)

What does that mean?

Re: Auto Reply #54004 12/10/03 08:42 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
nvm figured it out smile

One more question, the script:
on *:ACTION:*:#:{
if ($4 == flamethrower) && ($6 == barbeques) && ($7 == Gar) {
describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show.
}
}


is there a way to do add a or line in the if line? for example:

if ($4 == flamethrower) && ($6 == barbeques) && ($7 == Gar) or ($8 == flamethrower) && ($9 == barbeques) && ($10 == Gararion){
describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show.
}
}

Re: Auto Reply #54005 12/10/03 09:13 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
is there a way of edited the scipt:

on *:ACTION:*#:{
if ($4 == flamethrower) && ($6 == barbeques) && ($7 == Gar) {
describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show.
}
}

so it would have do multiple things like this:

on *:ACTION:*:#:{
if ($4 == flamethrower) && ($6 == barbeques) && ($7 == Gar) { describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show. }
elseif ($4 == annihilates) && ($6 == barrage) && ($7 == Gar) { describe # -=[counter coming soon]=- }
elseif ($4 == smashes) && ($6 == revenge) && ($7 == Gar) { describe # smiles at the thought of the look on Bahran's face when he notices the insane asylum is located on a now deserted island surronded by shark infested waters, offering no form of escape. }
}

Re: Auto Reply #54006 12/10/03 09:15 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
that works..(or should do)


new username: tidy_trax
Re: Auto Reply #54007 12/10/03 09:40 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
it didn't, only the first one did. the others wouldn't work. I will try again.

Also "describe" does the /me, what does /say?

Re: Auto Reply #54008 12/10/03 09:58 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
/describe = /me
/ame = /me to all channels
/say = /msg
/amsg = /say to all channels


new username: tidy_trax
Re: Auto Reply #54009 12/10/03 10:09 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
So in(part of script I am workign with):

{ describe # -=[counter coming soon]=- }

which should do: /me -=[counter coming soon]=-

I could just edit it like:

{ say # -=[counter coming soon]=- }

to make it do this in the proper channel: <Gar> -=[counter coming soon]=-

Last edited by Gar; 12/10/03 10:11 PM.
Re: Auto Reply #54010 12/10/03 10:10 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
/say or /msg #


new username: tidy_trax
Re: Auto Reply #54011 12/10/03 10:11 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
okay

Re: Auto Reply #54012 12/10/03 10:22 PM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
so this should work then:

on *:ACTION:*#:{
if ($4 == flamethrower) && ($6 == barbeques) && ($7 == Gar) {
msg # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show.
}
}

or do I need to put the "/" before the "msg #"?

The original code was on
*:ACTION:*#:{
if ($4 == flamethrower) && ($6 == barbeques) && ($7 == Gar) {
describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show.
}
}

Re: Auto Reply #54013 12/10/03 10:26 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
you only need / if your typing it in the edit box, so msg # will be fine.


new username: tidy_trax
Re: Auto Reply #54014 13/10/03 12:10 AM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
okay why wont this script work?

on *:ACTION:*:#:{
if ($4 == flamethrower) && ($6 == barbeques) && ($7 == Gar) { describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show. }
elseif ($4 == howitzers) && ($6 == Paladin) && ($7 == Gar) { msg # -=[counter coming soon]=- }
elseif ($4 == smashes) && ($6 == revenge) && ($7 == Gar) { describe # smiles at the thought of the look on Bahran's face when he notices the insane asylum is located on a now deserted island surronded by shark infested waters, offering no form of escape. }
}


the first one works, the if, but none of the elseif works. frown

Re: Auto Reply #54015 13/10/03 08:04 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
the elseif's will only be executed if the (condition) is $true, but also only if the condition of the if (..) was $false


new username: tidy_trax
Re: Auto Reply #54016 13/10/03 10:28 AM
Joined: Mar 2003
Posts: 1,271
L
LocutusofBorg Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
I copied your code into my remote, tested it and it works fine.

I tested it by sending the following three lines to the channel:

/describe #channel one two three flamethrower five barbeques Gar
/describe #channel one two three howitzers five Paladin Gar
/describe #channel one two three smashes five revenge Gar

channel output:

[12:28] * HCBT one two three flamethrower five barbeques Gar
[12:28] * @[Bot]of[Borg] sprinkles the hotest mixture of ingredents known to mankind on his arm before HCBT gets a chance to grab it and sits back to watch the show.
[12:29] * HCBT one two three howitzers five Paladin Gar
[12:29] <@[Bot]of[Borg]> -=[counter coming soon]=-
[12:29] * HCBT one two three smashes five revenge Gar
[12:29] * @[Bot]of[Borg] smiles at the thought of the look on Bahran's face when he notices the insane asylum is located on a now deserted island surronded by shark infested waters, offering no form of escape.

If the code doesn't work for you, there's another problem, it has nothin to do with the code you pasted here.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Re: Auto Reply #54017 13/10/03 01:15 PM
Joined: Sep 2003
Posts: 8
M
mancontr Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Sep 2003
Posts: 8
Try grouping with ()... something like:

Code:
on *:ACTION:*:#:{
if (($4 == flamethrower) &amp;&amp; ($6 == barbeques) &amp;&amp; ($7 == Gar)) { 
describe # sprinkles the hotest mixture of ingredents known to mankind on his arm before $nick gets a chance to grab it and sits back to watch the show.
}
elseif (($4 == howitzers) &amp;&amp; ($6 == Paladin) &amp;&amp; ($7 == Gar)) {
msg # -=[counter coming soon]=-
}
elseif (($4 == smashes) &amp;&amp; ($6 == revenge) &amp;&amp; ($7 == Gar)) {
describe # smiles at the thought of the look on Bahran's face when he notices the insane asylum is located on a now deserted island surronded by shark infested waters, offering no form of escape.
}
}


That's because in multiple if's, the "else" only executes if last comparation is false... then, if you group all in one, should work... i supose wink (sorry for my english)

Edit: you can replace "Gar" with $me... and if you start with:
if ($7 != $me) { return }
then you can delete the ($7 == $me) of every if... smirk

Last edited by mancontr; 13/10/03 01:19 PM.