Communauté Eggdrop

Version complète : probleme sur Coquins v1.3
Vous consultez actuellement la version basse qualité d’un document. Voir la version complète avec le bon formatage.

KinG

j'ai installé le tcl script sur mon eggdrop quand je le lance
il marche normal mais quand je tape la commande !descoquins pseudo
ça me donne cette erreur suivante :
[02:56] Tcl error [sexdice::roll]: can't read "trans(msg_no_chan)": no such element in array


voila le code que j'ai mis sur mon script
tcl
#
# Dés coquins version 1.3
#
# multilingual version of sexdices
#
# Author: CrazyCat <crazycat@c-p-f.org>
# http://www.eggdrop.fr
# irc.zeolia.net #c-p-f
#
# Rolls the dices on a random or chosen person
#
# Usage:
#   !descoquins [nick]
#  - Console:
#   .chanset #channel +sexdice => (dis/en)able sexdices on #channel
#   .chanset #sexe +sexdice
#	.chanset #chat-love -sexdice
#   .chanset #sexe dicelang en => sets the language (default: fr, available: en)
#
# ChangeLog:
#   1.3 - multilingual version
#   1.2 - adding dynamic channels (Beboo did it)
#   1.1 - French translation
#       - adding Authorized channels list
#       - adding Excluded people
#   1.0a - First public alpha release
#
# TODO:
#   - More customization for display of information
#   - Ideas? Email me.
#

#
# SETTINGS
#
namespace eval sexdice {
    # Set this to the command character you want to use for the binds.
    # Only use one command character. (Default "!")
    variable command_char "!"
    
    # Set this to your preferred binds separated by spaces. i.e. "one two"
    # (Default "sexdice")
    variable binds "descoquins"
    
    # Set this to the list of excluded nicks separated by spaces. The
    # people listed in won't be choose in random "victims"
    variable novictim "Service"
    
    #---------------------------------------------------------------------#
    #                    ***End of Settings ***                           #
    #   Do not edit below this line unless you know what you are doing!   #
    #---------------------------------------------------------------------#
    variable version "CrazyCat:descoquins-1.3"
    variable versionNum "1.3"
    variable versionName "\002\00305\[\003\00312DES COQUINS\003\00305\]\002\003"
}

# Note about the strings: you can use 5 parameters:
# %c is the current channel
# %n is the nick of the player
# %v is the "victim"
# %d1 is the result of the first dice
# %2 is the result of the second dice
 
set sdLang(en) {
    dice1 {
        "kiss"
        "fondle"
        "lick"
        "suck"
        "touch"
        "nibble"
        "play with"
        "tickle"
        "do anything you want to"
        "do anything you want to"
    }
    dice2 {
        "eyes"
        "ear"
        "ears"
        "nose"
        "lips"
        "neck"
        "chest"
        "nipple"
        "nipples"
        "shoulder"
        "elbow"
        "hand"
        "fingers"
        "stomach"
        "crotch"
        "ass"
        "butt"
        "leg"
        "legs"
        "knee"
        "knees"
        "foot"
        "feet"
        "toe"
        "toes"
        "free"
    }
    msg_nochan "\002%c\002 is not an authorized channel"
    msg_notonchan "Sorry %n, %v is not on the channel"
    msg_nogamealone "You can't roll dices for you, %n! It's not funny."
    msg_alone "Well %n, noone is here to play with you! :("
    msg_roll "%n rolls the dices"
    msg_res_anywhere "%n, you have to %d1 %v anywhere you want!"
    msg_res_placed "%n, you have to %d1 %v on the %d2!"
}
set sdLang(fr) {
    dice1 {
        "embrasser"
        "caresser"
        "lécher"
        "sucer"
        "toucher"
        "mordiller"
        "jouer avec"
        "chatouiller"
        "faire ce que tu veux à"
    }
    dice2 {
        "les lèvres"
        "le cou"
        "la poitrine"
        "l'oreille"
        "free"
        "free"
        "le sein"
        "l'orteil"
        "la fesse"
        "l'entrejambe"
        "les doigts"
    }
    msg_nochan "\002%c\002 n'est pas un canal autorisé"
    msg_notonchan "Désolé %n, %v n'est pas sur le canal"
    msg_nogamealone "Vous ne pouvez pas lancer les dés pour vous, %n! Ce n'est pas amusant."
    msg_alone "Bon %n, il n'y a personne pour jouer! :("
    msg_roll "%n lance les dés"
    msg_res_anywhere "%n, tu dois %d1 %v où tu veux!"
    msg_res_placed "%n, tu dois %d1 %v sur %d2!"
}

# bind the public bind
foreach bind [split $sexdice::binds " "] {
    bind pub -|- "${sexdice::command_char}$bind" sexdice::roll
}
 
setudef flag sexdice
setudef str dicelang
 
namespace eval sexdice {
    proc filt {data} {
        regsub -all -- \\\\ $data \\\\\\\\ data
        regsub -all -- \\\[ $data \\\\\[ data
        regsub -all -- \\\] $data \\\\\] data
        regsub -all -- \\\} $data \\\\\} data
        regsub -all -- \\\{ $data \\\\\{ data
        regsub -all -- \\\" $data \\\\\" data
        return $data
    }
 
    proc replace {msg chan nick} {
        regsub -all %n $msg $nick msg
        regsub -all %c $msg $chan msg
        regsub -all %v $msg $sexdice::victim msg
        regsub -all %d1 $msg $sexdice::choice1 msg
        regsub -all %d2 $msg $sexdice::choice2 msg
        return $msg
    }
 
    proc roll {nick uhost handle chan args} {
        variable novictim
        variable victim ""
        variable choice1 ""
        variable choice2 ""
 
        if {[lsearch -exact [channel info $chan] +sexdice] == -1} {
            array set trans $::sdLang(fr)
            putserv "PRIVMSG $chan :$trans(msg_no_chan)"
            return
        }
 
        if {[channel get $chan dicelang]==""} {
            channel set $chan dicelang "fr"
            set lang "fr"
        } else  {
            set lang [channel get $chan dicelang]
        }
        array set trans $::sdLang($lang)
 
        set mylist [chanlist $chan]
 
        # Create the temporary exclude list: bot, player and exluded pple
        set exclist [split "$::botnick $nick $novictim"]
 
        foreach exclude [split $exclist] {
            set wb [lsearch [filt $mylist] [filt $exclude]]
            set mylist [lreplace $mylist $wb $wb]
 
        }
 
        # Check to see if they specified someone
        if {[lindex $args 0] != ""} {
            set victim [lindex $args 0]
            # Check to see if the nick is on the channel
            if {![onchan $victim $chan]} {
                putserv "PRIVMSG $chan :$versionName [replace $trans(msg_notonchan) $chan $nick]"
                return
            } else {
                if {$victim == $nick } {putserv "PRIVMSG $chan :$sexdice::versionName [replace $trans(msg_nogamealone) $chan $nick]";return}
                set result [lindex $args 0]
            }
        } else {
            #Choose someone randomly
            set mylength [llength $mylist]
            if {$mylength == 0} {
                putserv "PRIVMSG $chan :[replace $trans(msg_alone) $chan $nick]"
                return
            }
            set myindex [rand $mylength]
            set victim [lindex $mylist $myindex]
        }
 
 
        putserv "PRIVMSG $chan :$sexdice::versionName [replace $trans(msg_roll) $chan $nick]"
        set choice1 [lindex $trans(dice1) [rand [llength $trans(dice1)]]]
        set choice2 [lindex $trans(dice2) [rand [llength $trans(dice2)]]]
        if {$choice2 == "free" } {
            putserv "PRIVMSG $chan :$sexdice::versionName [replace $trans(msg_res_anywhere) $chan $nick]"
        } else {
            putserv "PRIVMSG $chan :$sexdice::versionName [replace $trans(msg_res_placed) $chan $nick]"
        }
    }
}
 
putlog " - DES COQUINS version $sexdice::versionNum loaded."




pouvez-vous m'aidez svp
As-tu configuré le canal comme il faut ? En parti-lyne:
Code :
.chanset #canal +sexdice
.chanset #canal dicelang fr
La deuxième ligne est optionnelle, le français étant la langue par défaut

KinG

merci Crazychat pour ta reponse je doit configuré quoi sur la party line
? est pour le "#" eu debut je doit le laissé ou j'enleve ex :

# .chanset #canal +sexdice
# .chanset #canal dicelang fr
CrazyCat a écrit :As-tu configuré le canal comme il faut ? En parti-lyne:
Code :
.chanset #canal +sexdice
.chanset #canal dicelang fr
La deuxième ligne est optionnelle, le français étant la langue par défaut

Les deux lignes que je t'ai donné sont celles à taper en party-line (sans oublier le "." du début).
Tu dois juste remplacer "canal" par le nom de ton canal.

Par exemple, si c'est pour le canal #test, tu tapes:
Code :
.chanset #test +sexdice