egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Uno Script [SOLVED]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Aut0Cr0ss
Voice


Joined: 15 Jun 2007
Posts: 19

PostPosted: Thu Sep 13, 2007 12:09 am    Post subject: Uno Script [SOLVED] Reply with quote

Code:
#
# 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
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Sep 13, 2007 11:34 am    Post subject: Reply with quote

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"
Back to top
View user's profile Send private message
Aut0Cr0ss
Voice


Joined: 15 Jun 2007
Posts: 19

PostPosted: Thu Sep 13, 2007 11:42 am    Post subject: Reply with quote

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

arabic font channel. bot doesn't respond to it.
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Sep 13, 2007 5:19 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Sep 13, 2007 8:07 pm    Post subject: Reply with quote

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.)
Back to top
View user's profile Send private message
Aut0Cr0ss
Voice


Joined: 15 Jun 2007
Posts: 19

PostPosted: Fri Sep 14, 2007 7:08 am    Post subject: Reply with quote

Quote:
I am guessing this is the type of channel name: #بنت-الرياض


ya it's
Back to top
View user's profile Send private message
yD^
Voice


Joined: 10 Aug 2007
Posts: 14

PostPosted: Tue Sep 18, 2007 2:47 am    Post subject: Reply with quote

join at the partline and type: .set UnoChan #العرب
without rehashing or restarting.
change #العرب with your channel name
Back to top
View user's profile Send private message
khalidxpert
Voice


Joined: 26 Jan 2008
Posts: 18

PostPosted: Tue Aug 25, 2015 5:52 am    Post subject: i want to change date format Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber