Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Project U-232
Reply
  #1  
Old 10th December 2020, 17:21
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default [INPROGRESS] Autobot MSG w/ sound
Original Version!
PHP Code:
function autoshout ($msg '')
{
    
$message $msg;

    
sql_query("INSERT INTO shoutbox (date, text)
                VALUES ("
.implode(", "array_map("sqlesc", array(time(), $message))).")") or sqlerr(__FILE____LINE__);
    echo 
"<embed loop='false' src='sounds/chat.mp3' hidden='true' autoplay='true' />";

So before we begin let's create some directories chat
inside that new folder create another folder
sounds

Insert a index.html file in both keep it empty and chmod them folders 0755

Now inside the sounds folder will hold the files you want to play the success.wav file or mp3 or etc

Download & Extract:
http://frug.github.io/AJAX-Chat/

^^ sounds can be found in there.

TEST INSIDE u232 yo!
PHP Code:
/* Chat Functions */
function  autoshout($msg ''){

$message $msg;

function 
timeout(time()){
return 
time();
}

if( 
$message ){
$htmlout "<embed loop='flase' src='chat/sounds/success.wav' hidden='true' autoplay='true' />";
print 
$htmlout;
}

$query "INSERT INTO `shoutbox` (date, text, sounds) VALUES (".implode(", "array_map("sqlesc", array(timeout(), $message'0'))).")";

PHP Code:
ALTER TABLE shoutbox ADD sounds int(8unsigned NOT NULL default '0'
its for the trigger words to basicly appear though its the function which spits the output for the trigger word list to work inside your chatroom's if you dont understand learn about v3 shoutbox scripts you'll find the first function provided on beginning of topic so anyway replace it once you find it n if it works report back

Its a bot that should make a sound when i post a msg through shoutbox. For now i am just gonna rename original function to ajxbot($msg='') in the near future goals.

I HAVE YET TO TEST MYSELF!!!
Should work yo!

Go to domain: http://localhost:8080/shoutbox.php or index.php depends on how you designed your website. Once you inside test it after you replace code where nessecessory n then run script and it should make a sound when you run a trigger_word like !irc that would show me how to connect my irc in my shoutbox via text and would arrive with a sound if successfully posted. Sometimes we like these small mods yo!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 16:33. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.