Joined: 25 Jun 2004 Posts: 130 Location: Liverpool(home) or Derby(uni), UK votes: 3
Posted: Mon Jul 03, 2006 10:18 pm Post subject: Plus! Live - Audio Emoticons
Msg+ Live has a feature called Audio Emoticons. Very similar to the voice clips, but users upload an audio emoticon and then you can download one at random. This command gets the ID of an emoticon from the server and then sends the message that Msg+ picks up as an ID for this feature.
If the recipient has Msg+ Live, the sound clip will be downloaded to their pc and played in the conversation.
The code is for my own bot, but it should be pretty simple to convert to work for any of the available template.
The numbers correspond to the category. Place them in the catId field to get audio emoticons for that category. The default is 2, because those ones are the most fun
There is one error which I cannot figure out how to fix, sometimes Msg+ wont realise its a sound clip (I assume that some are sent differently to others) and will display the message that should have been picked up as though it was a normal message sent by the user.
It doesnt happen often so it shouldnt be too much of a problem.
Hope you enjoy it
Edit: Here is an example:
Quote:
[Teario] says (23:19):
!AudioEmote
[Crybot] is sending a sound.
Action: Play "attila"
[Teario] says (23:20):
!AudioEmote
[Crybot] is sending a sound.
Action: Play "Fat"
Joined: 19 Jul 2004 Posts: 556 Location: Los Angeles, CA votes: 1
Posted: Wed Jul 05, 2006 8:51 pm Post subject:
This is a really cool command. Something you may want to do to make it faster is use LWP::Simple head function.. that way your bot dosnt actually download the contents of the file, just get the headers:
Code:
use LWP::Simple;
my ($id) = head('http://sounds.msgpluslive.net/esnd/snd/random?catId=2')->
{_headers}->{'content-disposition'} =~ m/#(.*?)\./;