Author Topic: Auto respond script to set word & few other scripts  (Read 16827 times)

mesiah9992

  • Newbie
  • *
  • Posts: 4
Auto respond script to set word & few other scripts
« on: September 07, 2007, 12:38:00 PM »
Hiya,
I have no clues with scripting  :-D So i've been using mirc scripts in mirc. But I quite like Icechat, so would like to continue using it over mirc. Trouble is no one i know uses icechat, and can write me a script.

After much  annoyance I've gotten an alias done, but an auto-respond to a set word in any channel I'm present in is beyond me/them. Are there places where I can download ready made scripts for Icechat? Is it possible to take a mirc script and use it in Icechat? So far my attempts have been pretty bad.

The scripts I'm looking for is an auto response to a set word (putting in their nickname also) and an away script. Both channel wide, and preferably the away one working over two servers at the same time.

1) response of /me gives (nickname) a lollypop (as a response to the word crying/cries)
2) /me is away doing (response taken from me doing /afk reason here) then also when I come back it says /me was away for X time doing X.

I know this isn't really very intelligent of me, but I have no clue on scripting :s and it's about all I can say.

Thanks for any pointers you can give me!

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Auto respond script to set word & few other scripts
« Reply #1 on: September 07, 2007, 04:49:56 PM »
Basic mirc scripts work fine in IceChat.

Go to the IceChat Editor, and the Scripts tab. There is a menu called Script Events, and the mirc style is IceChat 7 style, and you can select em, which shows examples of the scripts.

Here is a simple one for your cries/crying words. One line for each.

Code: [Select]
on *:TEXT:crying:#channel:/describe $chan hands $nick a lollipop

on *:TEXT:cries:#channel:/describe $chan hands $nick a lollipop


Save it and close, give it a filename, and away you go.

The IceChat God

mesiah9992

  • Newbie
  • *
  • Posts: 4
Re: Auto respond script to set word & few other scripts
« Reply #2 on: September 08, 2007, 12:48:08 AM »
Hiya, thanks for that. For some reason that wont work at all.

Currently I have just got the mirc one going, but it responds to all actions, even if I try to set it to respond to cries.

Code: [Select]
on *:action:*:#: {
  if (cries isin $1-) {
    if (%flood. [ $+ [ $nick ] ] != $nick) {
      describe $chan gives $nick a lollipop - 4strawberry flavoured of course!    Lollipops makes everything good again :)
      set -z40 %flood. [ $+ [ $nick ] ] $nick
    }
  }
}

That works with out any errors, cept the fact that it does it to all actions :s

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Auto respond script to set word & few other scripts
« Reply #3 on: September 08, 2007, 10:44:33 AM »
No, that will not work at all.

Some of those commands and script methods wont work, but the code I wrote will work fine.
If you want more complicated scripts like that, you will need to write it in the VB Scripting (IceChat 5) style.
The mirc script engine in IceChat only handles simpler things.

With the script I posted, you have to change the #channel, which I bet you didnt do.
So the script only works in #channel, if you want it to work in all channels, change it to just #.
The IceChat God

Anime Sucks

  • Newbie
  • *
  • Posts: 5
Re: Auto respond script to set word & few other scripts
« Reply #4 on: November 19, 2007, 05:48:52 PM »
I've been looking for something like this, being I really dont know scripting at all I usually wait for someone to post something.  Darkstar usually helps me on IRC, but I hardly see him anymore.

It seems with this script it will only perform the command if all you type is "cries" or "crying" rather than if someone says /me cries or /me is crying

is there a variable you can add to the script so that is does the command if the word is anywhere in the sentence?

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Auto respond script to set word & few other scripts
« Reply #5 on: November 20, 2007, 05:29:47 PM »
Yes, change cries to *cries* , putting the * in front and in back, will make it work anywhere.
You would do the same thing for crying.

Code: [Select]
on *:TEXT:*cries*:#channel:/describe $chan hands $nick a lollipop
The IceChat God

Anime Sucks

  • Newbie
  • *
  • Posts: 5
Re: Auto respond script to set word & few other scripts
« Reply #6 on: November 21, 2007, 04:16:29 PM »
Yes, change cries to *cries* , putting the * in front and in back, will make it work anywhere.
You would do the same thing for crying.

Code: [Select]
on *:TEXT:*cries*:#channel:/describe $chan hands $nick a lollipop

I always seem to skip over the most obvious results.  :D

okay.. another question

Code: [Select]
on *:TEXT:*boob*:#:/say 4BOOBS 7BOOBS 8BOOBS 9BOOBS 17BOOBS 61BOOBS 64BOOBS

on *:TEXT:*peg on my nose*:#:/say That not a peg, thats a poop nugget

on *:TEXT:*moo*:#:/say 4Moooooooo7OOOOOOOOO8ooooooo9OOOOOOO17ooooooo61OOOOO64ooooooo

I run in multiple chats, but it only seems to do the autorespond on the top window that I'm looking at.  is there a way to get it to display in any channel regardless of if i'm looking at it or not?

Also another one I wanted to do was
Code: [Select]
on *:TEXT:*:o*:#:/say BJFACE!

but I'm thinking the colon is messing it up for the emoticon.  any way round that?

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Auto respond script to set word & few other scripts
« Reply #7 on: November 21, 2007, 08:58:54 PM »
Do you see how I used /describe to do a /me command in a specific channel?

Well, you shouldnt use /say, as thats for the current channel, use /msg $chan , which will message to that channel the scriopt fired in.

And yes, you have too many colons, so that will simply not workl.
The IceChat God