# check if valid command (armor)
if { [llength $arg] == 0 } {
putserv "PRIVMSG $channel :Unable to perform request, give command."
} else {
# get command and compare it to "armor"
set command [lindex $arg 0]
set command [string tolower $command]
if { [string compare $command armor] == 0 } {
# check if valid number of arguments
if { [llength $arg] < 2 } {
putserv "PRIVMSG $channel :Please check the help function if you don't know how to use this command."
# command syntax is ok, process request
} else {
set armor_a [lindex $arg 1]
set armor_b [lindex $arg 2]
set armor_c [lindex $arg 3]
if { ($armor_a == "cloth") && ($armor_b == "tunic") } { putserv "PRIVMSG $channel :Cloth Tunic costs 150 gold and has 10 Defense$
the problem is with $armor_a and $armor_b
when i use caps in those names (Cloth Armor) the bot won't answer at all.
Any idea how to fix it?
Last edited by mkluin on Tue Jun 03, 2003 4:05 am, edited 2 times in total.
The script uses 'string tolower' on the $command var, but not $armor_a or $armor_b. Change the lines to say: set armor_a [string tolower [lindex $arg 1]]<br>
<br>
(repeat for each one)