-
Notifications
You must be signed in to change notification settings - Fork 0
/
ct-8ball.tcl
159 lines (157 loc) · 4.15 KB
/
ct-8ball.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#################################################################################################################################################################
# CT-8ball.tcl
#################################################################################################################################################################
#Author ComputerTech
#IRC Irc.DareNet.Org #ComputerTech
#Email ComputerTech@DareNet.Org
#GitHub https://github.com/computertech312
#Version 0.1
#Released 25/02/2021
#################################################################################################################################################################
# Description:
#
# 8Ball Script
#
#
# History:
#
# - 0.1: First Release.
#
#################################################################################################################################################################
# Start Of Configuration #
##########################
#variable trigger of the commands.
#
variable ct8ball(trig) "!"
#
###################
#variable flag for Commands.
##
#Owner = n
#Master = m
#Op = o
#Voice = v
#Friend = f
#Everyone = -
variable ct8ball(flag) "-"
#
#################
#variable Output of Commands
##
#1 = Notice
#2 = Privmsg
#
variable ct8ball(msg) "1"
#
#################
#variable Language output of Script
#
#English = en
#French = fr
#Spanish = sp
#German = ge
#Russian = ru
#
variable ct8ball(lang) "en"
#
#################
#variable Colour of Output
##
#White = 0
#Black = 1
#Dark Blue = 2
#Green = 3
#Red = 4
#Brown = 5
#Purple = 6
#Orange = 7
#Yellow = 8
#Light Green = 9
#DarkCyan = 10
#LightCyan = 11
#LightBlue = 12
#Pink = 13
#Dark Grey = 14
#Light Grey = 15
#
variable ct8ball(col) "3"
#
########################
# End Of Configuration #
#################################################################################################################################################################
namespace eval ct:8ball {
set ct8ball(1en)) { ;
"Shakes the magic 8ball and it reveals..." ;
"Shakes the stupid 8ball and it says..." ;
"Shakes and Rolls the 8ball and it shows...";
}
set ct8ball(1fr)) {
"Secoue la boule magique 8 et elle révèle..."
"Secoue le stupide 8bapl et il dit..."
"Secoue et fait rouler la balle 8 et ça se voit..."
}
set ct8ball(1sp) {
"Sacude la bola 8 mágica y revela..."
"Sacude la estúpida bola 8 y dice..."
"Sacude y rueda la bola 8 y se nota..."
}
set ct8ball(1ge) {
"Schüttelt den magischen 8ball und es zeigt sich..."
"chütteltt den blöden 8ball und es heißt..."
""Schüttelt und rollt das 8bal und es zeigt..."
}
set ct8ball(1ru) {
"Встряхивает волшебный шар 8, и он открывает..."
"Shakea глупый 8ball, и он говорит..."
"Встряхивает и катит шар 8, и он показывает..."
}
set ct8ball(2eu) {
"Yes"
"No"
"Maybe"
"Possibly"
"Impossible"
}
set ct8ball(2fr) {
"Oui"
"Non"
"Peut-être"
"Impossible"
}
set ct8ball(2sp) {
"sí"
"No"
"Quizás"
"Posiblemente"
"Imposible"
}
set ct8ball(2ge) {
"Ja"
"Nein"
"Kann sein"
"Möglicherweise"
"Unmöglich"
}
set ct8ball(2ru) {
"да"
"Нет"
"Может быть"
"Возможно"
"Невозможно"
}
bind pub $ct8ball(flag) $ct8ball(trig)8ball ::ct:8ball::8ball
proc 8ball {nick host hand chan text} {
global ct8ball
switch -- $ct8ball(lang)) {
en {set ct8ball(out1) [lindex $ct8ball(1en) [rand [llength $ct8ball(1en)]]]}
fr {set ct8ball(out1) [lindex $ct8ball(1fr) [rand [llength $ct8ball(1fr)]]]}
sp {set ct8ball(out1) [lindex $ct8ball(1sp) [rand [llength $ct8ball(1sp)]]]}
ge {set ct8ball(out1) [lindex $ct8ball(1ge) [rand [llength $ct8ball(1ge)]]]}
ru {set ct8ball(out1) [lindex $ct8ball(1ru) [rand [llength $ct8ball(1ru)]]]}
}
set line1 [string map [list %nick $nick] $ct8ball(1)]
set line2 [string map [list %nick $nick] $ct8ball(2)]
puthelp "PRIVMSG $chan :\001ACTION $ct8ball(out1)\001"
puthelp "PRIVMSG $chan :\[\0030${ct8ball(col)}8Ball\003\] $ct8ball(out2)"
}
}