Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,667
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Uridium

  1. damn i got 9 mentions on this page i should just set up camp here lol
  2. hey anychance of a freebie copy for making mods with ;) lol
  3. There will be an addition to this script so staff can view accept or isloate the User will start work on this later
  4. 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
  5. 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
  6. 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 :)
  7. 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")
  8. 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
  9. 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
  10. 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...
  11. Probably one of the best responses ive seen on here so far Trial and Error is always a good thing Just make sure you backup and orignal copy before editing that way if you cant work it out you can replace with backup. Make note of different error messages example t_Uncapsed usually means theres a " or ' or ; missing.. undefined function usually means you need a global example global $db, $r, $c; before a call for a function....
  12. Few facts about OFAH Boyce was originally supposed to play Delboy. because Ray Butt didnt like david jason's Acting Until he saw an episode of David in Open All Hours... The episode with the chandelier the actual chandelier used cost £10,000 and only had one take..
  13. When i was a kid the launch of the zx80 came out when i was 10 we didnt have many forms of PC's back then so you had to make do with cardboard and scissors A friend of mine who was a bright git used to sit for hours trying to work out how everything worked, I just wanted to play out on me new bike. Whilst i was at school though they brought in our first computer which was a big bulky BBC MICRO MODEL B it came with a disc drive not like a CDROM drive this thing was like your floppy A drive but the disc was huge... Then a few years later the ZX Speccy 48k came out and blew my mind as a kid. for once we could actually play games, My first ever attempt at coding was at Dixons in the UK which was something like 10 PRINT "hello world" 20 GOTO 10 and was mesmorised by the whole screen filling up with "hello world" being a Basic Language it was easy yet complicated at the same time and usage of words you couldnt find in a book. 10 LET A$ = Y 20 LET B$ = X 30 IF A$ <> B$ THEN LET X=Y 40 PLOT B$ Which would make a tiny dot apear on your screen was damn impressive back then ;)
  14. Heres one i made for a non MCC game but the princiapl for this can be used to make one for MCC History layout
  15. if yur using Lite add a field to users called attackcount when it reaches 25 make the attack script enduce STALEMATE all done
  16. You have the starting of a decent mod well done :) Just a few things i would add to make it more impressive would be 1 winner 5 runner up prizes History that shows who won with which tickets.. tickets bought are actual tickets this is always impressive and looks like the creator has spent time on the mod.. Make the system fair so for example if you have suers in your game that are rich and can afford LOADS of tickets only allow them to buy If others have bought tickets too...
  17. is there a set percentage on the dbase for the mining ? example mining_max=100 ? by the way the logo for login on your page adding border 0 will get rid of the nasty blue outline box change from >> to
  18. im not even sure why hosp and jail are in the users table to be honest and the need of a 1 min cron you could simply create 2 new tables called hosp and jail and INSERT into with a timestamp or NOW() and let the script deduct the time then delete the user from either when times up.
  19. Skizzy ive never really been harsh to anyone on here but damn lad that is pure rubbish, I even went as far as to read your story line which confused me even more...   I understand its a game in the making but altering one letter from the word BACKSLIDE would have someone giggling. Its not an Original idea and if its one your hoping will become something big,there are far better games out there to play even on the Tiny Tots website.. No real sense of play, nothing to keep you hooked and the website name killed it before i had chance to even start....
  20. How many times do you come across the same procedure in scripts and find yourself repeating things over and over again heres a quick tip... create a file called actions.php and store all the widely used mentions in there example >>>> global $db,$ir,$c,$userid,$h; is used throuhout every script so in actions.php just add $callglobal "global $db,$ir,$c,$userid,$h;"; and in the file globals.php under the mention of header.php add include actions.php so now when ever you need to do >>> global $db,$ir,$c,$userid,$h; you just write it as $callglobal You can keep adding to the list things that you know are always the same...
  21. Ive been working on an installer for the Neab engine and am pleased to say the Installer is working 100% it will be sent to Alain for final testing and if Proved useful will hopefully be apart of every Neab Engine Setup to make life just that little bit easier for everyone the setup can be run on Localhost aswell as on your server so for those using xampp may find this useful...
  22. if DabHandAchoo and coldblooded dont make a donation im gonna quit making mods in respect of the poor people that went out and bought it lol
  23. Ok there seems to be some mishaprehention why users have to inbox me this is PURLEY so i can see who decided on a mod with the same idea Via a date time stamp from my Inbox obviously those that posted first will get the Job but those who posted the same idea at a later stage wont.
  24. When you send me an inbox of your idea i will tell you if its already in production or not...
  25. just so everyone is aware the payout for the winner will be on 1st Novemeber
×
×
  • Create New...