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.

Uno Script [SOLVED]

Support & discussion of released scripts, and announcements of new releases.
Post Reply
A
Aut0Cr0ss
Voice
Posts: 19
Joined: Fri Jun 15, 2007 9:01 pm

Uno Script [SOLVED]

Post by Aut0Cr0ss »

Code: Select all

#
# Marky's Uno v0.97
# Copyright (C) 2004 Mark A. Day (techwhiz@earthlink.net)
#
# Uno(tm) is Copyright (C) 2001 Mattel, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

# Default settings
set UnoAds		1
set UnoDebug 		0
set UnoChan 		"#madlibs"
set UnoRobot 		$botnick
set UnoPointsName 	"Points"
set UnoStopAfter 	3
set UnoBonus		1000
set UnoWildDrawTwos	0
set UnoCFGFile		"scripts/uno.cfg"
set UnoScoreFile 	"scores/UnoScores"
set UnoMaxNickLen	9
set UnoMaxPlayers	10
set UnoOpFlags		"o|o"
set UnoNTC		"NOTICE"
set UnoVersion 		"0.98"

# Command binds
bind pub - !unocmds UnoCmds
bind pub - !remove UnoRemove
bind pub - !pause UnoPause
bind pub - !unowon UnoWon
bind pub - !unotop10 UnoTopTen
bind pub - !unotop3last UnoTopThreeLast
bind pub - !unostats UnoPlayStats
bind pub - !unorecords UnoRecords
bind pub - !unorow UnoCurrentRow
bind pub - !unoversion UnoVersion
bind pub - !uno UnoInit
bind pub - !stop UnoStop

# DCC commands
bind dcc - unohands dccunohands
bind dcc - unorehash dcc_unorehash

# Monthly score reset
bind time - "00 00 01 * *" UnoNewMonth

# Global variables
set UnoOn 0
set UnoMode 0
set UnoPaused 0
set UnoPlayers 0
set MasterDeck ""
set UnoDeck ""
set DiscardPile ""
set PlayCard ""
set RoundRobin ""
set ThisPlayer ""
set ThisPlayerIDX 0
set UnoStartTime [unixtime]
set IsColorChange 0
set ColorPicker ""
set IsDraw 0
set UnoIDX ""
set UnPlayedRounds 0
set UnoWinDefault 0
set UnoLastWinner ""
set UnoWinsInARow 0

# Scores, records and ads
set UnoLastMonthCards(0) "Nobody 0"
set UnoLastMonthCards(1) "Nobody 0"
set UnoLastMonthCards(2) "Nobody 0"
set UnoLastMonthGames(0) "Nobody 0"
set UnoLastMonthGames(1) "Nobody 0"
set UnoLastMonthGames(2) "Nobody 0"
set UnoFast "Nobody 600"
set UnoHigh "Nobody 0"
set UnoPlayed "Nobody 0"
set UnoRow "Nobody 0"
set UnoRecordHigh "Nobody 0"
set UnoRecordFast "Nobody 600"
set UnoRecordCard "Nobody 0"
set UnoRecordWins "Nobody 0"
set UnoRecordPlayed "Nobody 0"
set UnoRecordRow "Nobody 0"
set UnoAdNumber 0

# Card stats
set CardStats(played) 0
set CardStats(wilds) 0
set CardStats(draws) 0
set CardStats(skips) 0

# Timers
set UnoStartTimer ""
set UnoSkipTimer ""
set UnoCycleTimer ""
set UnoBotTimer ""

# Grace periods and timeouts
# AutoSkipPeriod can be raised but no lower than 2
set AutoSkipPeriod 4
set StartGracePeriod 20
set RobotRestartPeriod 1
set UnoCycleTime 30

# Nick colours
set UnoNickColors "06 13 03 07 12 10 04 11 09 08"

# Cards and logo
set UnoRedCard		"\0030,04 Red "
set UnoGreenCard	"\0030,03 Green "
set UnoBlueCard		"\0030,12 Blue "
set UnoYellowCard	"\0031,08 Yellow "
set UnoSkipCard		"\002Skip\002 \003 "
set UnoReverseCard	"\002Reverse\002 \003 "
set UnoDrawTwoCard	"\002Draw Two\002 \003 "
set UnoWildCard		"\0031,8 \002W\0030,3I \0030,4L\0030,12D\002 \003 "
set UnoWildDrawFourCard "\0031,8 \002W\0030,3I \0030,4L\0030,12D \0031,8D\0030,3r\0030,4a\0030,12w \0031,8F\0030,3o\0030,4u\0030,12r\002 \003 "
set UnoLogo		"\002\0033U\00312N\00313O\00308!\002\003"

#
# Bind channel commands 
#
proc UnoBindCmds {} {
 bind pub - jo UnoJoin
 bind pub - od UnoOrder
 bind pub - ti UnoTime
 bind pub - ca UnoShowCards
 bind pub - pl UnoPlayCard
 bind pub - cd UnoTopCard
 bind pub - tu UnoTurn
 bind pub - dr UnoDraw
 bind pub - co UnoColorChange
 bind pub - pa UnoPass
 bind pub - ct UnoCardCount
 bind pub - st UnoCardStats
 bind chon - * unologin:dcc
 bind chof - * unologout:dcc
 bind filt - .quit* unologout:filt
}

#
# Unbind channel commands 
#
proc UnoUnbindCmds {} {
 catch {unbind pub - jo UnoJoin}
 catch {unbind pub - od UnoOrder}
 catch {unbind pub - ti UnoTime}
 catch {unbind pub - ca UnoShowCards}
 catch {unbind pub - pl UnoPlayCard}
 catch {unbind pub - cd UnoTopCard}
 catch {unbind pub - tu UnoTurn}
 catch {unbind pub - dr UnoDraw}
 catch {unbind pub - co UnoColorChange}
 catch {unbind pub - pa UnoPass}
 catch {unbind pub - ct UnoCardCount}
 catch {unbind pub - st UnoCardStats}
 catch {unbind chon - * unologin:dcc}
 catch {unbind chof - * unologout:dcc}
 catch {unbind filt - .quit* unologout:filt}
}

#
# Reset game variables
#
proc UnoReset {} {
 global UnoOn UnoMode UnoPaused UnoPlayers RoundRobin UnoDeck ThisPlayer ThisPlayerIDX PlayCard
 global DiscardPile IsColorChange ColorPicker IsDraw UnoIDX MasterDeck CardStats
 global UnoStartTimer UnoSkipTimer UnoCycleTimer UnoWinDefault UnoRobot botnick

 set UnoMode 0
 set UnoPaused 0
 set UnoPlayers 0
 set MasterDeck ""
 set UnoDeck ""
 set DiscardPile ""
 set RoundRobin ""
 set ThisPlayer ""
 set ThisPlayerIDX 0
 set PlayCard ""
 set IsColorChange 0
 set ColorPicker ""
 set IsDraw 0
 set UnoIDX ""
 set UnoAdNumber 0
 set UnoWinDefault 0

 set CardStats(played) 0
 set CardStats(wilds) 0
 set CardStats(draws) 0
 set CardStats(skips) 0

 set UnoStartTimer ""
 set UnoSkipTimer ""
 set UnoCycleTimer ""

 set UnoRobot $botnick

 return
}

#
# is this the uno channel?
#
proc uno_ischan {chan} {
 global UnoChan
 if {($chan == $UnoChan)} {return 1}
 return 0
}

#
# Stop a game
#
proc UnoStop {nick uhost hand chan txt} {
 global UnoOn UnoPaused UnPlayedRounds UnoStartTimer UnoSkipTimer UnoCycleTimer RoundRobin UnoDCCIDX
 global UnoLastWinner UnoWinsInARow

 if {(![uno_ischan $chan])||($UnoOn == 0)} {return}

 catch {killutimer $UnoStartTimer}
 catch {killtimer $UnoSkipTimer}
 catch {killutimer $UnoCycleTimer}

 # remove player dcc list
 set pcount 0
 while {[lindex $RoundRobin $pcount] != ""} {
  set pnick [lindex $RoundRobin $pcount]
  if [info exist UnoDCCIDX($pnick)] {unset UnoDCCIDX($pnick)}
That uno game When i type arabic font chan to be played in it..i got no
respond

game not work in the channel.

Can anyone help me to fix it?
Last edited by Aut0Cr0ss on Tue Sep 18, 2007 12:06 pm, edited 1 time in total.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Error messages would be helpful..But, ultimately the problem is going to come down to TCL's inability to handle unicode, which may not be fixable for your channel.

Might be simpler to just run the script in it's own channel (without unicode chars in the name.)

I'm also assuming you did configure the script correctly, but the cut/paste copy you posted doesn't have the right channel name in the config.
set UnoChan "#madlibs"
A
Aut0Cr0ss
Voice
Posts: 19
Joined: Fri Jun 15, 2007 9:01 pm

Post by Aut0Cr0ss »

it's script default. but when i change that (set UnoChan "#madlibs") to an

arabic font channel. bot doesn't respond to it.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Aut0Cr0ss wrote:it's script default. but when i change that (set UnoChan "#madlibs") to an

arabic font channel. bot doesn't respond to it.
I am guessing this is the type of channel name: #ÈäÊ-ÇáÑíÇÖ
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Autocross, your response wasn't very helpful.. Usually people post error messages. Maybe you're not seeing errors on your console, maybe you didn't read the FAQ about how to enable console error messages, the .set errorInfo debug feature and other useful little things people do to figure out why a script has an error.

In your case, just make a channel to play Uno in without the weird unicode/arabic chars in its name and you'll be just fine.. That's the simplest solution, since you don't seem to wanna be arsed to help debug by posting anything vaguely useful. ("It doesn't work" doesn't help much.)
A
Aut0Cr0ss
Voice
Posts: 19
Joined: Fri Jun 15, 2007 9:01 pm

Post by Aut0Cr0ss »

I am guessing this is the type of channel name: #ÈäÊ-ÇáÑíÇÖ
ya it's
y
yD^
Voice
Posts: 14
Joined: Fri Aug 10, 2007 10:37 am

Post by yD^ »

join at the partline and type: .set UnoChan #العرب
without rehashing or restarting.
change #العرب with your channel name
k
khalidxpert
Voice
Posts: 18
Joined: Sat Jan 26, 2008 2:03 am

i want to change date format

Post by khalidxpert »

i want to change date from from

0,10UNO0,6 64 Points In 145m:44s

to

0,10UNO0,6 64 Points In 145 minutes and 44 seconds


like by deafult its showing s with seconds and m with minutes but i want full word minute and second

pls. help

thank you

Khalid
Post Reply