05/11/2007, 15:14 (Modification du message : 30/05/2009, 13:37 par MenzAgitat.)
Attention! il s'agit d'un script "adulte"
Ce tcl est la version multilangue (français et anglais actuellement) de sexdice.tcl par beboo.
Configuration
tcl
# Préfixe de la commande (! par défaut)variable command_char "!"
# Commandes à utiliser (séparées par des espaces)variable binds "descoquins"
# Liste des nicks "non-joueurs"variable novictim "Service"
Utilisation
Ajouter/supprimer un canal autorisé: .chanset #canal +/- sexdice
Choisir la langue du jeu sur un canal: .chanset #canal dicelang <en|fr>
Salut, j'ai telecharger Des Coquins v1.3 et quand quelqu'un sur le chan fait !descoquins unnick et bien ca fait une erreur dans le dcc chat:
Tcl error [sexdice::roll]: can't read "versionName": no such variable
Si moi (le egg est à moi) je fait !descoquins unnick tout marche #1, si quelqu'un fait !descoquins monnick tout marche #1 mais quand quelqu'un fait !descoquins un_nick_autre_que_le_mien et bien ca fait l'erreur cité plus haut. Je crois que je dois vous copier le tcl ici, donc voila et merci d'avance pour votre aide :)
Code PHP :
# # 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 #channel dicelang en => sets the language (default: en, available: fr) # # 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 }
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] }
Le scripte ne semble pas 'connaitre' tous les users d'un canal, exemple :
[Sat@14:15:54] <@Gala> !descoquins Ghost
[Sat@14:15:55] <BoT-CorP> [DES COQUINS] Désolé Gala, Ghost n'est pas sur le canal
alors que d'autres sont connus... ce comportement semble être 'random'
Une idée ?
P.S : aucune modification n'a été faite au script hormis l'ajout de la commande !dc, proposé par CrazyCat. Version 1.3.1
Bonjour et désolé pour la réponse tardive, j'étais absent et loin de toute connexion internet.
La seule possibilité que je vois comme ça, c'est que le nick ne soit pas exacte, par exemple que ce soit en fait Gh0st avec un "0" (zéro) et pas un "o" qui est sur le canal.
Sinon, comme la casse n'intervient pas dans le onchan, pas d'idée. Et le système de vérification est tellement simple qu'une erreur aléatoire est assez dure à imaginer.
Est-ce que tu arrives à reproduire ce bug avec d'autres nicks ?