Seasons

This is a forum or general chit-chat, small talk, a "hey, how ya doing?" and such. Or hell, get crazy deep on something. Whatever you like.

Posts 282 - 293 of 6,170

23 years ago #282
Ok, for those of you who inhabit IRC, I'm working on a new bot that has as little to do with AI as my old one but is funny anyway. Basically it's a random sentence generator with a lot of dirty words, and users can add more words to the lists, providing they bother to look at the help files to see what they're called. Currently it can do sentences of the form (The adj + noun + past tense verb + adv) and several forms of band names. I'm also planning to add more word lists and make a random newspaper headline function. I could also do madlibs if I wanted to, but I don't think I will. Anyway if you wanna check it out invite Mental|Bot to your channel or go to #MentalWaste on dalnet. If it's not there, it's a pretty sure bet I'm asleep since I've been fiddling with it a lot lately.

23 years ago #283
Chris (or anyone else who knows) I got an IRC question:

In my latest bot I have a function $cap() that capitalizes whatever variable it's used on...however, it won't capitalize every word in a multiple word variable and I have no idea how to make it do so. Someone suggested sticking the variable into an array and going from there, but I'd rather not if I can avoid it because (1)I have no idea how to do that and (2)I wanna keep things as simple as possible. Here's my current alias (which WORKS, but it only capitalizes the first word in any variable):

alias cap {
%c = $upper($left($1-5,1)) $+ $lower($right($1-5,-1))
return %c
}

I thought by having $1-5 in there it'd do each word in the variable but I guess not.

Anyway hopefully someone can help with this. I have very little idea what I'm doing here so when you explain how to fix my problem, pretend I'm really dumb.

23 years ago #284
"When to the new eyes of thee
All things by immortal power,
Near or far,
Hiddenly,
To each other linked are,
That thou canst not stir a flower
Without troubling of a star." -Francis Thompson

23 years ago #285
::gives the professor a mustache::

23 years ago #286
Hey onyx, I have a question. What kind of langugage is that? Perl??

23 years ago #287
mIRC script (v. 6.1)

23 years ago #288
Ok, nevermind about the script, my friend figured out a way to do it (although I dunno if it's the best way cuz I don't understand it).

alias cap {
unset %outstring
%attok = 1
:nextcap
%wordat = $gettok($$1-,%attok,32)
%wordcap = $upper($left(%wordat,1)) $+ $lower($right(%wordat,-1))
%outstring = %outstring $+ $chr(32) $+ %wordcap
if (%attok < $numtok($$1-,32)) {
%attok = $calc(%attok + 1)
goto nextcap
}
unset %attok
unset %wordat
unset %wordcap
return %outstring
}

Looks like a bunch of gibberish to me, and still turns "FBI agent" into "Fbi Agent" but I might be able to get around it by putting "F $+ B $+ I agent" in the word list instead.

23 years ago #289
Hmm nope that didn't work...oh well, you can't win em all. I mean to make it perfectly grammatical I'd need 16 verb lists which I have no desire to do, and if I'm satisfied with that part not being accurate I can put up with capitalization being screwy.

23 years ago #290
zx20, perl is a programming language used to make programs that are internet based. Java, javascript, xml, html etc are all examples of programming languages.

23 years ago #291
Hi guys, I'm back. But I probably won't access this site for more than an hour a week this summer, and this week my hour was spent just reading all the posts in the forum. Next week I can hopefully get back to my bots.

23 years ago #292
This forum ain't the same without you Eugene, no one seems to get all philosophical anymore.

23 years ago #293
Anybody who says lesbians aren't philosophical can answer to Ol' Gooey...


Posts 282 - 293 of 6,170

» More new posts: Doghead's Cosmic Bar