@verb #789:"hello" this none this rxdo #789 @program #789:"hello" this none this "Determine if a player is saying 'hello' to me, and if so, answer back." caller == this || raise(E_PERM) suspend(0) for last_hello in (this.last_hello) if (last_hello[1] == player && last_hello[2] + 60 > time()) return "I just said 'hello' to that player." endif endfor say_word = max(index(args[1], " says, \""), index(args[1], " asks, \""), index(args[1], " exclaims, \"")) if (!say_word) return endif text = args[1][say_word..$] text = text[index(text, "\"")..rindex(text, "\"")] while (m = match(text, "[^a-zA-Z0-9 ]")) text[m[1]..m[2]] = "" endwhile text = $string_utils:explode(text) for word in (text) word in {@this.aliases, "all", "guys", "folks", "again", "everyone", "everybody", "there", "Neil"} && (text = setremove(text, word)) endfor bingo = 0 for word in (text) word in {"bonjour", "hola", "gday", "gidday", "greetage", "greetings", "hallo", "hello", "helo", "hey", "hi", "hilo", "hiya", "hlo", "howdy", "hullo", "salut", "salutations", "yallo", "yello", "yo"} && ((text = setremove(text, word)) || (bingo = 1)) endfor if (bingo) last_hello = {{player, time()}} for record in (this.last_hello) record[2] + 90 > time() && (last_hello[1..0] = {record}) endfor this.last_hello = last_hello fork (3) this.location:announce_all_but({this}, this:title(), " waves at ", player:title(), ".") this:tell("You wave at ", player:title(), ".") endfork endif "Last modified by Dax (#789) on Thu May 5 11:59:30 2005 MDT." .