-
Posts
2,667 -
Joined
-
Last visited
-
Days Won
75
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
[mccode v2] Point & Click a script that everyone here adds too..
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] Point & Click a script that everyone here adds too.. maybe this was a bit too tough for everyone ;) -
[mccode v2] Point & Click a script that everyone here adds too..
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] Point & Click a script that everyone here adds too.. Few helpful parts you may want to know your TEXT SECTION..... messages[0] = new Array('Stay Off the Grass','Examining Message',"#000000"); messages[1] = new Array('This gate needs a key','Unlock Gate',"#000000"); messages[2] = new Array('Quite stupid when theres a gate nearby','Climb Over Wall',"#000000"); when you add a new link the message should point to that link example WALK ON GRASS then you would add messages[3] = new Array('You were told not to walk on the Grass','Walking on Grass',"#000000"); and you link would be as follows <area shape="rect" alt="" coords="x,xxx,xxx,xxx" href="http://www.yourdomain.com/dungeonmission.php" onmouseover="doTooltip(event,3)" onmouseout="hideTip()" /> All we change is the EVENT tot event,3 -
Getting back to the imagemap idea i came up with this addition for your members.. The idea is i'll start you off with the script your job is to add to it and Post on here for everyone else to use,,, ok so here goes... call this file dungeonmission.php <?php include "globals.php"; $tresder=(int) rand(100,999); if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } ?> <html> <head> <title>Dungeon Mission </title> </head> <body> <script type="text/javascript"> /*********************************************** * Image w/ description tooltip- By Dynamic Web Coding ([url]www.dyn-web.com[/url]) * Copyright 2002-2007 by Sharon Paine * Visit Dynamic Drive at [url]http://www.dynamicdrive.com/[/url] for full source code ***********************************************/ /* IMPORTANT: Put script after tooltip div or put tooltip div just before </BODY>. */ var dom = (document.getElementById) ? true : false; var ns5 = (!document.all && dom || window.opera) ? true: false; var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false; var ie4 = (document.all && !dom) ? true : false; var nodyn = (!ns5 && !ie4 && !ie5 && !dom) ? true : false; var origWidth, origHeight; // avoid error of passing event object in older browsers if (nodyn) { event = "nope" } /////////////////////// CUSTOMIZE HERE //////////////////// // settings for tooltip // Do you want tip to move when mouse moves over link? var tipFollowMouse= true; // Be sure to set tipWidth wide enough for widest image var tipWidth= 160; var offX= 20; // how far from mouse to show tip var offY= 12; var tipFontFamily= "Verdana, arial, helvetica, sans-serif"; var tipFontSize= "8pt"; // set default text color and background color for tooltip here // individual tooltips can have their own (set in messages arrays) // but don't have to var tipFontColor= "#ffffff"; var tipBgColor= "#000000"; var tipBorderColor= "#000080"; var tipBorderWidth= 3; var tipBorderStyle= "ridge"; var tipPadding= 4; // tooltip content goes here (image, description, optional bgColor, optional textcolor) var messages = new Array(); // multi-dimensional arrays containing: // image and text for tooltip // optional: bgColor and color to be sent to tooltip messages[0] = new Array('Stay Off the Grass','Examining Message',"#000000"); messages[1] = new Array('This gate needs a key','Unlock Gate',"#000000"); messages[2] = new Array('Quite stupid when theres a gate nearby','Climb Over Wall',"#000000"); //////////////////// END OF CUSTOMIZATION AREA /////////////////// // preload images that are to appear in tooltip // from arrays above if (document.images) { var theImgs = new Array(); for (var i=0; i<messages.length; i++) { theImgs[i] = new Image(); theImgs[i].src = messages[i][0]; } } // to layout image and text, 2-row table, image centered in top cell // these go in var tip in doTooltip function // startStr goes before image, midStr goes between image and text var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%">'; var midStr = '</td></tr><tr><td valign="top">'; var endStr = '</td></tr></table>'; //////////////////////////////////////////////////////////// // initTip - initialization for tooltip. // Global variables for tooltip. // Set styles // Set up mousemove capture if tipFollowMouse set true. //////////////////////////////////////////////////////////// var tooltip, tipcss; function initTip() { if (nodyn) return; tooltip = (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null; tipcss = tooltip.style; if (ie4||ie5||ns5) { // ns4 would lose all this on rewrites tipcss.width = tipWidth+"px"; tipcss.fontFamily = tipFontFamily; tipcss.fontSize = tipFontSize; tipcss.color = tipFontColor; tipcss.backgroundColor = tipBgColor; tipcss.borderColor = tipBorderColor; tipcss.borderWidth = tipBorderWidth+"px"; tipcss.padding = tipPadding+"px"; tipcss.borderStyle = tipBorderStyle; } if (tooltip&&tipFollowMouse) { document.onmousemove = trackMouse; } } window.onload = initTip; ///////////////////////////////////////////////// // doTooltip function // Assembles content for tooltip and writes // it to tipDiv ///////////////////////////////////////////////// var t1,t2; // for setTimeouts var tipOn = false; // check if over tooltip link function doTooltip(evt,num) { if (!tooltip) return; if (t1) clearTimeout(t1); if (t2) clearTimeout(t2); tipOn = true; // set colors if included in messages array if (messages[num][2]) var curBgColor = messages[num][2]; else curBgColor = tipBgColor; if (messages[num][3]) var curFontColor = messages[num][3]; else curFontColor = tipFontColor; if (ie4||ie5||ns5) { var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr; tipcss.backgroundColor = curBgColor; tooltip.innerHTML = tip; } if (!tipFollowMouse) positionTip(evt); else t1=setTimeout("tipcss.visibility='visible'",100); } var mouseX, mouseY; function trackMouse(evt) { standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft; mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop; if (tipOn) positionTip(evt); } ///////////////////////////////////////////////////////////// // positionTip function // If tipFollowMouse set false, so trackMouse function // not being used, get position of mouseover event. // Calculations use mouseover event position, // offset amounts and tooltip width to position // tooltip within window. ///////////////////////////////////////////////////////////// function positionTip(evt) { if (!tipFollowMouse) { standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft; mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop; } // tooltip width and height var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth; var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight; // document area in view (subtract scrollbar width for ns) var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft; var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop; // check mouse position against tip and window dimensions // and position the tooltip if ((mouseX+offX+tpWd)>winWd) tipcss.left = mouseX-(tpWd+offX)+"px"; else tipcss.left = mouseX+offX+"px"; if ((mouseY+offY+tpHt)>winHt) tipcss.top = winHt-(tpHt+offY)+"px"; else tipcss.top = mouseY+offY+"px"; if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100); } function hideTip() { if (!tooltip) return; t2=setTimeout("tipcss.visibility='hidden'",100); tipOn = false; } document.write('<div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>') </script> <TD VALIGN=ABSTOP>[img=front_gates.jpg] <map id="front_gates" name="front_gates"> <area shape="rect" alt="" coords="207,397,245,417" href="http://www.yourdomain.com/dungeonmission.php" onmouseover="doTooltip(event,0)" onmouseout="hideTip()" /> <area shape="rect" alt="" coords="423,400,467,420" href="http://www.yourdomain.com/dungeonmission.php" onmouseover="doTooltip(event,0)" onmouseout="hideTip()" /> <area shape="rect" alt="" coords="314,320,345,375" href="http://www.yourdomain.com/dungeonmission.php" onmouseover="doTooltip(event,1)" onmouseout="hideTip()" /> <area shape="rect" alt="" coords="5,333,104,377" href="http://www.yourdomain.com/dungeonmission.php" onmouseover="doTooltip(event,2)" onmouseout="hideTip()" /> <area shape="default" nohref="nohref" alt="" /> </map> First Image The first state is that the gates need to be unlocked before anyone can start the game the key could be found in the streets.php and will open the gate for this section...
-
Re: [mccode v2] Farming you will find 159 { and 128 } That should give you somthing to start on
-
Re: [mccode v2] Farming error would be Parse error: syntax error, unexpected $end in /home/slave/public_html/farm.php on line 457
-
Re: [mccode v2] Fishing Mod have you guys heared of team speak ;)
-
[MOD] Audio Tracks lets users select from pre defined....
Uridium replied to Uridium's topic in Other Game Engines
Re: [MOD] Audio Tracks lets users select from pre defined.... forgot to mention upload your tracks to the music folder its instantly dislpayed as soon as its been uploaded So theres no need to edit the tracks.php file when uploading new tracks and no SQLS needed -
Downloaded this about an hour ago pretty nice engine :) So heres me first mod for it and probably plenty more... This will let you upload more audio tracks to a folder so your user can select a better atmospheric track... i did quite a bit of editing for this to work as i wasnt happy with the STOP/ START and not knowing whats playing next... create a new file call it tracks.php <?php include "config.php"; include_once 'include_lang.php'; ?> <object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab" width="240" height="43"> <param name="FileName" value="music/<?=$song;?>"> <param name="AutoStart" value="false"> <param name="ShowTracker" value="true"> <param name="ShowControls" value="true"> <param name="ShowGotoBar" value="false"> <param name="ShowDisplay" value="false"> <param name="ShowStatusBar" value="false"> <param name="AutoSize" value="false"> <param name="PlayCount" value="0"> <embed src="songs/<?=$song;?>" AutoStart="false" ShowTracker="true" ShowControls="true" PlayCount="0" ShowGotoBar="false" ShowDisplay="false" ShowStatusBar="false" AutoSize="false" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/" width="200" height="43"></embed> </object> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <select name="song"> <option value="#">Choose Atmosphere Track</option> <? $files = Array(); $path = "music"; $dh = opendir($path); while ($file = readdir($dh)) { if (!is_dir($path."/".$file)) { if (is_file($path."/".$file)) { if (($file!=".") && ($file!="..")) { $files[] = $file; } } } } closedir($dh); asort($files); foreach($files as $index=>$file) { echo "<option value=\"".$file."\">".$file."</option>\n"; } ?> </select> <input name="go" type="submit" value="PLAY!"> </form> <html> <head> <link href="styles/phaos.css" rel="stylesheet" type="text/css"> <iframe src="right_side.php" name="iframe985426" width="250px" height="800px" scrolling="auto" frameborder="0" align="right"></iframe> </head> Now open up menu.php and remove this section near bottom <? if(!@$play_music) {$play_music = 'NO';} if($play_music == "YES"){ if($song_select == "") {$song_select = rand(1,4);} if($song_select == 1) { ?> <embed SRC="music/homeland_farmland.mid" hidden="true" LOOP="true"> <? } elseif($song_select == 2) { ?> <embed SRC="music/under_the_bards_tree.mid" hidden="true" LOOP="true"> <? } elseif($song_select == 3) { ?> <embed SRC="music/stranger_on_a_hill.mid" hidden="true" LOOP="true"> <? } elseif($song_select == 4) { ?> <embed SRC="music/the_town_of_witchwoode.mid" hidden="true" LOOP="true"> <? } } ?> Now open up side_bar.php and remove this section [b]<? echo $lang_mus; ?>:[/b] [url="menu.php?play_music=YES"]<? echo $lang_plays; ?>[/url]   [url="menu.php?play_music=NO"]<? echo $lang_stop; ?>[/url] [url="clear_side_post.php"]<? echo $lang_ref; ?>[/url] </body> </html> Now open up index.php and change <frame name="right_side" src="right_side.php" scrolling=no> To <frame name="tracks" src="tracks.php" scrolling=no> Dont worry your right_side.php will still be called as its now in the tracks.php file as an iframe.. Thats it.
-
Re: [mccode v2] Fishing Mod Now why would you want to make Cash from it. None of the Freebie script on here are good enough to be made money from even the ones i do thats why ive always put mine up for Free.. Now if your going to make somthing like A whole new system where by YOU can name the Currency of the game and alter the name crystals to become wat ever you want. add more type of Characters otehr than member v NPCS then yeah that would be worth dipping into my pocket for.. But an easy way to make money gain exp or crystals from a {Paid mod is a pure waste of time.. Just my thoughts :)
-
[mccode v2] Freeze & Reactivate a Users Bank Account
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] V2 Freeze & Reactivate a Users Bank Account From the first post i missed a $frozen so heres the corrected piece Thanks to SAINT for pointing this out :) $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, frozen, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney) VALUES( '{$_POST['username']}', '{$_POST['login_name']}', md5('{$_POST['userpass']}'), $level, $money, $crystals, $frozen, $donator, $ulevel, $energy, $energy, 100, 100, $brave, $brave, $hp, $hp, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1)"); -
Re: [mccode v2] Golden Snitch not sure about these lines that have may be you meant to putusers $db->query("UPDATE usermoney SET money=money+100000000,crystal=crystal+125 WHERE userid=$userid",$c); +1 though :)
-
[mccode v2] Freeze & Reactivate a Users Bank Account
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] V2 Freeze & Reactivate a Users Bank Account Check your phpmyadmin 8 out of 10 its probably my table fields as i add them manually make sure that your USERS table under FROZEN is default 0 ALTER TABLE users ADD frozen INT(11) NOT NULL DEFAULT 0; It maybe my Alter table thats wrong -
[mccode v2] Freeze & Reactivate a Users Bank Account
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] V2 Freeze & Reactivate a Users Bank Account Has anyone Attempted to install this script yet ??? Would be nice to have some feed back from this one. so i could start a simililar process on others :) -
mccode-v2 streets.php includes image + ability to fight NPCS
Uridium replied to Uridium's topic in Free Modifications
Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS Can i just add for others so not to add any confusion The mention above of diamonds is not part of the streets script.. Was just trying to help someone out :) Cheeeeeeers All -
[mccode v2] Freeze & Reactivate a Users Bank Account
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] V2 Freeze & Reactivate a Users Bank Account Keep Track Of Frozen Users Accounts. open up global_func.php Just after <?php or <? Add function frozen_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE frozen=1 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } Now open up staff_users.php Find case 'newuser': new_user_form(); break'; Add above it case 'frozen' : check_frozen_accounts(); break; now find function new_user_form() And add above it.. function check_frozen_accounts() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Users Currently Frozen</h3> You can edit any aspect of this user. <form action='staff_users.php?action=edituserform' method='post'> User: ".frozen_dropdown($c,'user')." <input type='submit' value='Edit Frozen User' /></form>"; } Finally open smenu.php and add this to the users section > [url='staff_users.php?action=frozen']Frozen Accounts[/url] You can now keep track of all Users Whos accounts have been frozen -
[mccode v2] Freeze & Reactivate a Users Bank Account
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] V2 Freeze & Reactivate a Users Bank Account Small update to stop other members from sending money or crystals to a frozen account open up sendcash.php and sendcrys.php and add this after the print"globals.php"; $it=$db->query("SELECT frozen FROM users WHERE userid={$_GET['ID']}"); $ir=$db->fetch_row($it); if($ir['frozen']>0) die (" <h1>You can't transfer to someone whos Account has been frozen.</h1> [url='index.php']> Back[/url]"); This will disallow Transfers from Active members to thos that have frozen Accounts... Open up itemsell.php and imadd.php and add this before print"globals.php"; if($ir['frozen']>0) { die(" <h1>Sorry you cannot Add or Sell Items whilst your Account is Frozen</h1>"); } Will disallow those that are Frozen not to be able to add or sell Items..... -
[mccode v2] Freeze & Reactivate a Users Bank Account
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD] V2 Freeze & Reactivate a Users Bank Account The whole Idea of the Freeze Bank Accounts is so you dont have a massive list of fed jails. If a user has no money they cause no real threat + it acts like a judification system where by staff can invenstigate a members account without the member getting richer in the process. The only thing i have forgot and will do a piece for is members Inventory so they cant send items or cash to a person whos account is frozen.. Also for the user thats frosen their inventory will have Send to market. sell removed until an issue has been resolved. they will however stil be able to use and equip items... I noticed on the staff panel there wasnt an option for this and now there is it may prove useful. -
[mccode v2] Very simple travel time mod.
Uridium replied to shaved92bravada's topic in Free Modifications
Re: [mccode V2] Very simple travel time mod. Nice Work Shaved :) +10 from me matey :) -
Small mod Which enables Staff to Freeze a Users bank account if they have an Queries it can be reopened again whn satisfied.. SQL ALTER TABLE users ADD frozen INT(11) NOT NULL DEFAULT 0; Now open up Staff_users.php find Donator Days: <input type='text' name='donatordays' value='0' /> Underneeath add. Freeze Bank: <input type='text' name='frozen' value='0' /> Next Find $donator=abs((int) $_POST['donatordays']); Underneath Add $frozen=abs((int) $_POST['frozen']); Then Find $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney) VALUES( '{$_POST['username']}', '{$_POST['login_name']}', md5('{$_POST['userpass']}'), $level, $money, $crystals, $donator, $ulevel, $energy, $energy, 100, 100, $brave, $brave, $hp, $hp, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1)"); Overwrite with.. $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, frozen, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney) VALUES( '{$_POST['username']}', '{$_POST['login_name']}', md5('{$_POST['userpass']}'), $level, $money, $crystals, $donator, $ulevel, $energy, $energy, 100, 100, $brave, $brave, $hp, $hp, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1)"); Then Find Crystals: <input type='text' name='crystals' value='{$itemi['crystals']}' /> Underneath Add Bank Frozen: <input type='text' name='frozen' value='{$itemi['frozen']}' /> Then Find $_POST['crystals']=(int) $_POST['crystals']; Undernath Add $_POST['frozen']=(int) $_POST['frozen']; Now open Up bank.php And just under include"globals.php"; add if($ir['frozen']>0) { die("Your Bank Account has Been frozen please contact a member of staff"); } When you Edit a User to Freeze a Bank account 0=Active and 1=Frozen..... Small NOTE the addon to the bank.php can also be added to any market scripts or crystal banks that you have in your game it will do the same Task as putting it into the bank script.
-
Re: [mccode v2] Add images when you attack Ive used the same procedure with everyone else and theres has worked fine. If you looking at me to do everything for you why dont i just build your site for you.. My scripts are easy to follow and i give enough Guideance for its install so it works first time. Retrace your steps and look through what could be missing. The last person i helped with their site not just the pics mod but helped to rectify errors on other scripts on their site. They sold it 2 days after. So from now on if you cant install my scripts then give as much info as possible as to what you have done and i will help that way....
-
Re: [MOD all MCC's] LET IT SNOW Part 2 of 2 Now open up your header.php and add this preferably before your TOP LOGO so its easier to find.. print"[url='javascript:snowStorm.randomizeWind()']Change Wind[/url] [url='javascript:snowStorm.stop()']Stop Snowing[/url] "; On the same File place this where the HTML part starts... <script type="text/javascript" src="script/snowstorm.js"></script> Notice this bit script/snowstorm.js well if you placed the JS in your root then remove the script/ so its just snowstorm.js http://www.slave-traders.net/image.zip << your image folder to upload with added images And upload these images just send the whole folder called image to your FTP And there you have it
-
Re: [MOD all MCC's] LET IT SNOW Heres one that will change snow direction and will also allow your members to Turn the snow off if it gets too much ( now come on its christmas why stop the snow lol ) Script taken from Scott Schiller create a folder on your FTP called script or you can put it in root but will need a change if you do. Call this file snowstorm.js this file goes into the script Folder /* DHTML PNG Snowstorm! OO-style Jascript-based Snow effect -------------------------------------------------------- Version 1.2.20041121a Dependencies: GIF/PNG images (0 through 4.gif/png) Code by Scott Schiller - [url]www.schillmania.com[/url] -------------------------------------------------------- Description: Initializes after body onload() by default (via addEventHandler() call at bottom.) Properties: usePNG --------------- Enables PNG images if supported ("false" disables all PNG usage) flakeTypes --------------- Sets the range of flake images to use (eg. a value of 5 will use images ranging from 0.png to 4.png.) flakesMax --------------- Sets the maximum number of snowflakes that can exist on the screen at any given time. flakesMaxActive --------------- Sets the limit of "falling" snowflakes (ie. moving, thus considered to be "active".) vMax --------------- Defines the maximum X and Y velocities for the storm. A range up to this value is selected at random. flakeWidth --------------- The width (in pixels) of each snowflake image. flakeHeight --------------- Height (pixels) of each snowflake image. flakeBottom --------------- Limits the "bottom" coordinate of the snow. snowCollect --------------- Enables snow to pile up (slowly) at bottom of window. Can be very CPU/resource-intensive over time. */ var snowStorm = null; function SnowStorm() { var s = this; var storm = this; this.timers = []; this.flakes = []; this.disabled = false; this.terrain = []; // User-configurable variables // --------------------------- var usePNG = true; var imagePath = 'image/snow/'; // relative path to snow images var flakeTypes = 6; var flakesMax = 128; var flakesMaxActive = 64; var vMax = 2.5; var flakeWidth = 5; var flakeHeight = 5; var flakeBottom = null; // Integer for fixed bottom, 0 or null for "full-screen" snow effect var snowCollect = true; var showStatus = true; // --- End of user section --- var isIE = (navigator.appName.toLowerCase().indexOf('internet explorer')+1); var isWin9X = (navigator.appVersion.toLowerCase().indexOf('windows 98')+1); var isOpera = (navigator.userAgent.toLowerCase().indexOf('opera ')+1 || navigator.userAgent.toLowerCase().indexOf('opera/')+1); if (isOpera) isIE = false; // Opera (which is sneaky, pretending to be IE by default) var screenX = null; var screenY = null; var scrollY = null; var vRndX = null; var vRndY = null; function rnd(n,min) { if (isNaN(min)) min = 0; return (Math.random()*n)+min; } this.randomizeWind = function() { vRndX = plusMinus(rnd(vMax,0.2)); vRndY = rnd(vMax,0.2); if (this.flakes) { for (var i=0; i<this.flakes.length; i++) { if (this.flakes[i].active) this.flakes[i].setVelocities(); } } } function plusMinus(n) { return (parseInt(rnd(2))==1?n*-1:n); } this.resizeHandler = function() { if (window.innerWidth || window.innerHeight) { screenX = window.innerWidth-(!isIE?24:2); screenY = (flakeBottom?flakeBottom:window.innerHeight); } else { screenX = (document.documentElement.clientWidth||document.body.clientWidth||document.body.scrollWidth)-(!isIE?8:0); screenY = flakeBottom?flakeBottom:(document.documentElement.clientHeight||document.body.clientHeight||document.body.scrollHeight); } s.scrollHandler(); } this.scrollHandler = function() { // "attach" snowflakes to bottom of window if no absolute bottom value was given scrollY = (flakeBottom?0:parseInt(window.scrollY||document.documentElement.scrollTop||document.body.scrollTop)); if (isNaN(scrollY)) scrollY = 0; // Netscape 6 scroll fix if (!flakeBottom && s.flakes) { for (var i=0; i<s.flakes.length; i++) { if (s.flakes[i].active == 0) s.flakes[i].stick(); } } } this.freeze = function() { // pause animation if (!s.disabled) { s.disabled = 1; } else { return false; } if (!isWin9X) { clearInterval(s.timers); } else { for (var i=0; i<s.timers.length; i++) { clearInterval(s.timers[i]); } } } this.resume = function() { if (s.disabled) { s.disabled = 0; } else { return false; } s.timerInit(); } this.stop = function() { this.freeze(); for (var i=0; i<this.flakes.length; i++) { this.flakes[i].o.style.display = 'none'; } removeEventHandler(window,'scroll',this.scrollHandler,false); removeEventHandler(window,'resize',this.resizeHandler,false); } this.SnowFlake = function(parent,type,x,y) { var s = this; var storm = parent; this.type = type; this.x = x||parseInt(rnd(screenX-12)); this.y = (!isNaN(y)?y:-12); this.vX = null; this.vY = null; this.vAmpTypes = [2.0,1.0,1.25,1.0,1.5,1.75]; // "amplification" for vX/vY (based on flake size/type) this.vAmp = this.vAmpTypes[this.type]; this.active = 1; this.o = document.createElement('img'); this.o.style.position = 'absolute'; this.o.style.width = flakeWidth+'px'; this.o.style.height = flakeHeight+'px'; this.o.style.fontSize = '1px'; // so IE keeps proper size this.o.style.zIndex = 2; this.o.src = imagePath+this.type+(pngHandler.supported && usePNG?'.png':'.gif'); document.body.appendChild(this.o); if (pngHandler.supported && usePNG) pngHandler.transform(this.o); this.refresh = function() { this.o.style.left = this.x+'px'; this.o.style.top = this.y+'px'; } this.stick = function() { s.o.style.top = (screenY+scrollY-flakeHeight-storm.terrain[Math.floor(this.x)])+'px'; // called after relative left has been called } this.vCheck = function() { if (this.vX>=0 && this.vX<0.2) { this.vX = 0.2; } else if (this.vX<0 && this.vX>-0.2) { this.vX = -0.2; } if (this.vY>=0 && this.vY<0.2) { this.vY = 0.2; } } this.move = function() { this.x += this.vX; this.y += (this.vY*this.vAmp); this.refresh(); if (this.vX && screenX-this.x<flakeWidth+this.vX) { // X-axis scroll check this.x = 0; } else if (this.vX<0 && this.x<0-flakeWidth) { this.x = screenX-flakeWidth; // flakeWidth; } var yDiff = screenY+scrollY-this.y-storm.terrain[Math.floor(this.x)]; if (yDiff<flakeHeight) { this.active = 0; if (snowCollect) { var height = [0.75,1.5,0.75]; for (var i=0; i<2; i++) { storm.terrain[Math.floor(this.x)+i+2] += height[i]; } } this.o.style.left = ((this.x-(!isIE?flakeWidth:0))/screenX*100)+'%'; // set "relative" left (change with resize) if (!flakeBottom) { this.stick(); } } } this.animate = function() { // main animation loop // move, check status, die etc. this.move(); } this.setVelocities = function() { this.vX = vRndX+rnd(vMax*0.12,0.1); this.vY = vRndY+rnd(vMax*0.12,0.1); } this.recycle = function() { this.setVelocities(); this.vCheck(); this.x = parseInt(rnd(screenX-flakeWidth-1)); this.y = parseInt(rnd(640)*-1)-flakeHeight; this.active = 1; } this.recycle(); // set up x/y coords etc. this.refresh(); } this.snow = function() { var active = 0; var used = 0; var waiting = 0; for (var i=this.flakes.length-1; i>0; i--) { if (this.flakes[i].active == 1) { this.flakes[i].animate(); active++; } else if (this.flakes[i].active == 0) { used++; } else { waiting++; } } if (snowCollect && !waiting) { // !active && !waiting // create another batch of snow this.createSnow(flakesMaxActive,true); } if (active<flakesMaxActive) { with (this.flakes[parseInt(rnd(this.flakes.length))]) { if (!snowCollect && active == 0) { recycle(); } else if (active == -1) { active = 1; } } } } this.createSnow = function(limit,allowInactive) { if (showStatus) window.status = 'Creating snow...'; for (var i=0; i<limit; i++) { this.flakes[this.flakes.length] = new this.SnowFlake(this,parseInt(rnd(flakeTypes))); if (allowInactive || i>flakesMaxActive) this.flakes[this.flakes.length-1].active = -1; } if (showStatus) window.status = ''; } this.timerInit = function() { this.timers = (!isWin9X?setInterval("snowStorm.snow()",20):[setInterval("snowStorm.snow()",75),setInterval("snowStorm.snow()",25)]); } this.init = function() { for (var i=0; i<8192; i++) { this.terrain[i] = 0; } this.randomizeWind(); this.createSnow(snowCollect?flakesMaxActive:flakesMaxActive*2); // create initial batch addEventHandler(window,'resize',this.resizeHandler,false); addEventHandler(window,'scroll',this.scrollHandler,false); // addEventHandler(window,'scroll',this.resume,false); // scroll does not cause window focus. (odd) // addEventHandler(window,'blur',this.freeze,false); // addEventHandler(window,'focus',this.resume,false); this.timerInit(); } this.resizeHandler(); // get screen coordinates if (screenX && screenY && !this.disabled) { this.init(); } } function snowStormInit() { setTimeout("snowStorm = new SnowStorm()",500); } // Generic addEventHandler() wrapper // --------------------------------- // A generic interface for adding DOM event handlers // Version 1.2.20040404 // // Code by Scott Schiller | schillmania.com // // Revision history: // --------------------------------- // v1.1.20031218: initial deploy // v1.2.20040404: added post-load event check var addEventHandler = null; var removeEventHandler = null; function postLoadEvent(eventType) { // test for adding an event to the body (which has already loaded) - if so, fire immediately return ((eventType.toLowerCase().indexOf('load')>=0) && document.body); } function addEventHandlerDOM(o,eventType,eventHandler,eventBubble) { if (!postLoadEvent(eventType)) { o.addEventListener(eventType,eventHandler,eventBubble); } else { eventHandler(); } } function removeEventHandlerDOM(o,eventType,eventHandler,eventBubble) { o.removeEventListener(eventType,eventHandler,eventBubble); } function addEventHandlerIE(o,eventType,eventHandler) { // IE workaround if (!eventType.indexOf('on')+1) eventType = 'on'+eventType; if (!postLoadEvent(eventType)) { o.attachEvent(eventType,eventHandler); // Note addition of "on" to event type } else { eventHandler(); } } function removeEventHandlerIE(o,eventType,eventHandler) { if (!eventType.indexOf('on')+1) eventType = 'on'+eventType; o.detachEvent(eventType,eventHandler); } function addEventHandlerOpera(o,eventType,eventHandler,eventBubble) { if (!postLoadEvent(eventType)) { (o==window?document:o).addEventListener(eventType,eventHandler,eventBubble); } else { eventHandler(); } } function removeEventHandlerOpera(o,eventType,eventHandler,eventBubble) { (o==window?document:o).removeEventListener(eventType,eventHandler,eventBubble); } if (navigator.userAgent.toLowerCase().indexOf('opera ')+1 || navigator.userAgent.toLowerCase().indexOf('opera/')+1) { // opera is dumb at times. addEventHandler = addEventHandlerOpera; removeEventHandler = removeEventHandlerOpera; } else if (document.addEventListener) { // DOM event handler method addEventHandler = addEventHandlerDOM; removeEventHandler = removeEventHandlerDOM; } else if (document.attachEvent) { // IE event handler method addEventHandler = addEventHandlerIE; removeEventHandler = removeEventHandlerIE; } else { // Neither "DOM level 2" (?) methods supported addEventHandler = function(o,eventType,eventHandler,eventBubble) { o['on'+eventType] = eventHandler; // Multiple events could be added here via array etc. } removeEventHandler = function(o,eventType,eventHandler,eventBubble) {} } // Safari 1.0 does not support window.scroll events - apparently netscape 6.0/6.2 and mozilla 1.4 also. // Refer to events support table at [url]http://www.quirksmode.org/js/events_compinfo.html[/url] // -- end addEventHandler definition -- /* PNGHandler: Object-Oriented Javascript-based PNG wrapper -------------------------------------------------------- Version 1.2.20040803 Code by Scott Schiller - [url]www.schillmania.com[/url] -------------------------------------------------------- Description: Provides gracefully-degrading PNG functionality where PNG is supported natively or via filters (Damn you, IE!) Should work with PNGs as images and DIV background images. -------------------------------------------------------- Revision history -------------------------------------------------------- 1.2 - Added refresh() for changing PNG images under IE - Class extension: "scale" causes PNG to scale under IE -------------------------------------------------------- Known bugs -------------------------------------------------------- - ie:mac doesn't support PNG background images. - Safari doesn't support currentStyle() - can't parse BG via CSS (ie. for a DIV with a PNG background by class) */ function PNGHandler() { var self = this; this.na = navigator.appName.toLowerCase(); this.nv = navigator.appVersion.toLowerCase(); this.isIE = this.na.indexOf('internet explorer')+1?1:0; this.isWin = this.nv.indexOf('windows')+1?1:0; this.isIEMac = (this.isIE&&!this.isWin); this.isIEWin = (this.isIE&&this.isWin); this.ver = this.isIE?parseFloat(this.nv.split('msie ')[1]):parseFloat(this.nv); this.isMac = this.nv.indexOf('mac')+1?1:0; this.isOpera = (navigator.userAgent.toLowerCase().indexOf('opera ')+1 || navigator.userAgent.toLowerCase().indexOf('opera/')+1); if (this.isOpera) this.isIE = false; // Opera filter catch (which is sneaky, pretending to be IE by default) this.filterID = 'DXImageTransform.Microsoft.AlphaImageLoader'; this.supported = false; this.transform = self.doNothing; this.filterMethod = function(o) { // IE 5.5+ proprietary filter garbage (boo!) // Create new element based on old one. Doesn't seem to render properly otherwise (due to filter?) // use DOM "currentStyle" method, so rules inherited via CSS are picked up. if (o.nodeName != 'IMG') { var b = o.currentStyle.backgroundImage.toString(); // parse out background image URL o.style.backgroundImage = 'none'; // Parse out background image URL from currentStyle. var i1 = b.indexOf('url("')+5; var newSrc = b.substr(i1,b.length-i1-2).replace('.gif','.png'); // find first instance of ") after (", chop from string o.style.writingMode = 'lr-tb'; // Has to be applied so filter "has layout" and is displayed. Seriously. Refer to [url]http://msdn.microsoft.com/workshop/author/filter/reference/filters/alphaimageloader.asp?frame=true[/url] o.style.filter = "progid:"+self.filterID+"(src='"+newSrc+"',sizingMethod='"+(o.className.indexOf('scale')+1?'scale':'crop')+"')"; } else if (o.nodeName == 'IMG') { var newSrc = o.getAttribute('src').replace('.gif','.png'); // apply filter o.src = 'image/none.gif'; // get rid of image o.style.filter = "progid:"+self.filterID+"(src='"+newSrc+"',sizingMethod="+(o.className.indexOf('scale')+1?'scale':'crop')+"')"; o.style.writingMode = 'lr-tb'; // Has to be applied so filter "has layout" and is displayed. Seriously. Refer to [url]http://msdn.microsoft.com/workshop/author/filter/reference/filters/alphaimageloader.asp?frame=true[/url] } } this.pngMethod = function(o) { // Native transparency support. Easy to implement. (woo!) bgImage = this.getBackgroundImage(o); if (bgImage) { // set background image, replacing .gif o.style.backgroundImage = 'url('+bgImage.replace('.gif','.png')+')'; } else if (o.nodeName == 'IMG') { o.src = o.src.replace('.gif','.png'); } else if (!bgImage) { // no background image } } this.getBackgroundImage = function(o) { var b, i1; // background-related variables var bgUrl = null; if (o.nodeName != 'IMG' && !(this.isIE && this.isMac)) { // ie:mac PNG support broken for DIVs with PNG backgrounds if (document.defaultView) { if (document.defaultView.getComputedStyle) { b = document.defaultView.getComputedStyle(o,'').getPropertyValue('background-image'); i1 = b.indexOf('url(')+4; bgUrl = b.substr(i1,b.length-i1-1); } else { // no computed style return false; } } else { // no default view return false; } } return bgUrl; } this.doNothing = function() {} this.supportTest = function() { // Determine method to use. // IE 5.5+/win32: filter if (this.isIE && this.isWin && this.ver >= 5.5) { // IE proprietary filter method (via DXFilter) self.transform = self.filterMethod; } else if (!this.isIE && this.ver < 5) { // No PNG support or broken support // Leave existing content as-is self.transform = null; return false; } else if (!this.isIE && this.ver >= 5 || (this.isIE && this.isMac && this.ver >= 5)) { // version 5+ browser (not IE), or IE:mac 5+ self.transform = self.pngMethod; } else { // Presumably no PNG support. GIF used instead. self.transform = null; return false; } return true; } this.init = function() { this.supported = this.supportTest(); } } function getElementsByClassName(className,oParent) { var doc = (oParent||document); var matches = []; var nodes = doc.all||doc.getElementsByTagName('*'); for (var i=0; i<nodes.length; i++) { if (nodes[i].className == className || nodes[i].className.indexOf(className)+1 || nodes[i].className.indexOf(className+' ')+1 || nodes[i].className.indexOf(' '+className)+1) { matches[matches.length] = nodes[i]; } } return matches; // kids, don't play with fire. ;) } // Instantiate and initialize PNG Handler var pngHandler = new PNGHandler(); pngHandler.init(); addEventHandler(window,'load',snowStormInit,false); Part 1 of 2
-
Re: [MOD all MCC's] LET IT SNOW yep thats quite true ive given you the basics its up to you to create something from it.. May i suggest Javascript :)
-
Add this code to any page you want it to snow....... print"<marquee behavior='scroll' direction='down' scrollamount='3' style='position:absolute; left:120; top:50; width:25; height:450; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='4' style='position:absolute; left:170; top:70; width:25; height:300; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='5' style='position:absolute;left:220; top:90; width:25; height:250; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='6' style='position:absolute; left:270; top:30; width:25; height:370; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='7' style='position:absolute; left:320; top:30; width:25; height:340; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='2' style='position:absolute; left:240; top:30; width:25; height:70; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='3' style='position:absolute; left:250; top:30; width:25; height:50; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='2' style='position:absolute; left:290; top:30; width:25; height:60; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='3' style='position:absolute; left:100;top:130; width:25;height:80; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='2' style='position:absolute; left:360; top:30; width:25; height:330; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='3' style='position:absolute; left:390; top:50;width:25; height:400; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='4' style='position:absolute; left:440; top:70; width:25; height:300; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='2' style='position:absolute; left:470;top:100; width:25; height:300; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='4' style='position:absolute; left:560; top:70; width:25; height:300; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='2' style='position:absolute; left:590; top:100; width:25; height:300; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='4' style='position:absolute; left:520; top:170; width:25; height:300; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='2' style='position:absolute; left:610; top:200; width:25; height:300; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='3' style='position:absolute; left:650; top:250; width:25; height:340; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='2' style='position:absolute; left:690; top:290; width:25; height:380;..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee> <marquee behavior='scroll' direction='down' scrollamount='3' style='position:absolute; left:660; top:40; width:25; height:70; ..;'> [img=http://www.yourwebsite.com/images/snow.gif]</marquee>"; Upload the snow.gif image to your Images folder... and watch it snow ;)
-
[mccode] A better Safer Forum for your members to enjoy
Uridium replied to Uridium's topic in Free Modifications
Re: [MOD Mcc V1 + V2] A better Safer Forum for your members to enjoy For those that are having problems getting the Iframe to fit then use this one it will add Scrollbars to Bottom and Side <?php include "globals.php"; echo " <iframe src='http://www.yourwebsiteurl.com/forum/' scrolling='yes' allowtransparency='true' frameborder='0' scrolling='no' width='100%' height='1500' style='border: 0px solid #000000;'></iframe>"; $h->endpage(); ?> you can change the width and zie to suit your site..