Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,667
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Uridium

  1. Re: [mccode v2] Items Pic mod   Lycan check to make sure all references for itmpics are the same even for the one in your items Dbase so all should be itmpics and not any as itmpic
  2. Re: one of my mods deleted ? After reading that i see what you mean.. I guess i was kinda annoyed the way it was done. but not to receieve an explanation as to why is also a pain.. So for those reading this my stsements above although at the time felt strongly about, i guess now ive seen it in a different light.
  3. Re: one of my mods deleted ? glad that modify button was still here ;)
  4. Re: one of my mods deleted ? Well those that were lucky enough to have the script from yesterday i guess your the only pople who have it :) which i guess makes your game unique as i wont be reposting the script.
  5. Quick question why was one of my mods deleted... the one that allows users to set a price for their being rescued from jail. This was an original script and wasnt stolen if thats what any staff here are thinknig myself and Richard did it from scratch.. so why was it removed. ok excerts were taken from preferences.php and jailbail.php
  6. Re: [MCCODES V2] Updated Jail now lets users Offer rescue Price edits
  7. Before i start a massive Thank You to RICHARD for his emmense help with this script :) The usual jail allows users to jailbail and bust which i found to be quite Crap. So what makes this one better... Well this one allows your players to set their own amount to be rescued from jail. when a player rescues them they will recieve the asking price for the bail rather than a set bail amount as before... open up preferences.php and add these new cases... case 'rescuechange2': do_bail_offer(); break; case 'rescuechange': bail_offer(); break; Staying in preferences.php add function bail_offer() { global $ir,$c,$userid,$h; print "<h3>Change Rescue Cost</h3> Please note that 0 will be in place if you dont have ther cash to cover a rescue <form action='preferences.php?action=rescuechange2' method='post'> New Rescue Ammount: <input type='text' name='bailoffer' /> <input type='submit' value='Change Rescue Ammount' /></form>"; } function do_bail_offer() { global $db,$ir,$c,$userid,$h; if($_POST['bailoffer'] == "") { print "You did not enter an ammount [url='preferences.php?action=rescuechange']> Back[/url]"; } else { $db->query("UPDATE users SET rescue='{$_POST['bailoffer']}' WHERE userid=$userid"); print "<h1>rescue Amount changed changed!</h1>"; } } Add this to the links section in the same file [url='preferences.php?action=rescuechange']Change Rescue Offer[/url] Now run this small SQL ALTER TABLE `users` ADD `rescue` INT( 11 ) NOT NULL DEFAULT '0'; now call this file rescue.php <?php include "globals.php"; if($ir['jail']) { echo 'You are stuck in the Jail right now.'; } else { $fetch = $db->query(sprintf("SELECT * FROM `users` WHERE (`userid` = '%u')", abs((int) $_GET['ID']))); if(!mysql_num_rows($fetch)) { echo 'You cannot bail out a non-existant user.'; } else { $r = $db->fetch_row($fetch); if(!$r['jail']) { echo 'This user is no longer stuck in Jail.'; } if($r['rescue'] AND ($r['money'] > $r['rescue'])) { $cost = $r['rescue']; } else { $cost = 0; } if($ir['money'] < $cost) { echo 'You cannot afford to bail this user out of Jail right now.'; } else { echo 'You have bailed '.$r['username'].' out of Jail for a total of $'.number_format($cost).'.'; $db->query(sprintf("UPDATE `users` SET `money` = `money` - '%d', `jail` = '0' WHERE `userid` = '%u'", $cost, $r['userid'])); $db->query(sprintf("UPDATE `users` SET `money` = `money` + '%d' WHERE `userid` = '%u'", $ir['userid'])); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] bailed you out of jail.", $c); } } } $h->endpage(); ?> and finally call this jail.php <?php include "globals.php"; if($r['rescue'] AND ($r['money'] > $r['rescue'])) { $cost = $r['rescue']; } else { $cost = 0; } if($ir['hospital']) { die("<h1>You are in hospital so whats the point</h1>"); } print "<h3>Jail</h3> <table width='75%' class=\"table\" border=\"0\" cellspacing=\"1\"><tr bgcolor=grey><th>Name</th> <th>Level</th> <th>Time</th><th>Reason</th><th>Rescue Price</th> <th>Actions</th></tr>"; $q=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.jail > 0 ORDER BY u.jail DESC"); while($r=$db->fetch_row($q)) { print "\n<tr><td>{$r['gangPREF']} [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td><td>{$r['level']}</td><td>{$r['jail']} minutes</td><td>{$r['jail_reason']}</td><td>\$ {$r['rescue']}</td> <td>[[url='rescue.php?ID={$r[']Rescue[/url]]</td></tr>"; } print "</table>"; print"<h3>You are currently Offering $rescue as your rescue reward</h3>"; $h->endpage(); ?> Screenie
  8. Re: [mccode v1 v2] player card Stupid dyslexic Keyboards that was supposed to say Doesn't not Does :)
  9. Re: [mccode v1 v2] player card As Eternal Said this does work in offline mode I used it on Xampp and either got the DIE error or scambled image as text. Im suposing this has something to do with Xampp not being able to cope with GD2.
  10. Re: [MCCODES V2] Stop Users Refreshing attack pages / Leaving Fight Im assuming your game from the attack.php shows the header and mainmenu You can defeat this by opening globals.php change header.php to header2.php also change the file globals to globals2.php in your attack.php change include "globals.php"; to include "globals2.php"; open header.php and remove any parts that will display mainmenu or the players stats links and rename file header2.php goto viewuser.php and rename attack.php to attack2.php Your users dont have any links to click on now.
  11. This will stop your users from Refreshing pages or Opening new pages when they are in a fight... add this near the bottom of your attack.php before the $h->endpage();   $_GET['userid']=abs((int) $_GET['userid']); if(($_SESSION['userid'] == $r['userid']) || $r['userid']<100) { die ("Do Not Try Refreshing Pages [url='attack.php?ID={$_GET[']Continue Fight[/url]"); }   If a page is Refreshed they will be back straight into the fight with their opponent.
  12. Re: [mccode v1 v2] player card Eternal showed me this script when it had just two lines and said I have an Idea. This was whilst we were chatting about MCC not having a compare items or homes script. Now thats hes finished it and ive seen it working this is a GREAAAAAAAt mod :) very easy to alter and very easy to install nice one :) +1
  13. As I havent seen this available on MCC i decided to make a mod whereby the owner can compare different Items and houses they have added to their games... call this file compare.php   <?PHP include "globals.php"; global $db,$ir,$c; switch($_GET['action']) { case 'compareitem': compare_item_begin(); break; case 'compareitemform': compare_item_form(); break; case 'compareitemsub': compare_item_sub(); break; case 'comparehouse': comparehouse(); break; default: print "Error: This script requires an action."; break; } function compare_item_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>comparing Item</h3> You can compare any aspect of this item. <form action='compare.php?action=compareitemform' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Compare Item From Dropdown' /></form> <form action='compare.php?action=compareitemform' method='post'> Compare Item BY ID: <input type='text' name='item' value='0' /> <input type='submit' value='Compare Item BY ID' /></form>"; } function compare_item_form() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); print "<h3>compareing Item</h3> <form action='compare.php?action=compareitem' method='post'> <input type='hidden' name='itmid' value='{$_POST['item']}' /> Item Name: <input type='text' name='itmname' value='{$itemi['itmname']}' /> Item Desc.: <input type='text' name='itmdesc' value='{$itemi['itmdesc']}' /> Item Type: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." Item Buyable: <input type='checkbox' name='itmbuyable'"; if ($itemi['itmbuyable']) { print " checked='checked'"; } print " /> Item Price: <input type='text' name='itmbuyprice' value='{$itemi['itmbuyprice']}' /> Item Sell Value: <input type='text' name='itmsellprice' value='{$itemi['itmsellprice']}' /><hr />[b]Usage Form[/b]<hr />"; $stats=array( "energy" => "Energy", "will" => "Will", "brave" => "Brave", "hp" => "Health", "strength" => "Strength", "agility" => "Agility", "guard" => "Guard", "labour" => "Labour", "IQ" => "IQ", "hospital" => "Hospital Time", "jail" => "Jail Time", "money" => "Money", "crystals" => "Crystals", "cdays" => "Education Days Left", "bankmoney" => "Bank money", "cybermoney" => "Cyber money", "crimexp" => "Crime XP"); for($i=1;$i<=3;$i++) { if($itemi["effect".$i]) { $efx=unserialize($itemi["effect".$i]); } else { $efx=array("inc_amount" => 0); } $switch1=($itemi['effect'.$i.'_on'] > 0) ? " checked='checked'" : ""; $switch2=($itemi['effect'.$i.'_on'] > 0) ? "" : " checked='checked'"; print "[b]<u>Effect {$i}</u>[/b] On? <input type='radio' name='effect{$i}on' value='1'$switch1 /> Yes <input type='radio' name='effect{$i}on' value='0'$switch2 /> No Stat: <select name='effect{$i}stat' type='dropdown'>"; foreach($stats as $k => $v) { if($k==$efx['stat']) { print "<option value='{$k}' selected='selected'>{$v}</option>\n"; } else { print "<option value='$k'>{$v}</option>\n"; } } if($efx['dir']=="neg") { $str="<option value='pos'>Increase</option><option value='neg' selected='selected'>Decrease</option>"; } else { $str="<option value='pos' selected='selected'>Increase</option><option value='neg'>Decrease</option>"; } if($efx['inc_type']=="percent") { $str2="<option value='figure'>Value</option><option value='percent' selected='selected'>Percent</option>"; } else { $str2="<option value='figure' selected='selected'>Value</option><option value='percent'>Percent</option>"; } print "</select> Direction: <select name='effect{$i}dir' type='dropdown'>{$str} </select> Amount: <input type='text' name='effect{$i}amount' value='{$efx['inc_amount']}' /> <select name='effect{$i}type' type='dropdown'>{$str2}</select><hr />"; } print "[b]Combat Usage[/b] Weapon Power: <input type='text' name='weapon' value='{$itemi['weapon']}' /> Armor Defense: <input type='text' name='armor' value='{$itemi['armor']}' /><hr /> <input type='submit' value='Next Item To Compare' /></form>"; } function compare_item_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='compare.php?action=compareitem']> Back[/url]"; $h->endpage(); exit; } } function comparehouse() { global $db, $ir, $c, $h, $userid; switch($_POST['step']) { case "2": $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $q=$db->query("SELECT * FROM houses WHERE hWILL={$will} AND hID!={$_POST['id']}"); if($db->num_rows($q)) { print "Sorry, you cannot have two houses with the same maximum will."; $h->endpage(); exit; } $name=$_POST['name']; $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['id']}"); $old=$db->fetch_row($q); if($old['hWILL'] == 100 && $old['hWILL'] != $will) { die("Sorry, this house's will bar cannot be compareed."); } print "<h3>compareing a House</h3><hr /> <form action='compare.php?action=comparehouse' method='post'> <input type='hidden' name='step' value='1' /> House: ".house_dropdown($c, "house")." <input type='submit' value='compare House' /></form>"; break; case "1": $q=$db->query("SELECT * FROM houses WHERE hID={$_POST['house']}"); $old=$db->fetch_row($q); print "<h3>compareing a House</h3><hr /> <form action='compare.php?action=comparehouse' method='post'> <input type='hidden' name='step' value='2' /> <input type='hidden' name='id' value='{$_POST['house']}' /> Name: <input type='text' name='name' value='{$old['hNAME']}' /> Price: <input type='text' name='price' value='{$old['hPRICE']}' /> Max Will: <input type='text' name='will' value='{$old['hWILL']}' /> <input type='submit' value='compare House' /></form>"; break; default: print "<h3>compareing a House</h3><hr /> <form action='compare.php?action=comparehouse' method='post'> <input type='hidden' name='step' value='1' /> House: ".house_dropdown($c, "house")." <input type='submit' value='compare House' /></form>"; break; } } ?>   add these link to smenu.php compare.php?action=compareitem compare.php?action=comparehouse You can Switch Between Items or houses without adding anything to your dbase so you cant harm anything... EDITED as Compare form wasnt working Correctly... Now Fixed
  14. Re: Battle ladder [Mccodes V2] call this file battle_ladder.php   <?php include_once ('globals.php'); switch($_GET['page']) { case 'signup': ladder_signup(); break; default: ladder_index(); break; } function ladder_index() { global $ir, $db; if(!isset($_GET['id'])) { echo '<h2>Battle Ladder</h2> [url="battle_ladder.php?page=signup"][b]Join a ladder[/b][/url] [url="battle_ladder.php?id='.$r['bmemberLadder'].'"]<h2>'.stripslashes($r['ladder_name']).'</h2>[/url] (Level '.$r['maxentry_level'].' Required) <table width="300"> <tr> <td>'; $fetch = $db->query("SELECT * FROM `ladder_settings` ORDER BY `maxentry_level` ASC"); while ($r = $db->fetch_row($fetch)) { $count ++; echo $count.'. [url="battle_ladder.php?id='.$r['ladder_id'].'"]'.stripslashes($r['ladder_name']).'[/url] (Level '.$r['maxentry_level'].' Required) '; } echo '</td> </tr> </table>'; } else { $fetch = $db->query(sprintf("SELECT * FROM `battle_members` LEFT JOIN `users` ON `userid` = `bmemberUser` WHERE `bmemberLadder` = '%u' ORDER BY `bmemberScore` DESC", abs((int) $_GET['id']))); if(!$db->num_rows($fetch)) { echo '<h2>No Members are apart of this Ladder Yet</h2>'; } else { echo '<table width="600" class="table"> <tr> <th width="10%">Rank</th> <th width="40%">Name</th> <th width="20%">Score</th> <th width="15%">Wins</th> <th width="15%">Losses</th> <th width="25%">Hospital</th> <th width="25%">Attack</th> </tr>'; while($r = $db->fetch_row($fetch)) { $count ++; echo '<tr> <td align="center">'.$count.'</td> <td>[url="viewuser.php?u='.$r['userid'].'"]'.$r['username'].'[/url]</td> <td>'.number_format($r['bmemberScore']).'</td> <td>'.$r['bmemberWins'].'</td> <td>'.$r['bmemberLosses'].'</td> <td>'.$r['hospital'].' Mins</td> <td>[url="attack.php?ID='.$r['userid'].'&ladder='.$r['bmemberLadder'].'"]Attack[/url]</td> </tr>'; } } } } function ladder_signup() { global $ir, $db; if(!isset($_GET['id'])) { echo '<h2>Join a ladder</h2> You are qualified to join one of the ladders shown below. <table width="300" border="5"> <tr> <td>'; $fetch = $db->query(sprintf("SELECT * FROM `ladder_settings` WHERE `maxentry_level` <= '%d' ORDER BY `maxentry_level` ASC", $ir['level'])); while ($r = $db->fetch_row($fetch)) { echo '[url="battle_ladder.php?page=signup&id='.$r['ladder_id'].'"]<h2>'.stripslashes($r['ladder_name']).'</h2>[/url] '.stripslashes($r['ladder_description']).' '; } echo '</td> </tr> </table>'; } else { $check = $db->query(sprintf("SELECT * FROM `battle_members` WHERE `bmemberUser` = '%u'", $ir['userid'])); if($db->num_rows($check)) { echo 'You are part of another ladder at this time, wait for that to finish before joining another.'; } else { $sql = $db->query(sprintf("SELECT * FROM `ladder_settings` WHERE `ladder_id` = '%u'", abs((int) $_GET['id']))); $r = $db->fetch_row($sql); if($r['maxentry_level'] > $ir['level']) { echo 'You are not experienced enough to join this ladder right now.'; } else { $db->query(sprintf("INSERT INTO `battle_members` (`bmemberId`, `bmemberUser`, `bmemberLadder`, `bmemberScore`) VALUES ('NULL','%u', '%d', '%d')", $ir['userid'], $r['ladder_id'], 100)); echo '<h3>You have signed up to the </h3><h2>'.stripslashes($r['ladder_name']).'</h2><h3>, attack other members of that ladder to increase the score.</h3>'; } } } } $h->endpage(); ?>   These tables that were given by RICHARD are no longer needed   CREATE TABLE IF NOT EXISTS `battle_ladders` ( `ladderId` int(11) NOT NULL AUTO_INCREMENT, `ladderName` varchar(255) NOT NULL DEFAULT '', `ladderLevel` int(11) NOT NULL, PRIMARY KEY (`ladderId`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;   put this in your mainmenu.php   [url='battle_ladder.php']Battle Ladder[/url]   But use the rest of RICHARDS setup for attackwon and attacklost + the SQLS for the members.. Few things ive done 1 = users can attack anyone once on a ladder but if they dont belong to that ladder NO score will be given for any wins Scores will only be given to those that are on the same ladder... 2 = Users can only join a ladder that have their MAX level settings
  15. Re: Battle ladder [Mccodes V2] why does stupid MCC only select 2 types of player names that being yourself or the one your attacking im trying to make it so you can attack any player on a list by name and peeing me of lol
  16. Re: Battle ladder [Mccodes V2]   Cheers Radio :) Yep im in process now of redoing RICHARDS original battle_ladder.php It wont be using the same basis as the attackwon.php and attacklost.php or even attack.php I thought as its a battle_ladder it would need its own attack script which has nothing to do with attacks outside of the ladder. The querirs would still be the same however just the script names will be changed.. Ive already started on the battle_ladder.php so it shows if a user is in hospital that cant be attacked and the ability to show you your currrent history from those that have attacked you and from you attacking them. and also if a user isnt of a certaion level only the levels they match up to will be displayed which is working fine.. also the password protected tournaments are working and the dontators part is working..
  17. Re: Battle ladder [Mccodes V2]   in your SMENU.PHP change my Original link for delete which was.   > [url='tourny_creator.php?action=delladder']Delete A Tournament[/url] ";   TO   > [url='tourny_creator.php?action=deleteladder']Delete A Tournament[/url] ";   Sorry for the confusion
  18. Re: Battle ladder [Mccodes V2]   Eternal this MOD was tested on your game i just never added the smenu links as for avguste's post as i stated my tables for the battle_ladder are different and will need to be altered. 1 because i was doing the script offline and used my own sqls to set it up I will however change RICHARDS SQLS and battle_ladder script so it fits the one i posted. This was a ailly error on my behalf i should have just used Richards SQLS.. Regards the DELETION of tournaments i will repost my copy as i know that one works or it maybe just that ive made an error on the smenu.php links...
  19. Re: Battle ladder [Mccodes V2] wait till i get home from vacation and i'll have a look should be later tonight when i get back on..
  20. Re: Battle ladder [Mccodes V2] some of the sqls from the battle_ladder.php will need to be changed to be able to use the ones from the admin panel yep my fault i gave the tables different names.... Regards deleting tourneys only tournament 1 is un-deleteable the rest you create can be deleted.
  21. Re: [All versions] Mailbox clickable bbcode and smilies Are you getting errors or are the images not being able to be clicked on or not visible at bottom of mailbox
  22. Re: [All versions] Mailbox clickable bbcode and smilies Tested it on a fresh copy of MCC worked 1st no problems
  23. Re: [All versions] Mailbox clickable bbcode and smilies Ooops My Bad sorry :)
  24. Re: [All versions] Mailbox clickable bbcode and smilies REDSNAKE open up your mailbox on your site and view source Then goto olaceys site open mailbox and view source on that You will see his images use INPUT TYPE where as yours it doesnt mention it.
  25. Re: [All versions] Mailbox clickable bbcode and smilies Heres a few more PATTERNS to add... GOOGLE VIDEO   $patterns[] = "#\[GVideo\]http://video.google.[A-Za-z0-9.]{2,5}/videoplay\?docid=([0-9A-Za-z-_]*)[^[]*\[/GVideo\]#is";   YOUTUBE   $patterns[] = "#\[youtube\]http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
×
×
  • Create New...