All pastes #616331 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-12 16:16 UTC
rendered paste body
#!/bin/sh

#	BOT VARIABLES

msg="CONSOLE_MESSAGE "
map="MAP_FILE "

black="0x000000"
white="0xffffff"
grey="0x888888"
red="0xff0000"
green="0x00ff00"
blue="0x0000ff"
yellow="0xffff00"
violet="0xff00ff"
cyan="0x00ffff"
orange="0xff8800"

chat_col="0xffff88"
old_green="0x00ff44"

bot_prompt_col=$old_green
bot_chat_col=$old_green
bot_prompt="HAL-9001:> "
bot_say=$msg$bot_prompt_col$bot_prompt$bot_chat_col


my_name="hoop"

########################################################

while true
do
	read line



#	BOT CODE

	if [ "${line:4}" == "$my_name: hi HAL" ]
	then echo $bot_say"hi master"
	fi

	if [ "${line:4:18}" == "$my_name --> $my_name: say" ]
	then echo $bot_say"${line:23}"
	fi

	if [ "${line:4:21}" == "$my_name --> $my_name: insult" ]
	then echo $bot_say "${line:26}"" <-- FUCK OFF, PLEASE"
	fi

	if [ "${line:4}" == "$my_name --> $my_name: match reset" ]
	then
		map_rotate="0"
		echo "START_NEW_MATCH"
		echo $bot_say"new match starts after this round"
	fi

done