#Anaroch's info script by a_happy_visitor
putlog "loading Anaroch by a_happy_visitor..."
###############binds###############
bind pub +xp pub:xp
bind pub +potion pub:potion
bind pub +help pub:help
#Channels allowed to use these commands
set enabledchans {#anaroch #anaroch1 #r_anaroch #attack}
# procedure to check if chan where command is used is listed chan
proc isenabledchan { channel } {
global enabledchans
# compare each chan in $enabledchans with current chan and return 1 (true) if chan is listed
foreach enablechan $enabledchans {
if { $channel == $enablechan } {
return 1
}
}
return 0
}
# main procedure to handle the commands
proc pub:xp { nick uhost handle channel arg } {
# check if command should work in this chan
set chan [string tolower $channel]
if { ![isenabledchan $chan] } {
return 1
}
if { [llength $arg] == 0 } {
putserv "NOTICE $nick :Unable to perform request, give command."
} else {
set command [lindex $arg 0]
set command [string tolower $command]
# check if valid number of arguments
if { [llength $arg] < 1 } {
putserv "NOTICE $nick :Please check the help function if you don't know how to use this command."
# command syntax is ok, process request
} else {
set exp [string tolower [lindex $arg 1]]
if { $exp == 1 } { putserv "NOTICE $nick :You must be dumb, check what level you start with." }
if { $exp == 2 } { putserv "NOTICE $nick :you need 400 XP - 20 AP - 20 DP and 20 HP to fight level 2 Monsters." }
if { $exp == 3 } { putserv "NOTICE $nick :you need 800 XP - 40 AP - 40 DP and 40 HP to fight level 3 Monsters." }
if { $exp == 4 } { putserv "NOTICE $nick :you need 1600 XP - 80 AP - 80 DP and 80 HP to fight level 4 Monsters." }
if { $exp == 5 } { putserv "NOTICE $nick :you need 3200 XP - 160 AP - 160 DP and 160 HP to fight level 5 Monsters." }
if { $exp == 6 } { putserv "NOTICE $nick :you need 6400 XP - 320 AP - 320 DP and 320 HP to fight level 6 Monsters." }
if { $exp == 7 } { putserv "NOTICE $nick :you need 12800 XP - 640 AP - 640 DP and 640 HP to fight level 7 Monsters." }
if { $exp == 8 } { putserv "NOTICE $nick :you need 25600 XP - 1280 AP - 1280 DP and 1280 HP to fight level 8 Monsters." }
if { $exp == 9 } { putserv "NOTICE $nick :you need 51200 XP - 2560 AP - 2560 DP and 2560 HP to fight level 9 Monsters." }
if { $exp == 10 } { putserv "NOTICE $nick :you need 102400 XP - 5120 AP - 5120 DP and 5120 HP to fight level 10 Monsters." }
if { $exp == 11 } { putserv "NOTICE $nick :you need 204800 XP - 10240 AP - 10240 DP and 10240 HP to fight level 11 Monsters." }
if { $exp == 12 } { putserv "NOTICE $nick :you need 409600 XP - 20480 AP - 20480 DP and 20480 HP to fight level 12 Monsters." }
if { $exp == 13 } { putserv "NOTICE $nick :you need 819200 XP - 40960 AP - 40960 DP and 40960 HP to fight level 13 Monsters." }
if { $exp == 14 } { putserv "NOTICE $nick :you need 1638400 XP - 81920 AP - 81920 DP and 81920 HP to fight level 14 Monsters." }
if { $exp == 15 } { putserv "NOTICE $nick :you need 3276800 XP - 163840 AP - 163840 DP and 163840 HP to fight level 15 Monsters." }
if { $exp == 16 } { putserv "NOTICE $nick :you need 6553600 XP - 327680 AP - 327680 DP and 327680 HP to fight level 16 Monsters." }
if { $exp == 17 } { putserv "NOTICE $nick :you need 13107200 XP - 655360 AP - 655360 DP and 655360 HP to fight level 17 Monsters." }
if { $exp == 18 } { putserv "NOTICE $nick :you need 26214400 XP - 1310720 AP - 1310720 DP and 1310720 HP to fight level 18 Monsters." }
if { $exp == 19 } { putserv "NOTICE $nick :you need 52418800 XP - 2621440 AP - 2621440 DP and 2621440 HP to fight level 19 Monsters." }
if { $exp == 20 } { putserv "NOTICE $nick :you need 104857600 XP - 5242880 AP - 5242880 DP and 5242880 HP to fight level 20 Monsters." }
if { $exp == 21 } { putserv "NOTICE $nick :you need 209715200 XP - 10485760 AP - 10485760 DP and 10485760 HP to fight level 21 Monsters." }
if { $exp == 22 } { putserv "NOTICE $nick :you need 419430400 XP - 20971520 AP - 20971520 DP and 20971520 HP to fight level 22 Monsters." }
if { $exp == 23 } { putserv "NOTICE $nick :you need 838860800 XP - 41943040 AP - 41943040 DP and 41943040 HP to fight level 23 Monsters." }
if { $exp == 24 } { putserv "NOTICE $nick :you need 1677721600 XP - 83886080 AP - 83886080 DP and 83886080 HP to fight level 24 Monsters." }
if { $exp == 25 } { putserv "NOTICE $nick :you need 3355443200 XP - 167772160 AP - 167772160 DP and 167772160 HP to fight level 25 Monsters." }
if { $exp >= 26 } { putserv "NOTICE $nick :They added a new level to the game? As far as i know there are only 25 levels in this game." }
if { $exp <= 0} { putserv "NOTICE $nick :4Error no info exists about this level" }
}
}
}
if {$exp >= 26} {
putserv "NOTICE $nick :They added a new level to the game? As far as i know there are only 25 levels in this game."
return
}
if {$exp <= 0} {
putserv "NOTICE $nick :Error no info exists about this level."
return
}
switch $exp {
"1" { putserv "NOTICE $nick :You must be dumb, check what level you start with." }
"2" { putserv "NOTICE $nick :you need 400 XP - 20 AP - 20 DP and 20 HP to fight level 2 Monsters." }
"3" { putserv "NOTICE $nick :you need 800 XP - 40 AP - 40 DP and 40 HP to fight level 3 Monsters." }
"4" { putserv "NOTICE $nick :you need 1600 XP - 80 AP - 80 DP and 80 HP to fight level 4 Monsters." }
"5" { putserv "NOTICE $nick :you need 3200 XP - 160 AP - 160 DP and 160 HP to fight level 5 Monsters." }
"6" { putserv "NOTICE $nick :you need 6400 XP - 320 AP - 320 DP and 320 HP to fight level 6 Monsters." }
"7" { putserv "NOTICE $nick :you need 12800 XP - 640 AP - 640 DP and 640 HP to fight level 7 Monsters." }
"8" { putserv "NOTICE $nick :you need 25600 XP - 1280 AP - 1280 DP and 1280 HP to fight level 8 Monsters." }
"9" { putserv "NOTICE $nick :you need 51200 XP - 2560 AP - 2560 DP and 2560 HP to fight level 9 Monsters." }
"10" { putserv "NOTICE $nick :you need 102400 XP - 5120 AP - 5120 DP and 5120 HP to fight level 10 Monsters." }
"11" { putserv "NOTICE $nick :you need 204800 XP - 10240 AP - 10240 DP and 10240 HP to fight level 11 Monsters." }
"12" { putserv "NOTICE $nick :you need 409600 XP - 20480 AP - 20480 DP and 20480 HP to fight level 12 Monsters." }
"13" { putserv "NOTICE $nick :you need 819200 XP - 40960 AP - 40960 DP and 40960 HP to fight level 13 Monsters." }
"14" { putserv "NOTICE $nick :you need 1638400 XP - 81920 AP - 81920 DP and 81920 HP to fight level 14 Monsters." }
"15" { putserv "NOTICE $nick :you need 3276800 XP - 163840 AP - 163840 DP and 163840 HP to fight level 15 Monsters." }
"16" { putserv "NOTICE $nick :you need 6553600 XP - 327680 AP - 327680 DP and 327680 HP to fight level 16 Monsters." }
"17" { putserv "NOTICE $nick :you need 13107200 XP - 655360 AP - 655360 DP and 655360 HP to fight level 17 Monsters." }
"18" { putserv "NOTICE $nick :you need 26214400 XP - 1310720 AP - 1310720 DP and 1310720 HP to fight level 18 Monsters." }
"19" { putserv "NOTICE $nick :you need 52418800 XP - 2621440 AP - 2621440 DP and 2621440 HP to fight level 19 Monsters." }
"20" { putserv "NOTICE $nick :you need 104857600 XP - 5242880 AP - 5242880 DP and 5242880 HP to fight level 20 Monsters." }
"21" { putserv "NOTICE $nick :you need 209715200 XP - 10485760 AP - 10485760 DP and 10485760 HP to fight level 21 Monsters." }
"22" { putserv "NOTICE $nick :you need 419430400 XP - 20971520 AP - 20971520 DP and 20971520 HP to fight level 22 Monsters." }
"23" { putserv "NOTICE $nick :you need 838860800 XP - 41943040 AP - 41943040 DP and 41943040 HP to fight level 23 Monsters." }
"24" { putserv "NOTICE $nick :you need 1677721600 XP - 83886080 AP - 83886080 DP and 83886080 HP to fight level 24 Monsters." }
"25" { putserv "NOTICE $nick :you need 3355443200 XP - 167772160 AP - 167772160 DP and 167772160 HP to fight level 25 Monsters." }
}
Once the game is over, the king and the pawn go back in the same box.
ok. i have it like this now. but it tells me that it is missing a close brace.
[09:02] Tcl error in file 'ahv.conf':
[09:02] missing close-brace
while executing
"proc pub:xp { nick uhost handle channel arg } {
# check if command should work in this chan
set chan [string tolower $channel]
if { ![isenabl..."
(file "scripts/anaroch.tcl" line 26)
##############binds###############
bind pub +xp pub:xp
bind pub +potion pub:potion
bind pub +help pub:help
#Channels allowed to use these commands
set enabledchans {#anaroch #anaroch1 #r_anaroch #attack}
# procedure to check if chan where command is used is listed chan
proc isenabledchan { channel } {
global enabledchans
# compare each chan in $enabledchans with current chan and return 1 (true) if chan is listed
foreach enablechan $enabledchans {
if { $channel == $enablechan } {
return 1
}
}
return 0
}
# main procedure to handle the commands
proc pub:xp { nick uhost handle channel arg } {
# check if command should work in this chan
set chan [string tolower $channel]
if { ![isenabledchan $chan] } {
return 1
}
if { [llength $arg] == 0 } {
putserv "NOTICE $nick :Unable to perform request, give command."
} else {
set command [lindex $arg 0]
set command [string tolower $command]
# check if valid number of arguments
if { [llength $arg] < 1 } {
putserv "NOTICE $nick :Please check the help function if you don't know how to use this command."
# command syntax is ok, process request
} else {
set exp [string tolower [lindex $arg 1]]
if {$exp >= 26} { putserv "NOTICE $nick :They added a new level to the game? As far as i know there are only 25 levels in this game." return }
if {$exp <= 0} { putserv "NOTICE $nick :Error no info exists about this level." return }
switch $exp {
"1" { putserv "NOTICE $nick :You must be dumb, check what level you start with." }
"2" { putserv "NOTICE $nick :you need 400 XP - 20 AP - 20 DP and 20 HP to fight level 2 Monsters." }
"3" { putserv "NOTICE $nick :you need 800 XP - 40 AP - 40 DP and 40 HP to fight level 3 Monsters." }
"4" { putserv "NOTICE $nick :you need 1600 XP - 80 AP - 80 DP and 80 HP to fight level 4 Monsters." }
"5" { putserv "NOTICE $nick :you need 3200 XP - 160 AP - 160 DP and 160 HP to fight level 5 Monsters." }
"6" { putserv "NOTICE $nick :you need 6400 XP - 320 AP - 320 DP and 320 HP to fight level 6 Monsters." }
"7" { putserv "NOTICE $nick :you need 12800 XP - 640 AP - 640 DP and 640 HP to fight level 7 Monsters." }
"8" { putserv "NOTICE $nick :you need 25600 XP - 1280 AP - 1280 DP and 1280 HP to fight level 8 Monsters." }
"9" { putserv "NOTICE $nick :you need 51200 XP - 2560 AP - 2560 DP and 2560 HP to fight level 9 Monsters." }
"10" { putserv "NOTICE $nick :you need 102400 XP - 5120 AP - 5120 DP and 5120 HP to fight level 10 Monsters." }
"11" { putserv "NOTICE $nick :you need 204800 XP - 10240 AP - 10240 DP and 10240 HP to fight level 11 Monsters." }
"12" { putserv "NOTICE $nick :you need 409600 XP - 20480 AP - 20480 DP and 20480 HP to fight level 12 Monsters." }
"13" { putserv "NOTICE $nick :you need 819200 XP - 40960 AP - 40960 DP and 40960 HP to fight level 13 Monsters." }
"14" { putserv "NOTICE $nick :you need 1638400 XP - 81920 AP - 81920 DP and 81920 HP to fight level 14 Monsters." }
"15" { putserv "NOTICE $nick :you need 3276800 XP - 163840 AP - 163840 DP and 163840 HP to fight level 15 Monsters." }
"16" { putserv "NOTICE $nick :you need 6553600 XP - 327680 AP - 327680 DP and 327680 HP to fight level 16 Monsters." }
"17" { putserv "NOTICE $nick :you need 13107200 XP - 655360 AP - 655360 DP and 655360 HP to fight level 17 Monsters." }
"18" { putserv "NOTICE $nick :you need 26214400 XP - 1310720 AP - 1310720 DP and 1310720 HP to fight level 18 Monsters." }
"19" { putserv "NOTICE $nick :you need 52418800 XP - 2621440 AP - 2621440 DP and 2621440 HP to fight level 19 Monsters." }
"20" { putserv "NOTICE $nick :you need 104857600 XP - 5242880 AP - 5242880 DP and 5242880 HP to fight level 20 Monsters." }
"21" { putserv "NOTICE $nick :you need 209715200 XP - 10485760 AP - 10485760 DP and 10485760 HP to fight level 21 Monsters." }
"22" { putserv "NOTICE $nick :you need 419430400 XP - 20971520 AP - 20971520 DP and 20971520 HP to fight level 22 Monsters." }
"23" { putserv "NOTICE $nick :you need 838860800 XP - 41943040 AP - 41943040 DP and 41943040 HP to fight level 23 Monsters." }
"24" { putserv "NOTICE $nick :you need 1677721600 XP - 83886080 AP - 83886080 DP and 83886080 HP to fight level 24 Monsters." }
"25" { putserv "NOTICE $nick :you need 3355443200 XP - 167772160 AP - 167772160 DP and 167772160 HP to fight level 25 Monsters." }
}
}
}
else {
set command [lindex $arg 0]
set command [string tolower $command]
# check if valid number of arguments
if { [llength $arg] < 1 } {
putserv "NOTICE $nick :Please check the help function if you don't know how to use this command."
# command syntax is ok, process request
} else {
else {
set command [lindex $arg 0]
set command [string tolower $command]
# check if valid number of arguments
if { [llength $arg] < 1 } {
putserv "NOTICE $nick :Please check the help function if you don't know how to use this command."
# command syntax is ok, process request
}
}else {
[04:43] extra characters after close-brace
while executing
"} else {
set command [lindex $arg 0]
set command [string tolower $command]
# check if valid number of arguments
if { [lle..."
(file "scripts/anaroch.tcl" line 35)
invoked from within
"source scripts/anaroch.tcl"
} else {
set command [lindex $arg 0]
set command [string tolower $command]
# check if valid number of arguments
if { [llength $arg] < 1 } {
putserv "NOTICE $nick :Please check the help function if you don't $
# command syntax is ok, process request
}
}else {
set exp [string tolower [lindex $arg 1]]
# main procedure to handle the commands
proc pub:xp { nick uhost handle channel arg } {
# check if command should work in this chan
set chan [string tolower $channel]
if { ![isenabledchan $chan] } {
return 1
}
if { [llength $arg] == 0 } {
putserv "NOTICE $nick :Unable to perform request, give command." }
}
} else {
set command [lindex $arg 0]
set command [string tolower $command]
# check if valid number of arguments
if { [llength $arg] < 1 } {
putserv "NOTICE $nick :Please check the help function if you don't know how to use this command."
# command syntax is ok, process request
}
else {
the error i get now is:
[02:52] Tcl error in file 'eggdrop.conf':
[02:52] invalid command name "}"
while executing
"} else {
set command [lindex $arg 0]
set command [string tolower $command]
# check if valid number of arguments
if { [ll..."