Slap Script + SlapBack improvements

Got an idea, suggestion or request for a feature? Tell us!
Post Reply
User avatar
chris1
Administrator
Posts: 2971
Joined: 11.09.2003 20:17
Status: Gamers.IRC Coder

Re: Slap Script + SlapBack improvements

Unread post by chris1 » 04.02.2008 13:29

Danke für deinen Vorschlag. Wir werden dass mal bei Gelegenheit unter die Lupe nehmen. Kann aber nicht versprechen, ob dass (so) eingebaut wird. Falls wir in der Richtung aber was machen, kommt hier nochmal eine Antwort hin.

User avatar
Tuxman
Administrator
Posts: 1829
Joined: 24.10.2003 00:13
Status: That guy
Contact:

Re: Slap Script + SlapBack improvements

Unread post by Tuxman » 04.02.2008 14:07

I think it's better in English... :elk8:

We'll have a look... but we can't promise to use it.
(It's quite much for a slap, I think, but that's only my personal opinion.)
^\__/
..O.o

This is Einkaufswagen. Copy Einkaufswagen into your signature to help him on his way to world domination.

blk_panther
Gamers.IRC Staff
Posts: 231
Joined: 31.12.2005 16:44
Status: Gamers.IRC Coder

Re: Slap Script + SlapBack improvements

Unread post by blk_panther » 28.02.2008 11:54

just use if statements in the on action code like:

Code: Select all

on *:action:*:*:{
    if (word1 isin $1-) { ... }
    elseif (word2 isin $1-) { ... }
}
here an (untested) example code how to:
  • check if someone uses your current nick in an action
  • loop every word and watch if it is in a textfile named your.txt (in $mircdir)
  • give an answer and return

Code: Select all

on *:action:* $($me) *:*:{
    while ($1) {
        if ($read(your.txt,w,* $+ $1 $+ *)) { var %1 = $v1 | msg $iif(#,#,$nick) your answer (with %1 = the found line) | return }
        tokenize 32 $2-
    }
}
note:
  • looping every word with tokenize isn't very effective
  • using filter would be a great idea
  • this is the first code I thought of, and I hope it's the most understandable
  • untested, but I want youto understand the idea, not write code for you (because I don't know what exactly you want)
  • you can't use $v1 directly in the msg because the $iif() replaces it with # before
  • if you don't understand a command use /help /command
  • if you don't understand the code: write what exactly remains unclear
  • if you want to archive different -> write exactly what
hope I could help
just $me

User avatar
Tuxman
Administrator
Posts: 1829
Joined: 24.10.2003 00:13
Status: That guy
Contact:

Re: Slap Script + SlapBack improvements

Unread post by Tuxman » 28.08.2010 08:47

This is Gamers.IRC, not INVISION.
^\__/
..O.o

This is Einkaufswagen. Copy Einkaufswagen into your signature to help him on his way to world domination.

User avatar
chris1
Administrator
Posts: 2971
Joined: 11.09.2003 20:17
Status: Gamers.IRC Coder

Re: Slap Script + SlapBack improvements

Unread post by chris1 » 07.11.2010 20:39

The file settings.ini is in every girc installation. Have a look at your installation folder: bin\ini\

User avatar
chris1
Administrator
Posts: 2971
Joined: 11.09.2003 20:17
Status: Gamers.IRC Coder

Re: Slap Script + SlapBack improvements

Unread post by chris1 » 08.11.2010 14:56

Before you start scripting, you should learn how to do it. Have a look at other scripts and ask your friends for help if you don't understand something. There is also a channel called #help.script on the quakenet. (maybe on other networks, too)

But if I don't sit in front of your computer, I won't be able to help you very much. As I don't know what script you are using at the moment and where exactly it is. Scripting does not work like copy&paste. You must understand what the script does.

User avatar
Tuxman
Administrator
Posts: 1829
Joined: 24.10.2003 00:13
Status: That guy
Contact:

Re: Slap Script + SlapBack improvements

Unread post by Tuxman » 08.11.2010 15:04

chris1 wrote:Scripting does not work like copy&paste.
To be more precise: Scripting is copy & paste, but trying to make the script do what you want it to do is more like "try and error" then if you do not understand any MSL.
Use the several help possibilities in order to achieve good results. chris1 told you one way.

:)
^\__/
..O.o

This is Einkaufswagen. Copy Einkaufswagen into your signature to help him on his way to world domination.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest