All pastes #26081 Raw Edit

Someone

public text v1 · immutable
#26081 ·published 2005-10-20 18:31 UTC
rendered paste body
elseif ($word[1]=="breakdown")
		{
			foreach($word as $number => $wordpart)
				$reply.="word[".$number."]=".$wordpart."   ";
			send_private_tell($sender,"$reply");
		}


		// here is an example of checking two words
		// for example, do /tell <bot> eat me
		elseif ($word[1]=="eat" && $word[2]=="me")
		{
			send_private_tell($sender,"grow up");
		}

		// here is an example of checking if the first word is any of a few combinations
		// for example, do /tell <bot> hi     or do /tell <bot> hello
		elseif ($word[1]=="hi" || $word[1]=="hello")
		{
						send_private_tell($sender,"hello");
		}
		elseif ($word[1]=="trade");
		{
		$trade = file_get_contents("C:/program files/funcom/anarchy online/cd_image/text/help/mainpage.txt")
		send_private_tell($sender,'<a href="text://'.$trade.'"> Click to view items for sale!</a>');
		}
		// if you want to send out a message inside of a popup window
		// for example, do /tell <bot> blob
		elseif ($word[1]=="blob")
		{
			// invent some text to be inside the window
			$window_contents="welcome to my first popup window";

			// package up the text into a blob   (Binary Large OBject)
			// (if the window contents is meant for a /tell, you need to put "1" as the second argument in MakeWndBlob()
			//  if it was going to be for a chat channel, then you would have put "0" )
			$window_blob=MakeWndBlob($window_contents,1);

			// to make text in the tell clickable, you need to surround it with character #17 and character #18
			$reply="here is a message ".chr(17)."click here".chr(18)." in a popup window";