Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,657
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Uridium

  1. Big thanks to JDS137 for letting me use his site for adding the newly updated script..... You can now test it out at http://www.mobslife.net When your signed in goto PREFERENCES click on SOUND ON You will see a bar at bottom of page which you need to click SOUND ON to activate the sound....
  2. For those who found the header music kept changing everytime a link was clicked ive now solved the problem. This however isnt a quick fix but it will allow people to continue view any pages whilst the music is still playing...
  3. The script itself needs updating i will re-post it when its updated and working correctly.
  4. minor edit in the header use this   if($ir['mainsnd'] == 1) { $filename="mainpage.php";$pages=file($filename);shuffle($pages);$page=$pages[0]; echo '[url="preferences.php?action=soundoff"] [ SOUND OFF ][/url] '.$page.''; } else { $filename="off.php";$pages=file($filename);shuffle($pages);$page=$pages[0]; // mainpagetheme }
  5. PART 2 create a file called off.php leave it blank and just send it to your FTP download the below file and place it inside your sndfiles/mainpage/ folder DOWNLOAD and thats IT if you want the attack mail and events script im afraid thats $10 and can be found here MARKETPLACE But you now have a taster of what to expect......
  6. SQLS [mysql]CREATE TABLE IF NOT EXISTS `sounds` ( `soundid` int(11) NOT NULL auto_increment, `userid` int(11) NOT NULL default '0', `mainsnd` int(2) NOT NULL default '0', `youhitsnd` int(2) NOT NULL default '0', `youfailsnd` int(2) NOT NULL default '0', `theyhitsnd` int(2) NOT NULL default '0', `theyfailsnd` int(2) NOT NULL default '0', `mailboxsnd` int(2) NOT NULL default '0', `eventssnd` int(2) NOT NULL default '0', PRIMARY KEY (`soundid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; [/mysql] and two for the users table ALTER TABLE `users` ADD `mainsnd` TINYINT( 2 ) NOT NULL DEFAULT '0' ALTER TABLE `users` ADD `firsttime` TINYINT( 2 ) NOT NULL DEFAULT '0' now open up preferences.php and where the cases are add   case 'soundon': sound_on(); break; case 'soundoff': sound_off(); break; case 'soundeffects': sound_effects(); break; case 'disresoundsub': sound_settings(); break;   and on the links section add this...   Turn Background Sound: [url='preferences.php?action=soundon']ON[/url] or [url='preferences.php?action=soundoff']OFF[/url] "; } if($ir['firstTime'] = 0) { print"[url='preferences.php?action=soundeffects']Create Ingame Sound Settings[/url] "; } else { print"[url='preferences.php?action=soundeffects']Manage Sound Settings[/url]"; }   now for the functions add   function sound_on() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET mainsnd=1 WHERE userid=$userid"); Print"<h2>Atmospheric Sounds Enabled</h2> [url='index.php']Return To Game[/url] "; } function sound_off() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET mainsnd=0 WHERE userid=$userid"); Print"<h2> Atmospheric Sounds Disabled</h2> Will Take Effect when you leave this page [url='index.php']Return To Game[/url] "; } function sound_effects() { global $db,$ir,$c,$userid,$h; print "<h2>Create Sound Settings.</h2> <form action='preferences.php?action=disresoundsub' method='post'> <input type='hidden' name='userid' value='$userid' /> You Hit Sound Effect: <input type='radio' name='youhitsnd' value='0' />OFF <input type='radio' name='youhitsnd' value='1' checked='checked' />ON You Miss Sound Effect: <input type='radio' name='youfailsnd' value='0' />OFF <input type='radio' name='youfailsnd' value='1' checked='checked' />ON They Hit Sound Effect: <input type='radio' name='theyhitsnd' value='0' />OFF <input type='radio' name='theyhitsnd' value='1' checked='checked' />ON They Miss Sound Effect: <input type='radio' name='theyfailsnd' value='0' />OFF <input type='radio' name='theyfailsnd' value='1' checked='checked' />ON Mailbox Sound Effect: <input type='radio' name='mailboxsnd' value='0' />OFF <input type='radio' name='mailboxsnd' value='1' checked='checked' />ON Events Sound Effect: <input type='radio' name='eventssnd' value='0' />OFF <input type='radio' name='eventssnd' value='1' checked='checked' />ON <input type='submit' value='Create Settings' /></form>"; } function sound_settings() { global $db,$ir,$c,$userid; $youhitsnd=abs((int) $_POST['youhitsnd']); $youfailsnd=abs((int) $_POST['youfailsnd']); $theyhitsnd=abs((int) $_POST['theyhitsnd']); $theyfailsnd=abs((int) $_POST['theyfailsnd']); $mailboxsnd=abs((int) $_POST['mailboxsnd']); $eventssnd=abs((int) $_POST['eventssnd']); if($ir['firstTime'] = 0) { $db->query("INSERT INTO sounds (userid, youhitsnd, youfailsnd, theyhitsnd, theyfailsnd, mailboxsnd, eventssnd) VALUES($userid, $youhitsnd, $youfailsnd, $theyhitsnd, $theyfailsnd, $mailboxsnd, $eventssnd)"); $db->query("UPDATE users SET firsttime=1 WHERE userid=$userid"); } else { $db->query("UPDATE sounds SET youhitsnd=$youhitsnd, youfailsnd=$youfailsnd, theyhitsnd=$theyhitsnd, theyfailsnd=$theyfailsnd, mailboxsnd=$mailboxsnd, eventssnd=$eventssnd WHERE userid={$_POST['userid']}"); } print "<h2>Sound Settings Created</h2>"; }   Thats it for the preferences.php file now open up header.php and underneath the very first mention of global add   if($ir['mainsnd'] == 1) { $filename="mainpage.php";$pages=file($filename);shuffle($pages);$page=$pages[0]; echo '[url="preferences.php?action=soundoff"] [ SOUND OFF ][/url]'; } else { $filename="off.php";$pages=file($filename);shuffle($pages);$page=$pages[0]; // mainpagetheme }   And thats it for the header.php Now create a new file called mainpage.php and make sure WORDWRAP is OFF this is vital as the next part will call for one line at a time so if yours exceeds online and goes onto 2 then it will think the 2nd line is another track...   <font color="green">Current Track playing = [ EVOLUTION ] by illusions </font>[url="changetrack.php"][change track][/url]<object><embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"width="0" height="0"name="evolution" src="sndfiles/mainpage/evolution.swf" bgcolor="#FFFFFF" quality="high" swLiveConnect="true" visability="false" allowScriptAccess="samedomain" ></embed></object>   and then create a file called changetrack.php   <?php include "globals.php"; echo '<h2>Changing Track Please Wait</h2>'; ?>   PART 2 Below
  7. Im just going to add one sound for each for now cos this is taking ages and once i get chance i'll add more sounds for attacking as i go along... will be about an hour before the scripts up. the easy Part... on your FTP create a folder called sndfiles and in that folder create three more attacking, atmospheric, mainpage in the newly created attacking folder create 4 new folders youhit, youfail, theyhit, theyfail, Dont forget to put a blank index.php or index.html file in each folder
  8. Bare with me all im still making the sound effects Fruity loops can sometimes a be a pain
  9. Ok cant say ive seen this in a game yet but thought it might be fun to have. The attack system is boring to say the least so why not have background sounds when you hit someone or when they hit you. And a mailbox / events that makes a sound when you have received them or even just add background sounds to your game in general. Well ive been up all night making this addition and have finally made it happen. Dont worry about sounds getting on your Users nerves cos they can be turned on and off. either all sounds or just sounds selected by the user.. Attack Sounds as you can see above can be turned off. All files are done via SWF and only last a few seconds. You can add as many SWF files as you wish for example YOUHIT so users dont always get the same sounds.. *** UPDATE*** the use of SWF has been widened to any media format.. See post:
  10. Most tv shows and movies have influenced some of my mods.. What part of a Movie/TV would you place into your game if you could ?
  11. I'll reupload this again with edits ive made + keeping Copyright intact. for the correct owner Sorry about that.
  12. Im also having issues with the bar not scrolling like it does on FF but the main thing is it dont block any text at the moment until i can find a suitable cure for this.
  13. only upload whats inside the 4toolbar folder and not the 4toolbar folder itself so files need to be FOLDERS for root: ICONS SRC THEMES and to root as a script upload the jquery-1.3.2.min.js file
  14. Be patient this isnt just one file..... Just for the record you can make as many CSS files for the bar as you wish just remember to point the stylesheet to your newly made CSS once done... I'll zip it up and include instructions for install as i cant be ar**d posting all this code...... And thank you to everyone who helped :)
  15. RPBM you my son are a bloody STAR lol
  16. Thanks for that Shedh :) my damn notepad++ has just crashed and ive lost what ive just written so those viewing the site i posted the bar on bare with me till i re-fix the stupid thing..
  17.   I actually thought position: fixed; would have cured it but im using DIV to call for the Bar as its in sections. Reading up on the IE problem it seems IE dont like DIV much and uses FIXED only when theres a <class> statement which i want to try to avoid if possible heres the CSS for the positioning   /*----- bar style -----*/ .ill-bar { position:fixed; /* to try cure IE problem */ bottom:0px; /* to try cure IE problem */ height: 30px; padding:0px; Padding-Bottom : 1px ; width:100%; background-color:#666666; border:#666666 solid 1px; } /* rounded top-left corner */ .ill-bar-rounded-tl { -webkit-border-top-left-radius:5px; -khtml-border-radius-topleft:5px; -moz-border-radius-topleft:5px; border-top-left-radius:5px; } /* rounded top-right corner */ .ill-bar-rounded-tr { -webkit-border-top-right-radius:5px; -khtml-border-radius-topright:5px; -moz-border-radius-topright:5px; border-top-right-radius:5px; } /*----- bar separator -----*/ .ill-separator-left { float:left; width:1px; height:100%; background-color:#999999; } .ill-separator-right { float:right; width:1px; height:100%; background-color:#999999; } /*----- bar button -----*/ .ill-bar-button ul { margin:0px; padding:0px; } .ill-bar-button li { float:left; list-style:none; } .ill-bar-button-right li { float:right; list-style:none; } .ill-bar-button li { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#CCCCCC; cursor:pointer; padding:4px 8px 4px 8px; border:#666666 solid 1px; margin:2px; } /* button hover effect */ .ill-bar-button li:hover { color:#FFFFFF; background-color:#999999; border:#999999 solid 1px; padding:4px 8px 4px 8px; margin:2px; } /* rounded button corners */ .ill-bar-button-rounded li:hover { -webkit-border-radius:5px; -khtml-border-radius:5px; -moz-border-radius:5px; border-radius:5px; } /* default button's anchor text style */ .ill-bar-button li a:link, .ill-bar-button li a:visited { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#CCCCCC; text-decoration:none; } .ill-bar-button li a:hover { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#FFFFFF; text-decoration:none; } /*----- bar text container -----*/ .ill-bar-button div { float:left; } .ill-bar-button-right div { float:right; } .ill-bar-button div { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; color:#CCCCCC; padding:4px 8px 4px 8px; margin:4px 8px 4px 8px; border:#999999 solid 0px; } .ill-bar-button div a:link, .ill-bar-button div a:visited { color:#CCCCCC; text-decoration:none; } .ill-bar-button div a:hover { color:#FFFFFF; text-decoration:underline; } /*----- button tooltip -----*/ .ill-bar-button-tooltip { height:auto; padding:5px 10px 5px 10px; color:#FFFFFF; background-color:#36393D; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; }   and inserts for header   <div id="demo-bar"> <ul> <li alt="Home">[url="index.php"][img=icons/home.png][/url] [/list] <span class="ill-separator-left"></span> <ul> <li alt="Preferences">[url="preferences.php"][img=icons/information.png][/url] <li alt="inventory">[url="inventory.php"][img=icons/inventory.png][/url] <li alt="Avatars">[url="avatar.php"][img=icons/avatar_tiny.jpg][/url] <li alt="Chat">[url="chat.php"][img=icons/megaphone.gif][/url] [/list] <span class="ill-separator-left"></span> <ul class="ill-bar-button-left"> <li alt="Forums">[url="forums.php"][img=icons/forums.gif][/url] <li alt="Explore">[url="explore.php"][img=icons/explore.gif][/url] <li alt="NOT USED">[url=""][img=icons/notused.png][/url] <li alt="NOT USED">[url=""][img=icons/notused.png][/url] <li alt="NOT USED">[url=""][img=icons/notused.png][/url] [/list] <span class="ill-separator-left"></span> <div><li alt="Jail">[url="jail.php"]Jail [$jc][/url]<li alt="Hospital">[url="hospital.php"]Hospital [$hc][/url]<li alt="Profile">[url='viewuser.php?u={$ir[']Your Profile[/url]<li alt="Your Mail">[url="mailbox.php"]Mail [$mc][/url]<li alt="Your Events">[url="events.php"]Events [$ec][/url]</div> <span class="ill-separator-right"></span> <ul class="ill-bar-button-right"> <li alt="NOT USED">[url=""][img=icons/notused.png][/url] <li alt="NOT USED">[url=""][img=icons/notused.png][/url] [/list] <span class="ill-separator-right"></span> </div>
  18. I do own a test site i dont actually own a game though cant be bothered with owning one id never get any mods made lol http://www.mccode.doom-nights.com is a site given to me kindly by CrazyT but my FTP program just doesnt want to seem to send files to it.
  19. Ive placed a working copy on http://www.thisislondongame.com This isnt my game its just where im testing the mod for those using IE will see the problem but for those using Firefox should see it working perfectly as i dont have google chrome or opera and for those that do could you test it and tell me if the IE fault is also on either on the other browsers
  20. Once ive worked out the problem with IE not staying on the bottom i'll post but at minute IE is being a pain
  21. i your using the script for my houses then simply add this to your table House =
  22. Its being a pain Online for IE it starts at the bottom until you scroll then it doent move... Yet of FF its working fine and staying on the taskbar
  23. Ive managed to make a static bottom bar that will always stay at the bottom of your page this may come in handy for some people i'll take a screenie..
  24. 4thdesign silly question but are you testing this on localhost or on your website as GD cant be used on localhost However if the file cannot call for config.php then you will need to help it along the way.. Example on your stockchart.php remove include "config.php"; and replace with session_start(); $config = DIRNAME(__FILE__) . '/config.php'; if(file_exists($config)) { include_once($config); } else { die("The game is being updated, please check back in a few seconds"); } define('MONO_ON', 1); $class_mysql = DIRNAME(__FILE__) . '/class/class_db_mysql.php'; if(file_exists($class_mysql)) { include_once($class_mysql); } else { die("The game is being updated, please check back in a few seconds"); } $db = new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c = $db->connection_id; $q=mysql_query("SELECT * FROM users ORDER BY username ASC LIMIT 6",$c); $strData = '$data=array('; While ($r=mysql_fetch_array($q)) { $strData .= "\"" . $r['username'] . "\"" . ' => ' . $r['money'] . ','; } $strData .= ');'; eval($strData); global $db, $ir, $c;
  25. in your stock chart change include "mysql.php"; to include "config.php"; as mysql is for V1 and Config for V2
×
×
  • Create New...