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.

Sex Dice (Current Version: 1.3b MultiLanguage by CrazyCat)

Support & discussion of released scripts, and announcements of new releases.
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Sex Dice (Current Version: 1.3b MultiLanguage by CrazyCat)

Post by BeBoo »

Code: Select all

#---------------------------------------------------------------------#
# TechJoose:SexDice                                             v1.3b #
#                                                                     #
# Rolls the sex dice on a random or chosen person                     #
#                                                                     #
# Usage:                                                              #
#   .chanset <chan> +games                                            #
#   !sexdice [nick]                                                   #
#                                                                     #
# ChangeLog:                                                          #
#   1.0a - First public alpha release                                 #
#   1.1  - French Translation by CrazyCat                             #
#   1.2  - Added per channel control                                  #
#        - Added excluded users setting                               #
#   1.3b - MultiLanguage by CrazyCat                                  #
#                                                                     #
# TODO:                                                               #
#   - More customization for display of information                   #
#   - Ideas? Email me.                                                #
#                                                                     #
# http://www.techjoose.net                                            #
# macbrando@gmail.com                                                 #
# BeBoo @ irc.techjoose.net / #bar                                    #
#---------------------------------------------------------------------#
I was bored and decided to make a pointless and very simple sex dice game. Please leave any comments or suggestions!

Download 1.2 (English Only): here
Download 1.3b MultiLanguage: here (Thanks to CrazyCat!)
Last edited by BeBoo on Fri Nov 02, 2007 10:40 am, edited 3 times in total.
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Really funny, I'm making a translation of it in french and I'll add two more parameters:
- list of authorized chans (I don't want the script works on all the channel the bot is)
- list of excluded pples (I hate kissing (or more) service'bots) :D

I'll transmit you my modifications.
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

That was actually in my next version... Heh.. Before I released it, I took out the udef of "games." Thanks for the translate!
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Here's my version

So, included the two features I spoke about and I've translated it.

I've reduced the namespace to only one level, but feel free to re-adapt rhe tcl as you made it previously :)

You'll notice I supress the global and use the direct call ($::var).
Z
Zircon
Op
Posts: 191
Joined: Mon Aug 21, 2006 4:22 am
Location: Montreal

Post by Zircon »

Hello CrazyCat and BeBoo

First, thanks BeBoo for this script.

CrazyCat, can you please translate in french OnThisDay.tcl done by BeBoo also ?
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

I think I can, if I'm authorized by BeBoo.
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

I don't see why not but the information is from NY Times so the output will not be in french... If you do translate, please make sure I get credit for creation. Thanks.

Also, I'm gonna tweak your french version of this script a tad and post it up here.
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

CrazyCat wrote:Here's my version

So, included the two features I spoke about and I've translated it.

I've reduced the namespace to only one level, but feel free to re-adapt rhe tcl as you made it previously :)

You'll notice I supress the global and use the direct call ($::var).
I tested your script and got the following error:

Tcl error [sexdice::roll]: invalid command name "filt"

Any ideas?
Z
Zircon
Op
Posts: 191
Joined: Mon Aug 21, 2006 4:22 am
Location: Montreal

Post by Zircon »

hello BeBoo

I tested the french version, and it s working for me, althought the names of the channels have to be in lowercase, otherwise, it doent work. Also, it may be better to turn off the log on the partyline.

By the way, why not be able to turn ON/OFF dynamically in the partyline for authorised channels, like :

.chanset #adult +sexdice
.chanset #religion -sexdice
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

Zircon wrote:hello BeBoo

I tested the french version, and it s working for me, althought the names of the channels have to be in lowercase, otherwise, it doent work. Also, it may be better to turn off the log on the partyline.

By the way, why not be able to turn ON/OFF dynamically in the partyline for authorised channels, like :

.chanset #adult +sexdice
.chanset #religion -sexdice
As stated above, before I released it, i deleted the requirement of having +games on the chan. It would be a lot easier than filtering for chans thru a variable and having to rehash just to add a chan to the list. I am currently working on version 1.1 to be released alongside Cat's french version. I will make the change there.
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

BeBoo wrote: I tested your script and got the following error:
Tcl error [sexdice::roll]: invalid command name "filt"
Any ideas?
I've updated the tcl during the day, peharps the version you DL wasn't the good one.
Try getting the last one and if the error persists, modify the line #84:

Code: Select all

set wb [lsearch [filt $mylist] [filt $exclude]]
may become:

Code: Select all

set wb [lsearch [sexdice::filt $mylist] [sexdice::filt $exclude]]
The other way is to have the filt procedure global (out of the namespace)...
Zircon wrote: By the way, why not be able to turn ON/OFF dynamically in the partyline for authorised channels, like :

.chanset #adult +sexdice
.chanset #religion -sexdice
I was thinking about it too, adding udef flags for authorized channels and for forbidden users.
I'll wait for the next version from BeBoo, it'll be a collaborative work :)
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

New version is available (1.2). Change log and download links can be found in the first post!

Thanks for your help thusfar, CrazyCat!
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

you're welcome...
btw, I'll do the 1.3 version wich might really interest both of us: multilanguage version (dynamically setted).

I'm affraid I'll have just a few time to work on it, so I think I'll released it on monday, 29th.
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Sorry but creating a multilanguage version is not so simple that I thought.
I've tried different ways:
* adding namespaces in $::sexdice
* adding external namespaces and import them
* ...

The first method was the one I prefered, but it doesn't work:

Code: Select all

namespace eval test {
    namespace eval fr {
        variable dice1 { "first" "second" "third" }
    }
    namespace eval en {
        variable dice1 { "efirst" "esecond" "ethird" }
    }
    set lang "en"
    putlog "test 1: [lindex $test::[subst $lang]::dice1 1]"
    # Tcl error: can't read "test::": no such variable
    putlog "test 2: [lindex [subst $lang]::dice1 0]"
    #  test 2:
}
(comments are output in the console)...

I think I'll use dbfiles to work if there's no internal solution...
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Could tweak it like this:

Code: Select all

namespace eval test {
    namespace eval fr {
        variable dice1 { "first" "second" "third" }
    }
    namespace eval en {
        variable dice1 { "efirst" "esecond" "ethird" }
    }
    set lang "en"
    putlog "test 1: [lindex [set test::[subst $lang]::dice1] 1]"
}
NML_375
Post Reply