This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

no response, i don't understand

Old posts that have not been replied to for several years.
Locked
User avatar
bruhv
Voice
Posts: 22
Joined: Sat Apr 10, 2004 5:53 pm

no response, i don't understand

Post by bruhv »

ok, it's a little lame, but in my mind it should work fine...

Code: Select all

bind pubm -|- "i love you too" loveu_reply
proc loveu_reply {nick uhost handle chan text} {
   putserv "PRIVMSG $chan :\001ACTION \00304blushes\003\001"
   putserv "PRIVMSG $chan :\00310stop it!\003"
 }
i type in channel 'i love you too'
i get nothing from the bot, and no errors in dcc chat

all my other scripts work fine, i don't understand what i've done wrong :(
M
Monty_
Voice
Posts: 23
Joined: Wed May 19, 2004 11:51 pm

Post by Monty_ »

Seems like it should work fine, although I'm no expert. I do question a few things though. Do I understand it that you want that action on a private message? I thought that's what binding it to "pubm" did. Also, in the second line, what does \00310 mean?

Monty
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

If you just want the bot to respond to certain text popped into the channel something like this would work:

set iwant "*i want * bot*"

bind pubm - * checktext

proc checktext {nick uhost hand chan text} {
if {[string match $::iwant [string tolower $text]]} {
putchan $chan "No you can't!"
}
}

:)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
M
Monty_
Voice
Posts: 23
Joined: Wed May 19, 2004 11:51 pm

Post by Monty_ »

Right. That's what I figured. Double check that "pubm" bind and see if that shouldn't be a straight "pub".

Monty
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

if you check tcl-commands.doc like you should have in the beginning, you would see that a pubm binding is matched against the channel name, followed by the text... you did not specify a channel pattern in your pubm binding...
User avatar
bruhv
Voice
Posts: 22
Joined: Sat Apr 10, 2004 5:53 pm

Post by bruhv »

strikelight, sorry, i must be quite stupid, because i don't see what you mean. i just edited part of a different script, have done so before, and it's the same, so i thought it should have worked. and i have checked the tcl-commands.doc, alas the info there is very thin, and as someone else has put it, if you don't know what you're doing the docs aren't much help

myself, i prefer to learn by example, find a script that works, play with it for my own use, and write myself when i think i understand it. i rewrote what i have here, by studying another tcl, and now have it binded to "i" with different results for "i love you" "i hate you" etc

here's what i now have, works like a charm :)

Code: Select all

bind pub -|- i loveu_reply
proc loveu_reply {nick host hand chan text} {
		if {$text == "love you"} {
		putquick "PRIVMSG $chan :\00304don't be gay\003"
	} elseif {$text == "love you too"} {
		putquick "PRIVMSG $chan :\001ACTION \00304blushes\003\001"
		putserv "PRIVMSG $chan :\00310stop it, you're embarrassing me\003"
	} elseif {$text == "feel sick"} {
		putserv "PRIVMSG $chan :\00310you are sick!\003"
	} elseif {$text == "don't know"} {
		putserv "PRIVMSG $chan :\00310that figures\003"
	} elseif {$text == "can't"} {
		putserv "PRIVMSG $chan :\00310yes, you can!\003"
	} elseif {$text == "want sex"} {
		putserv "PRIVMSG $chan :\00310ROFLOLOLOFRFROFLOL\003"
	} elseif {$text == "hate you"} {
		putserv "PRIVMSG $chan :\00310well you don't exactly turn me on either!\003"
		}
}

Monty: '\00310 text \003' makes the text mirc colour 10, which for me is pale blue, every script i use is the same colour
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

bruhv wrote:strikelight, sorry, i must be quite stupid, because i don't see what you mean. i just edited part of a different script, have done so before, and it's the same, so i thought it should have worked. and i have checked the tcl-commands.doc, alas the info there is very thin, and as someone else has put it, if you don't know what you're doing the docs aren't much help
It says that the trigger is matched against the channel followed by the text... you had as the match trigger:

"i love you"

when it should have been "#channel i love you"...
Making it more generic, would be: "% i love you"

Was quite clear in tcl-commands.doc...
Locked