Jump to content
MakeWebGames

MDK666

Members
  • Posts

    268
  • Joined

  • Last visited

Everything posted by MDK666

  1. Re: Easy Help Tutorial With Admin Feature   thats true badgirl but hey hes new, first mod, and pretty good accually so :-P
  2. Re: [Mccodes] New Login well the first one is kinda crappy even though its reminds me of the main character from death note, the second one is nice
  3. Re: Great Potential   lol sounds like your tired illusions, and its share :wink: but ill also give you a +1 as this mod does give us coders alot of potential to work with the gangs
  4. Re: Easy Help Tutorial With Admin Feature not bad i give u a +1 on this because of creativity, keep up the good work and were glad to have you here at CE
  5. Re: [mccode v2] Monster Tent its ok im up for any learning experience :)
  6. Re: [mccode v2] Monster Tent well its just part 1 of the mod, i plan on makeing another part as a update, but it also allows other users here on CE to add to it if they like, so they can do as they like with it, because im currently redoing a new game, based on hacking so yea im not gonna say exactly what im gonna have in it and etc at the moment, but im working on it at the moment so hopefully i will have it up and running in the next few days if not by next week, also do you know anyone or does anyone know where i can get a free template for the game and or some images done for free if so pm me on here or on msn or yahoo the usernames are MSN: [email protected] YAHOO: [email protected]
  7. Re: [mccode v2] Monster Tent   if you didnt read i plan on createing a attack page for the monsterstent thats why the file goes to attackmonster.php because is started working on one but never finished it.
  8. Re: [mccodes v2] Crons without the need of cronjobs i cleaned alot of the codeing up, because the creator had multiple pages of html that could of all be in 1 page instead of 3 different pages
  9. Re: (MCCODES) V2 Layout For Sale $100 is starting bid very nice templates and very beautiful intro, but as a few people have said above its not worth the $100.00 this is just my opinion but good luck on your sales. also +1 for the template images
  10. http://www.the-dark-hosting.com/files/cronjobswithphp.zip This zip has all the files needed to run crons without the need of cronjobs, its strictly drivin from the database, when u extract the files read the readme, and itll explain all that is needed to be done.The instructions are pretty easy if you ask me, i plan on makeing a better one to run from mc2 instead of its own folder, but anyways this will help everyone that has a host that doesnt allow the usage of crons under 30mins. if any help is needed just let me know. The zip has no viruses, adware, or spyware, because it was created by me and a few others on problems we got stuck at, its also bug free and im the one hosting the file from my server so i know for exact it has no bugs or
  11. Re: [mccode v2] Fishing Mod oh ok lol
  12. Re: [mccode v2] Monster Tent I plan on codeing up a new attack page just for the monsters tent, and i also plan on createing a explore page to fight monsters, find currencys, and etc, as for the scripts when createing a monster you have the option of specifing which currencys you wish for the person to recieve on defeat of the monster, say as a example you wanted a monster named "demon" to give out 2,000 money, 10 crystals, 20 diamonds, and 1 donator day, you just add those in the boxes on the create monsters page and wala its done :) if you would like to contribute to this mod and addon to it, you can as long as u release the mod/addons for free under either this topic or another. If you have and questions or comments please dont be afraid to ask or say, im open to any feedback or suggestions.
  13. Re: [mccode v2] Monster Tent open global_func.php and find function challengebot_dropdown($connection,$ddname="bot",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT cb.*,u.* FROM challengebots AS cb LEFT JOIN users AS u ON cb.cb_npcid=u.userid ORDER BY u.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; }   Add this under it function monster_dropdown($connection,$ddname="monster",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM monsters ORDER BY monsterid ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['monsterid']}'"; if ($selected == $r['monsterid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['monstername']}</option>"; } $ret.="\n</select>"; return $ret; }   Now create a file called monstertent.php <?php include "globals.php"; print "<h3>Monster Tent</h3> [b]Welcome to the <u>[b]Monster tent![/b]</u> Here you can challenge Monsters for money, experience, crystals, diamonds, and tdo credits, you may get lucky and win donator days, but those monsters are extremly difficult.[/b] <table width=100% cellspacing=1 class='table'><tr style='background: gray; '><th>Monster Name</th><th>Level</th><th>Challenge</th></tr>"; $q=$db->query("SELECT monsterid,monstername,level FROM monsters"); while($r=$db->fetch_row($q)) { $earn=$r['money']; $earn1=$r['crystals']; $earn2=$r['diamonds']; $earn3=$r['credits']; $earn4=$r['donatordays']; $v=$r['monsterid']; $q=$db->query("SELECT count(*) FROM monsters WHERE monsterid=$v"); $times=$db->fetch_single($q); print "<tr><td>{$r['monstername']}</td><td>{$r['level']}</td><td>"; if($r['hp'] >= $r['maxhp']/2 and $r['gender'] and !$ir['class']) print "</td><td>$earn</td><td>$earn1</td><td>$earn2</td><td>$earn3</td><td>$earn4</td><td>"; if($r['mosnterid']) { print "[i]Already[/i]"; } else { print "[url='attackmonster.php?ID={$r[']Challenge[/url]"; } print "</td></tr>"; } print "</table>"; $h->endpage(); ?>   Finally and last open smenu.php and add this where ever u want. <th>[b]Monster Tent[/b]</th> <tr><td> [url='staff_monstertent.php?action=newmonster']Add Monster[/url]</td></tr> <tr><td> [url='staff_monstertent.php?action=editmonster']Edit Monster[/url]</td></tr> <tr><td> [url='staff_monstertent.php?action=delmonster']Remove Monster[/url]</td></tr>
  14. Ok... i have been working on this mod the past few days now and have finally finished it, this script will do the same as create users, edit users, and delete users but its not useing users, its useing its own database, the same as the users for the npcs but u no longer need to edit the user to make them a npc all you have to do now is create 2 tables and these files and your all done. I have tested this myself, and plan on adding more for it to be used, i have not yet created a attack page for when u attack a monster so ill be doing that over the next few days, as for now here is the scripts. Create Table Monsters and Monsterstats in phpmyadmin CREATE TABLE IF NOT EXISTS `monsters` ( `monsterid` int(11) NOT NULL auto_increment, `monstername` varchar(255) NOT NULL default '', `level` int(11) NOT NULL default '0', `hp` int(11) NOT NULL default '0', `maxhp` int(11) NOT NULL default '0', `money` float NOT NULL default '0', `crystals` float NOT NULL default '0', `diamonds` float NOT NULL default '0', `credits` float NOT NULL default '0', `donatordays` int(11) NOT NULL default '0', PRIMARY KEY (`monsterid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10000002 ; CREATE TABLE IF NOT EXISTS `monsterstats` ( `monsterid` int(11) NOT NULL default '0', `strength` decimal(11,4) NOT NULL default '0.0000', `agility` decimal(11,4) NOT NULL default '0.0000', `guard` decimal(11,4) NOT NULL default '0.0000', `labour` decimal(11,4) NOT NULL default '0.0000', `IQ` decimal(11,6) NOT NULL default '0.000000' ) ENGINE=MyISAM DEFAULT CHARSET=latin1;   I used the auto_increment at 10million because well we all know we wont have that many users and it wont have a error from that. Create staff_monstertent.php <?php include "sglobals.php"; //This contains monster stuff switch($_GET['action']) { case 'newmonster': new_monster_form(); break; case 'newmonstersub': new_monster_submit(); break; case 'editmonster': edit_monster_begin(); break; case 'editmonsterform': edit_monster_form(); break; case 'editmonstersub': edit_monster_sub(); break; case 'delmonster': delmonster(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function new_monster_form() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } print "Adding a new monster. <form action='staff_monstertent.php?action=newmonstersub' method='post'> Monstername: <input type='text' name='monstername' /> Level: <input type='text' name='level' value='1' /> Money: <input type='text' name='money' value='100' /> Crystals: <input type='text' name='crystals' value='0' /> Diamonds: <input type='text' name='diamonds' value='0' /> Toc Credits: <input type='text' name='credits' value='0' /> Donator Days: <input type='text' name='donatordays' value='0' /> <input type='submit' value='Create Monster' /></form>"; } function new_monster_submit() { global $db,$ir,$c,$monsterid; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['monstername'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_monstertent.php?action=newmonster']> Back[/url]"; $h->endpage(); exit; } $level=abs((int) $_POST['level']); $money=abs((int) $_POST['money']); $crystals=abs((int) $_POST['crystals']); $diamonds=abs((int) $_POST['diamonds']); $credits=abs((int) $_POST['credits']); $donator=abs((int) $_POST['donatordays']); $strength=abs((int) $_POST['strength']); $agility=abs((int) $_POST['agility']); $guard=abs((int) $_POST['guard']); $labour=abs((int) $_POST['labour']); $iq=abs((int) $_POST['IQ']); $hp=100+$level*100; $maxhp=100+$level*100; $strength=50+$level*50; $agility=50+$level*50; $gaurd=50+$level*50; $labour=50+$level*50; $iq=50+$level*50; $db->query("INSERT INTO monsters (monstername, level, hp, maxhp, money, crystals, diamonds, credits, donatordays) VALUES('{$_POST['monstername']}', $level, $hp, $maxhp, $money, $crystals, $diamonds, $credits, $donator)"); $i=mysql_insert_id($c); $db->query("INSERT INTO monsterstats VALUES($i, $strength, $agility, $guard, $labour, $iq)"); print "Monster [$i] {$_POST['monstername']} created!"; stafflog_add("Created monster {$_POST['monstername']} [$i]"); } function edit_monster_begin() { global $db,$ir,$c,$h,$monsterid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing Monster</h3> You can edit any aspect of this monster. <form action='staff_monstertent.php?action=editmonsterform' method='post'> User: ".monster_dropdown($c,'monster')." <input type='submit' value='Edit Monster' /></form> OR enter a monster ID to edit: <form action='staff_monstertent.php?action=editmonsterform' method='post'> Monster: <input type='text' name='monster' value='0' /> <input type='submit' value='Edit Monster' /></form>"; } function edit_monster_form() { global $db,$ir,$c,$h,$monsterid; if($ir['user_level'] != 2) { die("403"); } $d=$db->query("SELECT u.*,us.* FROM monsters u LEFT JOIN monsterstats us on u.monsterid=us.monsterid WHERE u.monsterid={$_POST['monster']}"); $itemi=$db->fetch_row($d); $itemi['hospreason']=htmlspcl($itemi['hospreason']); $itemi['jail_reason']=htmlspcl($itemi['jail_reason']); print "<h3>Editing User</h3> <form action='staff_monstertent.php?action=editmonstersub' method='post'> <input type='hidden' name='monsterid' value='{$_POST['monster']}' /> Monstername: <input type='text' name='monstername' value='{$itemi['monstername']}' /> Level: <input type='text' name='level' value='{$itemi['level']}' /> Money: \$<input type='text' name='money' value='{$itemi['money']}' /> Diamonds: \$<input type='text' name='diamonds' value='{$itemi['diamonds']}' /> Toc Credits: \$<input type='text' name='credits' value='{$itemi['credits']}' /> Donator Days: \$<input type='text' name='donatordays' value='{$itemi['donatordays']}' /> Crystals: <input type='text' name='crystals' value='{$itemi['crystals']}' /> Hospital time: <input type='text' name='hospital' value='{$itemi['hospital']}' /> Hospital reason: <input type='text' name='hospreason' value='{$itemi['hospreason']}' /> <h4>Stats</h4> Strength: <input type='text' name='strength' value='{$itemi['strength']}' /> Agility: <input type='text' name='agility' value='{$itemi['agility']}' /> Guard: <input type='text' name='guard' value='{$itemi['guard']}' /> Labour: <input type='text' name='labour' value='{$itemi['labour']}' /> IQ: <input type='text' name='IQ' value='{$itemi['IQ']}' /> <input type='submit' value='Edit Monster' /></form>"; } function edit_monster_sub() { global $db,$ir,$c,$h,$monsterid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['level'])) { $go=1; } if(!isset($_POST['money'])) { $go=1; } if(!isset($_POST['diamonds'])) { $go=1; } if(!isset($_POST['credits'])) { $go=1; } if(!isset($_POST['donatordays'])) { $go=1; } if(!isset($_POST['crystals'])) { $go=1; } if(!isset($_POST['strength'])) { $go=1; } if(!isset($_POST['agility'])) { $go=1; } if(!isset($_POST['guard'])) { $go=1; } if(!isset($_POST['labour'])) { $go=1; } if(!isset($_POST['IQ'])) { $go=1; } if(!isset($_POST['username'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['monster']=$_POST['monsterid']; edit_monster_form(); } else { $_POST['level']=(int) $_POST['level']; $_POST['strength']=abs((int) $_POST['strength']); $_POST['agility']=abs((int) $_POST['agility']); $_POST['guard']=abs((int) $_POST['guard']); $_POST['labour']=abs((int) $_POST['labour']); $_POST['IQ']=abs((int) $_POST['IQ']); $_POST['money']=(int) $_POST['money']; $_POST['diamonds']=(int) $_POST['diamonds']; $_POST['credits']=(int) $_POST['credits']; $_POST['crystals']=(int) $_POST['crystals']; $_POST['donatordays']=(int) $_POST['donatordays']; //check for monstername usage $u=$db->query("SELECT * FROM monsters WHERE monstername='{$_POST['monstername']}' and monsterid != {$_POST['monsterid']}"); if($db->num_rows($u) != 0) { print "That monstername is in use, choose another."; print " [url='staff_monstertent.php?action=editmonster']> Back[/url]"; $h->endpage(); exit; } $oq=$db->query("SELECT * FROM monsters WHERE monsterid={$_POST['monsterid']}"); $rm=$db->fetch_row($oq); $hp=50+$_POST['level']*50; $db->query("UPDATE monsters SET monsterame='{$_POST['monstername']}', level={$_POST['level']}, money={$_POST['money']}, crystals={$_POST['crystals']}, hp=$hp, maxhp=$hp, hospital={$_POST['hospital']}, hospreason='{$_POST['hospreason']}' WHERE monsterid={$_POST['monsterid']}"); $db->query("UPDATE monsterstats SET strength={$_POST['strength']}, agility={$_POST['agility']}, guard={$_POST['guard']}, labour={$_POST['labour']}, IQ={$_POST['IQ']} WHERE monsterid={$_POST['monsterid']}"); stafflog_add("Edited monster {$_POST['monstername']} [{$_POST['monsterid']}]"); print "Monster edited...."; } } function delmonster() { global $ir,$c,$h,$monsterid,$db; if($ir['user_level'] != 2) { die("403"); } $undeletable = array('1','2'); // add more IDs here, such as NPCs switch ($_GET['step']) { default: echo "<h3>Deleteing Monster</h3> Here you can delete a monster. <form action='staff_monstertent.php?action=delmonster&step=2' method='post'> User: ".monster_dropdown($c,'monster')." <input type='submit' value='Delete Monster' /></form> OR enter a monster ID to Delete: <form action='staff_monstertent.php?action=delmonster&step=2' method='post'> User: <input type='text' name='monster' value='0' /> <input type='submit' value='Delete Monster' /></form>"; break; case 2: $target = $_POST['monster']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die('You cannot delete this monster.'); } $d=$db->query("SELECT monstername FROM monsters WHERE monsterid='$target'"); $itemi=$db->fetch_row($d); print "<h3>Confirm</h3> Delete monster ".$itemi["monstername"]."? <form action='staff_monstertent.php?action=delmonster&step=3' method='post'> <input type='hidden' name='monsterid' value='$target' /> <input type='submit' name='yesorno' value='Yes' /> <input type='submit' name='yesorno' value='No' onclick=\"window.location='staff_monstertent.php?action=delmonster';\" /></form>"; break; case 3: $target = $_POST['monsterid']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die('You cannot delete this monster.'); } if($_POST['yesorno']=='No') { die("Monster not deleted. [url='staff_monstertent.php?action=delmonster']>Back to main Delete Monsters page.[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); $d=$db->query("SELECT monstername FROM monsters WHERE monsterid='$target'"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM monsters WHERE monsterid='$target'"); $db->query("DELETE FROM monsterstats WHERE monsterid='$target'"); echo "Monster {$itemi['monstername']} Deleted. [url='staff_monstertent.php?action=delmonster']>Back to main Delete Monsters page.[/url]"; stafflog_add("Deleted Monster {$itemi['monstername']} [{$_POST['monsterid']}]"); break; } } $h->endpage(); ?>
  15. Re: Allows you to create items that make you go up a level V2 not to mention im only 23 :-P
  16. Re: [mccode v2] Fishing Mod are you saying i ripped this game off of chavasters game because i coded this myself sry to say
  17. Re: Allows you to create items that make you go up a level V2 wow there really isnt a point in the mod, because there are alot of mods on this site that will help a user lvl up let alone its really easy to lvl up
  18. Re: [mccode v2] Fishing Mod wow im suprised people are still useing this mod and or replying to it :)
  19. Re: [Mccodes V2] Set Up V2 the way you want it without altering files.... well if it isnt writeable try cmodding the file to 777 which make it writeable
  20. Re: [Mccodes V2] Set Up V2 the way you want it without altering files.... wow illusions, you just opened my mind for all sorts of mods to add now, and to create ohhh i cant wait till i get started :evil: there gonna wicked, but my damned cronjob mod i am workin on is really starting to ummm piss me off because it isnt showing the tables to insert the crons into the database and run, i dunno i think im missing something but now sure yet.
  21. Re: looking to buy pm me on msn then cuz im online.
  22. Re: looking to buy what was we missing in the mod, did u have to right a function, or what.
  23. Re: [Review] The-Dark-One i never do rush :-D i had this game made for almost a year now so yea, im just now getting back into codeing mc2 but hopefully i come up with a new template even though i suck at images lol but ill think of something.
  24. Re: looking to buy whats your price range for this mod?
  25. Re: [Review] The-Dark-One tnks for the advice but i have been planning on makeing a new template, and theres alot of mods in the game, you just gotta find them :) but i plan on adding more.
×
×
  • Create New...