there is an old thread about VC telling jokes (
http://voxcommando.com/forum/index.php?topic=665.15). the only issue was, one must populate it with jokes....
here is another command that retrieve a Chuck Norris fact from the internet. it avoids telling the joke twice ...
it is a bit rough, but have lot of potential .. (i.e. you can use replace to replace "Chuck Norris" with a name of a friend !). the db offer few options as well ...
and if someone know how to set up a similar DB online, maybe we can populate it with jocks so all vc users can access it ...
enjoy, and report bugs so we send them to Chuck Norris !!!!
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.7-->
<command id="824" name="Chuck Norris Facts" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="{ "type": "success", "value": { "id": 302, "joke": "Chuck Norris doesn't go on the internet, he has every internet site stored in his memory. He refreshes webpages by blinking.", "categories": [] } }
">
<action>
<cmdType>Map.CreateTable</cmdType>
<params>
<param>ChuckNorrisFacts</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Scrape</cmdType>
<params>
<param>http://api.icndb.com/jokes/random?limitTo=[nerdy]</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegEx</cmdType>
<params>
<param>"type":\s"(.*?)".*?"id":\s(.*?),.*?"joke":\s"(.*?)".*?"categories":\s\[(.*?)\] </param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="True">
<ifType>(A)==(B)</ifType>
<ifParams>{Match.1.1}&&success</ifParams>
<then>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>oops I forgot it !</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.StopMacro</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else />
</if>
<action>
<cmdType>Map.Get</cmdType>
<params>
<param>ChuckNorrisFacts</param>
<param>{Match.1.2}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<if ifBlockDisabled="False" ifNot="False">
<ifType>LastActionSuccess</ifType>
<ifParams>&&</ifParams>
<then>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>hmm, I think I told you this one. let me think of another.</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.Pause</cmdType>
<params>
<param>1000</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>here is another one ...</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.TriggerEvent</cmdType>
<params>
<param>ChuckNorrisFacts</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>VC.StopMacro</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
</then>
<else>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>{Match.1.3}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Map.Set</cmdType>
<params>
<param>ChuckNorrisFacts</param>
<param>{Match.1.2}</param>
<param>{ShortDate}</param>
<param>True</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</else>
</if>
<phrase>tell me, tell us</phrase>
<phrase optional="true">a</phrase>
<phrase>Chuck Norris</phrase>
<phrase>fact, joke</phrase>
<event>ChuckNorrisFacts</event>
</command>