-
Posts
2,657 -
Joined
-
Last visited
-
Days Won
74
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
didnt anyone notice this error :) change $hard = mt_rand(0,3); // 1:3 chance of hard outcome, change this for each differnt ore to $hard = mt_rand(1,3); // 1:3 chance of hard outcome, change this for each differnt ore As 0 will display a blank message
-
[MCCODES V2] Fully Customise your game layout
Uridium replied to Uridium's topic in Free Modifications
damn feb 2009 when i wrote this even i cant remember half of it lol -
[MCCODES V2] Fully Customise your game layout
Uridium replied to Uridium's topic in Free Modifications
ddnate which page are you getting this from is it from the installer ? -
Nicely done :)
-
heres a few: 1 = Christmas cracker as an Item pull with someone on your friendslist to get cash or an item 2 = Santas stocking users put one of their own items into the stocking each day on 25th stocking selects one winner who gets all items from it. 3 = Throw a mince pie at the users in jail..
-
He was a fine actor for those that ever saw Airplane or the naked Gun films will be sadley missed theres not many people that have his wit
-
iz ya dissing me whiting pappa smurf ;) oops lol
-
When i had my test site the site itself was in a folder called games id been working on it for months making new mods. then had a brain dead moment and sent a folder from pc to ftp called games without thinking it said are you sure so me being half dead said Yep go ahead turns out the Games inside the folder were zx spectrum games and not the files i wanted to upload. so yep lost everything.
-
this is for those who have many styles of style sheets in their game... Themes are always nice to have but if the CSS was large in style.css and you wanted to make more then usually youd need to add more CSS files with nearly the same data as style.css so heres a way to cheat.. always have style.css as your main stylesheet.. and to add more simple do this create a new css and add @import "style.css" ; body { background: #d6d8cb url(images/Halloween3.jpg) repeat top center fixed; } A:link {text-decoration: none; color: #000000; font-size: 28;} A:visited {text-decoration: none; color: #000000; font-size: 28;} A:active {text-decoration: none; color: #000000; font-size: 28;} A:hover {text-decoration: underline; color: #bdebde; font-size: 28;} The @import will auto select style.css as its main source but you can now add new elements to the newly created css whilst still keepig data from the style.css
-
Dibuk just make the Image change colour if they have a new email no need for text then
-
By this i mean if there is a Problem on any pages it can be closed from admin panel instead of having to edit files send back to FTP then edit files again and resend when page has been fixed... A simple dbase with with page names and switches could do this.... Granted each file would also need the IF statement...... but get it donw now whilst its still new then when we add pages it wont be as much of a hassle later...
-
in your users table create a new field called character. This then gets complicated cos you will need people at signup to be classed as vampire or Werewolf when they join.. Then in your school table add visibleto as a varchar so it knows wether its a vampire or werewolf that will be taking the course..
-
Taking the structure of v2 id like to see these implemented into the v3 version... 1 = Account Logs. An updated system that will Log everything a user does in the game from buying selling training ip conflicts 2 = An easy to use version that can be adapted for mobile phone use at the click of a button. 3 = A better system as to not keep showing DIE pages 4 = An updated system that from the admin page a new Mod can be added easily and set up once script it uploaded... 5 = Pages that can be controled from admin panel to be closed or opened when needed...
-
Loads of helpful advice here but the one thing everyone here forgot to mention is How to hack it in the first place.. before you learn security you need to understand how it got hacked in the first place so my suggestion would be learn to hack and find vulnerabilities in your script then you can understand how to fix them..
-
This small mod will allow your users to view your online Facebook and Twitter entries open announcements.php and add this near bottom before the closing php tag. echo "<table style=\"margin: 0 auto 0 auto; padding: 5px; align:center;\"><tr><td><script src=\"http://widgets.twimg.com/j/2/widget.js\"></script> <script> new TWTR.Widget({ version: 2, type: 'profile', rpp: 23, interval: 6000, width: '250', height: 198, theme: { shell: { background: '#333333', color: '#ffffff' }, tweets: { background: '#000000', color: '#ffffff', links: '#4aed05' } }, features: { scrollbar: true, loop: false, live: true, hashtags: true, timestamp: true, avatars: false, behavior: 'all' } }).render().setUser('TWITTER GROUP NAME').start(); </script></td><td><iframe src=\"http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FGROUPNAME%2FGROUPID%3Fv%3Dwall%26ref%3Dts&width=250&connections=15&stream=false&header=true&height=287\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:250px; height:287px;\" allowTransparency=\"true\"></iframe></td></tr></table>"; KEY: TWITTER GROUP NAME@ is your twitter groups name pn the facebook entry change GROUPNAME to match your FACEBOOK GROUPNAME and GROUPID to match the GROUPS ID and thats it..
-
hey anychance of a freebie copy for making mods with ;) lol
-
There will be an addition to this script so staff can view accept or isloate the User will start work on this later
-
Just a few question what will be the major differences script wise from v2 - v3 and can v2 be easily adapted to work with v3
-
Someone asked me earlier to write a script to block multiple Accounts but to also allows same accounts if in the same household there are many scripts that will do this like email validation but that doesnt always catch people out. and as I did them for Free only only fair I share with you.. SQLS first off [mysql]CREATE TABLE IF NOT EXISTS `multis` ( `userid` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) NOT NULL DEFAULT '', `login_name` varchar(255) NOT NULL, `userpass` varchar(255) NOT NULL DEFAULT '', `uncoded` varchar(255) NOT NULL DEFAULT '', `gender` enum('Male','Female') NOT NULL DEFAULT 'Male', `signedup` int(11) NOT NULL DEFAULT '0', `email` varchar(255) NOT NULL DEFAULT '', `lastip` varchar(255) NOT NULL DEFAULT '', `lastip_signup` varchar(255) NOT NULL DEFAULT '127.0.0.1', `frozen` varchar(3) NOT NULL DEFAULT 'no', PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; [/mysql] Now open up global_func.php and add this. function usermulti_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM multis WHERE frozen = 'no' 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 for the staff section.. <?php include "sglobals.php"; //freeze or accept multiuser account illusions nov 2010 switch($_GET['action']) { case 'accept': find_user(); break; case 'newuser': new_user_form(); break; case 'newusersub': new_user_submit(); break; case 'freeze': deny_user_start(); break; case 'killaccount': kill_user_account(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function find_user() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Accepting User</h3> You are about to Accept a Multiuser. <form action='staff_multiaccept.php?action=newuser' method='post'> User: ".usermulti_dropdown($c,'user')." <input type='submit' value='Accept User' /></form> OR enter a user ID to Accept: <form action='staff_multiaccept.php?action=newuser' method='post'> User: <input type='text' name='user' value='0' /> <input type='submit' value='Accept User' /></form>"; } function new_user_form() { global $db,$ir, $c, $r; if($ir['user_level'] != 2) { die("403"); } $find=$db->query("SELECT * FROM multis WHERE userid=''"); $chance=$db->fetch_row($find); if ($chance == $find) { print"<center><font size=+2>NO DATA TO BE freezeD</font></center> [[url='staff_multiaccept.php?action=accept'] RETURN [/url]]"; die(); } $d=$db->query("SELECT * FROM multis WHERE userid={$_POST['user']}"); $itemi=$db->fetch_row($d); print "Accepting a Multi user. <form action='staff_multiaccept.php?action=newusersub' method='post'> Username: <input type='text' name='username' value='{$itemi['username']}'/> Login Name: <input type='text' name='login_name' value='{$itemi['login_name']}'/> Email: <input type='text' name='email' value='{$itemi['email']}'/> Password: <input type='text' name='userpass' value='{$itemi['uncoded']}'/> Signed Up: <input type='text' name='userpass' value='{$itemi['signedup']}'/> Last IP: <input type='text' name='userpass' value='{$itemi['lastip']}'/> Signup Last: <input type='text' name='userpass' value='{$itemi['lastip_signup']}'/> Type: <input type='radio' name='user_level' value='0' />NPC <input type='radio' name='user_level' value='1' checked='checked' />Regular Member Level: <input type='text' name='level' value='1' /> Money: <input type='text' name='money' value='100' /> Crystals: <input type='text' name='crystals' value='0' /> Donator Days: <input type='text' name='donatordays' value='0' /> Gender: <input type='text' name='gender' value='{$itemi['gender']}'/> [b]Stats[/b] Strength: <input type='text' name='strength' value='10' /> Agility: <input type='text' name='agility' value='10' /> Guard: <input type='text' name='guard' value='10' /> Labour: <input type='text' name='labour' value='10' /> IQ: <input type='text' name='labour' value='10' /> <input type='submit' value='Create User' /></form> [[url='staff_multiaccept.php?action=freeze'] Freeze User Account [/url]]"; } function new_user_submit() { global $db,$ir,$c,$userid; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['username']) || !isset($_POST['login_name']) || !isset($_POST['userpass'])) { print "You missed one or more of the required fields. Please go back and try again. [url='admin.php?action=newuser']> Back[/url]"; $h->endpage(); exit; } $level=abs((int) $_POST['level']); $money=abs((int) $_POST['money']); $crystals=abs((int) $_POST['crystals']); $donator=abs((int) $_POST['donatordays']); $ulevel=abs((int) $_POST['user_level']); $strength=abs((int) $_POST['strength']); $agility=abs((int) $_POST['agility']); $guard=abs((int) $_POST['guard']); $labour=abs((int) $_POST['labour']); $signedup=abs((int) $_POST['signedup']); $lastip=abs((int) $_POST['lastip']); $lastip_signup=abs((int) $_POST['lastip_signup']); $iq=abs((int) $_POST['iq']); $energy=10+$level*2; $brave=3+$level*2; $hp=50+$level*50; $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, $signedup, $lastip, $lastip_signup 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1)"); $i=mysql_insert_id($c); $db->query("INSERT INTO userstats VALUES($i, $strength, $agility, $guard, $labour, $iq)"); print "User created!"; stafflog_add("Created user {$_POST['username']} [$i]"); } function deny_user_start() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Freezing a Multi users account</h3> You are about to Freeze a Multiuser Account. <form action='staff_multiaccept.php?action=killaccount' method='post'> User: ".usermulti_dropdown($c,'user')." <input type='submit' value='Freeze Account' /></form> OR enter a user ID to Freeze: <form action='staff_multiaccept.php?action=killaccount' method='post'> User: <input type='text' name='user' value='0' /> <input type='submit' value='Freeze Account' /></form>"; } function kill_user_account() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $d=$db->query("SELECT * FROM multis WHERE userid={$_POST['user']}"); $db->query("UPDATE multis SET frozen = 'yes' WHERE userid={$_POST['user']}"); $freezeit=$db->fetch_row($d); print "User {$freezeit['username']} account has been frozen!"; } ?> add a few links to smenu.php [url='staff_multiaccept.php?action=accept'] Accept a Multiuser[/url] [url='staff_multiaccept.php?action=freeze'] Freeze a Multiuser[/url] now open up register.php and find $q2=$db->query("SELECT * FROM users WHERE email='{$_POST['email']}'"); Underneathe add $q3=$db->query("SELECT lastip, lastip_signup FROM users"); Now find print "E-Mail already in use. Choose another. >Back"; } and OVERWRITE with this.. print "E-Mail already in use. If your the Owner why not just login >[url='login.php']Back[/url]"; $db->query("INSERT INTO multis (username, login_name, userpass, uncoded, gender, signedup, email, lastip, lastip_signup, frozen) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), '{$_POST['password']}', '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', '$IP', '$IP', 'no')"); die(); } else if($db->num_rows($q3)) { print "This IP has already been used to signup. >[url='login.php']Back[/url]"; $db->query("INSERT INTO multis (username, login_name, userpass, uncoded, gender, signedup, email, lastip, lastip_signup, frozen) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), '{$_POST['password']}', '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', '$IP', '$IP', 'no')"); die(); } Now you can Accept or Freeze Multis
-
I gotta say things seem to be better i actually cam on MWG the other day wanting to make a mod, havent had that spark for a while so things are looking up :)
-
I use the original shops.php file. When i replace with this code it says "this shop dont exsist" I also use just links in explore for the shops (i.e: shops.php?shop=1 wich states for weapons, shops.php?shop=2 wich states for armors and so on...) Sry Illusions i bumped at code :) @Kabbz the code gives errors no mather what i change to it but, yes i want "shops.php?shop=1" to display the 100 items in pages (4 pages with 25 items per page) thx all for learning me :) == "Weapons") { $shopname = "If its Weapons you need your here"; $from = "items"; $type = "weapon > '0'"; $show = 100; } elseif ($_GET == "Armour") { $shopname = "Our Best Armour Shop"; $from = "items"; $type = "armor > '0'"; $show = 100; } elseif ($_GET == "Medical") { $shopname = "Our Best Medical Supplies Shop"; $from = "items"; $type = "itmtype = 'ID OF ITEM TYPES FOR MEDICAL ITEMS'"; $show = 100; } else { echo" this shop dont exsist "; die(); } $res = mysql_query("SELECT * FROM $from WHERE $type ORDER BY itmbuyprice ASC") or die(mysql_error()); echo "$shopname"; echo " Img Item Price Buy"; while ($row = mysql_fetch_array($res)) { if ($row[itmbuyable] == 0) continue; $rfc = mt_rand(0, 100); if ($show < $rfc) continue; if (!$i) { $bg = "#ffffff"; $i = 1; } elseif ($i) { $bg = "#ececec"; $i = 0; } $imageuri = $row[itempic]; if (!$imageuri) $imageuri = "images/items/default.jpg"; echo " if ($from == "items") echo "item"; else echo "weapon"; echo "info.php?ID=$row[itmid]\">$row[itmname] $". number_format($row[itmbuyprice]) ." if ($from == "items") echo "buy"; else echo "buy"; echo ".php?id=$row[itmid]\">Buy"; } echo " "; $h->endpage(); ?> For your shops to display your need to match the GET so your link in explore.php would be shops.php?page=Weapons if you were to put shops.php?page=barry and you dont have a shop called barry then you get the THIS SHOP DONT EXSIST message if ($_GET == "Weapons") if ($_GET == "Armour") if ($_GET == "Medical") if ($_GET == "KEEPGOING")
-
The script from myself and magictallguy will let you categorise your items in shops rather than vast amounts of page 1 2 3 4 5 and so on
-
try this out it will list what you need visible... <?php include "globals.php"; if ($_GET == "Weapons") { $shopname = "If its Weapons you need your here"; $from = "items"; $type = "weapon > '0'"; $show = 100; } elseif ($_GET == "Armour") { $shopname = "Our Best Armour Shop"; $from = "items"; $type = "armor > '0'"; $show = 100; } elseif ($_GET == "Medical") { $shopname = "Our Best Medical Supplies Shop"; $from = "items"; $type = "itmtype = 'ID OF ITEM TYPES FOR MEDICAL ITEMS'"; $show = 100; } else { echo"<h1> this shop dont exsist</h1>"; die(); } $res = mysql_query("SELECT * FROM $from WHERE $type ORDER BY itmbuyprice ASC") or die(mysql_error()); echo "<p class=\"heading\">$shopname</p>"; echo "<table style=\"margin: 0 auto 0 auto; border: solid #292929 0px; width: 90%;\"> <tr style=\"background-color: #6fde45;\"><td style=\"width: 1px;\"><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Img</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Item</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Price</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Buy</p></td></tr>"; while ($row = mysql_fetch_array($res)) { if ($row[itmbuyable] == 0) continue; $rfc = mt_rand(0, 100); if ($show < $rfc) continue; if (!$i) { $bg = "#ffffff"; $i = 1; } elseif ($i) { $bg = "#ececec"; $i = 0; } $imageuri = $row[itempic]; if (!$imageuri) $imageuri = "images/items/default.jpg"; echo "<tr style=\"background-color: $bg;\"><td><p style=\"margin: 0 0 0 0;\"><img src=\"$imageuri\" title=\"$row[itmdesc]\" style=\"height: 45px;\" /></p></td> <td><p style=\"margin: 0 0 0 0;\"><a href=\""; if ($from == "items") echo "item"; else echo "weapon"; echo "info.php?ID=$row[itmid]\">$row[itmname]</a></p></td> <td><p style=\"margin: 0 0 0 0;\">$". number_format($row[itmbuyprice]) ."</p></td> <td><p style=\"margin: 0 0 0 0;\"><a href=\"item"; if ($from == "items") echo "buy"; else echo "buy"; echo ".php?id=$row[itmid]\">Buy</a></p></td></tr>"; } echo "</table>"; $h->endpage(); ?> then add links to explore.php for shops example a href=shops?page=Weapons a href=shops?page=Armour
-
if you code this correctly you can have one shop create lots more links to other shops... all youd need to do is add an itmid for the items you want to shw in which shops...