-
Posts
2,657 -
Joined
-
Last visited
-
Days Won
74
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
Re: Mccodes Mono District lol now thats one phrase i have to remember..
-
Re: i need help again >.< You just need this bit $used=array(); $q=$db->query("SELECT * FROM inventory WHERE inv_userid=$userid"); while ( $r=mysql_fetch_array($q) ) { if ( ! in_array ( $r['inv_id'], $used ) ) { $currdel=array(); $used[] =$r['inv_id']; $currdel[]=$r['inv_id']; $amount=$r['inv_qty']; //grab sellers others $q2=$db->query("SELECT * FROM inventory WHERE inv_userid=$userid AND inv_itemid = {$r['inv_itemid']} AND inv_id != {$r['inv_id']}"); while ( $r2 = mysql_fetch_array($q2) ) { $used[]=$r2['inv_id']; $currdel[]=$r2['inv_id']; $amount+=$r2['inv_qty']; } //if($userid == 1) //print "DEBUG: DELETE FROM inventory WHERE inv_id IN(".implode(",",$currdel).") "; $db->query("DELETE FROM inventory WHERE inv_id IN(".implode(",",$currdel).")"); //if($userid == 1) //print "DEBUG: INSERT INTO inventory VALUES('', {$r['inv_itemid']}, $userid, $amount) "; $db->query("INSERT INTO inventory VALUES('', {$r['inv_itemid']}, $userid, $amount)"); } } Paste afther the include "globals.php";
-
Re: Funney Error I had the same issue Haunted sorted mine out for me you may be as well asking how he fixed mine :)
-
Re: Mccodes Mono District it would Cost you $500 just to kill the damn bugs ;)You dont need Beta testers you need a hacker coz if they cant get in i'll pay 500 if they do then i pay nothing. :)
-
Re: always running from a fight JON dont forget the one in header.php theres also one in there that will take all EXP....
-
Re: Have any mod ideas post here! I have an Idea get Rid of the Attack System make more options for users at signup so they can choose what they want to be. let users intergrate with other users so the game isnt just about YOU its about a team effort.. and i dont mean joining a Gang... make users that chose a different Charcter Style from the Reg page Work for stats by accomplishing schooling and when successful can join a wider group of new Characters...
-
Re: [MCCODES v1 + V2] Flash Login Iv'e sent details to you via the CE Messages The FLA file will allow you to edit the actionscript and Graphics of the login to suit your needs...
-
Seeing as i havent seen a flash version of a login for MCC i decided to make one. Dont worry about SQL Injections from the file it wont happen The swf doesnt contain any call for your database via the file and simply works by calling for the authenticate.php file. Now open up your login.php file and remove... <form action=authenticate.php method=post name=login onsubmit=\"return saveme();\">User: <input type='text' name='username' size=15 /> Pass: <input type='password' name='password' size=15 /> <input type='submit' value='Submit' /></form></fieldset> and replace with <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="300" height="300" id="begin3" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="begin3.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#cccccc" /><embed src="begin3.swf" quality="high" bgcolor="#cccccc" width="300" height="300" name="begin3" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> DOWNLOAD FLASH FILE You will now have a working flash login if you want the FLA file for this Login im afraid thats $5 complete with above swf + fla + source.
-
Re: Help Header Problem Call me stupid but i cliked the link he provided and a youporn website came up lol
-
My Final Free Mod :) DOWNLOAD ZIP FILE the download contains the flash player + fla file and the html source You can add any website url that has a valid mp3 track or just download the mp3 Player to your pc and use it with your own offline music tracks,, FOR OFFLINE you will need the FULL PATH to the track example C:\My Documents\my music\farcry.mp3 Well thats it from me im outta here :)
-
Re: [Mccodes V2]Prayer Mod Why would you want to pary when the whole idea of a game is to beat someone up lol
-
Re: i need help again >.< Find $q=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $odata=$db->fetch_row($q); $myabbr=($ir['gender']=="Male") ? "his" : "her"; $oabbr=($ir['gender']=="Male") ? "his" : "her"; if($odata['hp'] == 1) { print "<h3>You come all this way only too find your opponent unconscious. You could have stayed home and watched some TV</h3> [url='index.php'][img=messages_back_014.gif][/url]</a>"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } Underneath add this the above may be slightly different to yours but the male female part is the same to look for if($_GET['nextstep'] > 50) { print"<center><h1><font color='red'>STALEMATE!</h1> <h2>This fight is going knowhere you may as well go home!</h2> [url='index.php']> Back[/url]</center>"; $h->endpage(); event_add($odata['userid'],"[url='viewuser.php?u=$userid']{$youdata['username']}[/url] Tried to beat you but stalemated.",$c); event_add($youdata['userid']," You Tried to beat [url='viewuser.php?u=$userid']{$odata['username']}[/url] but stalemated.",$c); exit; }
-
Re: i need help again >.< use this one its one ive amended so it updates the SQL each time something new is found. as soon as a user clicks on inventory.php it will auto update.. <?php include "globals.php"; $used=array(); $q=$db->query("SELECT * FROM inventory WHERE inv_userid=$userid"); while ( $r=mysql_fetch_array($q) ) { if ( ! in_array ( $r['inv_id'], $used ) ) { $currdel=array(); $used[] =$r['inv_id']; $currdel[]=$r['inv_id']; $amount=$r['inv_qty']; //grab sellers others $q2=$db->query("SELECT * FROM inventory WHERE inv_userid=$userid AND inv_itemid = {$r['inv_itemid']} AND inv_id != {$r['inv_id']}"); while ( $r2 = mysql_fetch_array($q2) ) { $used[]=$r2['inv_id']; $currdel[]=$r2['inv_id']; $amount+=$r2['inv_qty']; } //if($userid == 1) //print "DEBUG: DELETE FROM inventory WHERE inv_id IN(".implode(",",$currdel).") "; $db->query("DELETE FROM inventory WHERE inv_id IN(".implode(",",$currdel).")"); //if($userid == 1) //print "DEBUG: INSERT INTO inventory VALUES('', {$r['inv_itemid']}, $userid, $amount) "; $db->query("INSERT INTO inventory VALUES('', {$r['inv_itemid']}, $userid, $amount)"); } } $equip = array( $ir['equip_primary'] => 0, $ir['equip_secondary'] => 0, $ir['equip_armor'] => 0 ); $q = $db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']})"); while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print "<table width='75%' border='0'> <tr> <td width='25%' align='center'>[b]Primary Weapon[/b]</td> <td width='25%' align='center'>[b]Armour[/b]</td> <td width='25%' align='center'>[b]Secondary Weapon[/b]</td> </tr> <tr> <td align='center'>"; if($equip[$ir['equip_primary']]['itmpic']['itmdesc']) { print"[img=/itmpics/{$equip[$ir[]"; } else { print "No item image."; } print "</td> <td align='center'>"; if($equip[$ir['equip_armor']]['itmpic']['itmdesc']) { print"[img=/itmpics/{$equip[$ir[]"; } else { print "No item image."; } print "</td> <td align='center'>"; if($equip[$ir['equip_secondary']]['itmpic']['itmdesc']) { print"[img=/itmpics/{$equip[$ir[] {$ir['itmname']}"; } else { print "No item image."; } print "</td> </tr> <tr> <td align='center'>"; if($equip[$ir['equip_primary']]['itmid']) { print"[url='unequip.php?type=equip_primary']Unequip Item[/url]"; } else { print "Nothing equipped."; } print "</td> <td align='center'>"; if($equip[$ir['equip_armor']]['itmid']) { print"[url='unequip.php?type=equip_armor']Unequip Item[/url]"; } else { print "Nothing equipped."; } print "</td> <td align='center'>"; if($equip[$ir['equip_secondary']]['itmid']) { print"[url='unequip.php?type=equip_secondary']Unequip Item[/url]"; } else { print "Nothing equipped."; } print "</td> </tr> </table><hr width='95%'> <h3>Inventory</h3><hr width='95%'>"; $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { print "[b]You have no items![/b]"; } else { print "[b]Your items are listed below.[/b] <table width=95% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td class=\"h\">Item</td> <td class=\"h\">Sell Value</td> <td class=\"h\">Total Sell Value</td> <td class=\"h\">Image</td> <td class=\"h\">Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=5>[b]{$lt}[/b]</td></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print"</td><td>[img=itmpics/{$i[]"; print "</td><td>[[url='#']Info[/url]]"; print " [[url='itemsend.php?ID={$i[']Send[/url]] [[url='itemsell.php?ID={$i[']Sell[/url]] [[url='imadd.php?ID={$i[']Add To Market[/url]]"; if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']Use[/url]]"; } if($i['weapon']) { print " [[url='equip_weapon.php?ID={$i[']Equip as Weapon[/url]]"; } if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']Equip as Armor[/url]]"; } print " [[url='displayadd.php?ID=$userid&action=add&itm={$i[']Display[/url]]"; print "</td></tr>"; } print "</table>"; print "[size="1"][b]NB:[/b] Items with a small red [/size]<font color='red'>*</font>[size="1"] next to their name can be used as weapons in combat. Items with a small green [/size]<font color='green'>*</font>[size="1"] next to their name can be used as armor in combat.[/size] "; } $h->endpage(); ?> MAKE A BACKUP COPY OF YOUR OLD INVENTORY.PHP BEFORE OVERWRITING WITH THIS ONE.
-
[MCCODES V2[ Announcements mod only visible to staff
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2[ Announcements mod only visible to staff Or just use the one ive posted which works and doesnt confuse the hell out of new members to CE :) -
Re: cmarket.php HELP AMD Athlon 64 Processor 3500+ 2.2gz 1gb ram Compaq :P AMD Athlon 64 Processor 5000+ 3.5gz 8 gb ram I only use all that cos im a musician and hate it when you play something back and the CPU cant handle it.
-
Re: [mccodes v2] Taser Mod CREATE TABLE `froze` ( `ID` INT( 25 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `userid` INT( 25 ) NOT NULL , `when` INT( 25 ) NOT NULL , `by` INT( 25 ) NOT NULL ) ENGINE = MYISAM INSERT INTO `items` (`itmid` , `itmtype` ,`itmname` ,`itmdesc` ,`itmbuyprice` ,`itmsellprice` ,`itmbuyable` ,`effect1_on` ,`effect1` ,`effect2_on` , `effect2` ,`effect3_on` ,`effect3` ,`weapon` ,`armor`) VALUES ( NULL , '1', 'Taser Gun', 'Use this to taser users, freeze them for 5 minutes!', '1000', '500', '1', '1', '', '0', '', '0', '', '0', '0'); Try that cherry
-
[MCCODES V2[ Announcements mod only visible to staff
Uridium replied to Uridium's topic in Free Modifications
Re: [MCCODES V2[ Announcements mod only visible to staff call this file staffannouncements.php <?php /* Advanced Annoucements Made By Karlos MCCodes V2 Made On: 11 Dec 2008 */ require_once (DIRNAME(__FILE__) . '/globals.php'); $AnnouceCount = $ir['staffnew_announcements']; $Order = sprintf( "SELECT * FROM " . "`staffmod_announcements` " . "ORDER BY `annouce_ID` DESC" ); $Selected = $db->query ($Order); ?> <h3>Staff Only Annoucements</h3> <table width='75%' cellspacing='0' border='1' class='table'> <tr> <th width='30%'> Staff Posted/Topic/Urgency </th> <th width='70%'> Announcement </th> </tr> <?php while($Info = $db->fetch_row($Selected)) { if($AnnouceCount > 0) { $AnnouceCount--; $NewInfo="?-?<font color='#FF000'>[b]New![/b]</font>"; } else { $NewInfo=""; } echo " <tr> <th colspan='2'> {$Info['annouce_NAME']}?-?".date('F j Y, g:i:s a', $Info['annouce_TIME']).$NewInfo." </th> </tr> <td> Topic: {$Info['annouce_TOPIC']} Urgency: {$Info['annouce_URGENCY']} Posted By: {$Info['annouce_POSTED']} </td> <td valign=top> ".nl2br($Info['annouce_TEXT'])." </td> </tr>"; } ?> </table> <?php if($ir['staffnew_announcements']) { $NoAnnoucements = sprintf( "UPDATE `users` SET `staffnew_announcements` = '0' WHERE (`userid` = %u) " , $userid); $db->query($NoAnnoucements); } $h->endpage(); ?> Now open up mainmenu.php Find.... Staff Panel \n"; Underneath add if($ir['staffnew_announcements']) { print "[url='staffannouncements.php']<font color='orange'>Announcements ({$ir['staffnew_announcements']})[/url] "; } else { print "[url='staffannouncements.php']Announcements (0)[/url] "; } You can now communicate with your staff and users cant see anything. -
Thought this might come in handy for some people its the MOD made by KARLOS which gave an impressive announcement for users.. However this one basically does the same but is only viewable by staff. SQLS CREATE TABLE IF NOT EXISTS `staffmod_announcements` ( `annouce_ID` int(11) NOT NULL auto_increment, `annouce_NAME` varchar(255) NOT NULL default '', `annouce_TEXT` text NOT NULL, `annouce_TIME` int(11) NOT NULL default '0', `annouce_URGENCY` enum('No Ugency','Low','Medium','High','Urgent') NOT NULL default 'No Ugency', `annouce_TOPIC` enum('Meeting','User Scope','Ip Track User','Warnings!','New Events') NOT NULL default 'Meeting', `annouce_POSTED` varchar(255) NOT NULL default '', PRIMARY KEY (`annouce_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ; and ALTER TABLE `users` ADD `staffnew_announcements` INT( 11 ) NOT NULL DEFAULT '0'; Now open up staff.php find case 'announce': announcements(); break; Add underneath case 'staffannounce': staff_announcements(); break; same file find function announcements() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { echo '<font color="#FF0000>403 - Unauthorized Access</font>'; $h->endpage(); exit; } if($_POST['TITLE']) { if(strlen($_POST['TITLE']) < 5) { echo 'Sorry, the annoucement title is too short. [url="staff_annouce.php?addannouce"]Back[/url]'; $h->endpage(); exit; } $AddAnnouce = sprintf("INSERT INTO mod_announcements (`annouce_NAME`, `annouce_TEXT`, `annouce_TIME`, `annouce_URGENCY`, `annouce_TOPIC`, `annouce_POSTED`)VALUES ('{$_POST['TITLE']}', '{$_POST['TEXT']}', unix_timestamp(), '{$_POST['URGENCY']}', '{$_POST['TOPIC']}', '{$_POST['POSTED']}')"); $db->query ($AddAnnouce); $db->query("UPDATE users SET `new_announcements` = `new_announcements` + 1"); echo 'Announcement added! > [url="announcements.php"]View It![/url]'; stafflog_add('Posted A New Annoucement'); $h->endpage(); exit; } else { echo 'Adding an announcement... Please try to make sure the announcement is concise and covers everything you want it to. <form action="staff.php?action=announce" method="post"> Announcement Title:<input type="text" name="TITLE"> Announcement Text: <textarea name="TEXT" rows="10" cols="60"></textarea> Announcement Urgency: <select name="URGENCY" type="dropdown"> <option value="No Ugency">No Ugency</option> <option value="Low">Low</option> <option value="Medium">Medium</option> <option value="High">High</option> <option value="Urgent">Urgent</option> </select> Announcement Topic: <select name="TOPIC" type="dropdown"> <option value="Updates">Updates</option> <option value="General News">General News</option> <option value="Fun">Fun</option> <option value="Warnings!">Warnings!</option> <option value="Design Info">Design Info</option> <option value="Edits">Edits</option> </select> <input type="hidden" name="POSTED" value="'.$ir['username'].'"> <input type="submit" value="Add Announcement!" /> </form>'; } } ADD Underneath function staff_announcements() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { echo '<font color="#FF0000>403 - Unauthorized Access</font>'; $h->endpage(); exit; } if($_POST['TITLE']) { if(strlen($_POST['TITLE']) < 5) { echo 'Sorry, the annoucement title is too short. [url="staff.php?staffannounce"]Back[/url]'; $h->endpage(); exit; } $AddAnnouce = sprintf("INSERT INTO staffmod_announcements (`annouce_NAME`, `annouce_TEXT`, `annouce_TIME`, `annouce_URGENCY`, `annouce_TOPIC`, `annouce_POSTED`)VALUES ('{$_POST['TITLE']}', '{$_POST['TEXT']}', unix_timestamp(), '{$_POST['URGENCY']}', '{$_POST['TOPIC']}', '{$_POST['POSTED']}')"); $db->query ($AddAnnouce); $db->query("UPDATE users SET `staffnew_announcements` = `staffnew_announcements` + 1 where user_level > 1"); echo 'Announcement added! > [url="staffannouncements.php"]View It![/url]'; stafflog_add('Posted A Staff Annoucement'); $h->endpage(); exit; } else { echo 'Adding a Staff announcement... Only Staff are Able to View and Read These Announcements <form action="staff.php?action=staffannounce" method="post"> Announcement Title:<input type="text" name="TITLE"> Announcement Text: <textarea name="TEXT" rows="10" cols="60"></textarea> Announcement Urgency: <select name="URGENCY" type="dropdown"> <option value="No Ugency">No Ugency</option> <option value="Low">Low</option> <option value="Medium">Medium</option> <option value="High">High</option> <option value="Urgent">Urgent</option> </select> Announcement Topic: <select name="TOPIC" type="dropdown"> <option value="Meeting">Meeting</option> <option value="User Scope">User Scope</option> <option value="Ip Track User">Ip Track User</option> <option value="Warnings!">Warnings!</option> <option value="Game Updates">Game Updates</option> <option value="New Events">New Events</option> </select> <input type="hidden" name="POSTED" value="'.$ir['username'].'"> <input type="submit" value="Add Staff Announcement!" /> </form>'; } } Open Up smenu.php Add this link under the original announcement URL > [url='staff.php?action=staffannounce']Staff Announcement[/url] PART 2 TO FOLLOW
-
Re: [mccode v2] Easter Egg Hunt (Finished) Hope ya dont mind FAZ i just updated it slightly... Added compass points instead of text and added a few egg Images for the game... Download images here DOWNLOAD IMAGES HERE Upload the compass images to your root and the egg images to your itmpics folder if you dont have an itmpics folder on your FTP just make one... How to setup the images are numbered from 70-76 These numbers refer to the itemid i set my Items up via the admin panel so if yours are say 124-131 then name the images 124-131.. Then the egg images for that particular item will show when the person finds one. <?php include "globals.php"; print "<h3>Easter Egg Hunt</h3> "; if($ir['hospital']) { die("This page cannot be accessed while in hospital."); } if($ir['easterturns'] < 1) { die("You've already hunted today, come back tomorrow for the next stage"); } switch($_GET['action']) { case 'huntnorth': hunt_north(); break; case 'hunteast': hunt_east(); break; case 'huntsouth':hunt_south(); break; case 'huntwest': hunt_west(); break; default: index(); break; } function hunt_north() { global $db,$ir,$c,$h,$userid; $chance = rand(1,10); $db->query("UPDATE users SET easterturns=easterturns-1 where userid=$userid",$c); if($ir['eastertime'] == 0) { if($ir['easterturns'] == 25) { mysql_query("UPDATE `users` SET `eastertime` = 60, `easterturns` = 24 WHERE `userid` = ".$ir['userid']); //Display first attempt here } } if($ir['eastertime'] < 1) { die("Sorry, time's up! Come back tomorrow for the next hunt"); } if ($chance == 1) { print "You look behind a bush, you think you've found an easter egg, but its only a big rock. "; } if ($chance == 2) { print "Nothing here. "; } if ($chance == 3) { print "Nothing here, just a few stones. "; } if ($chance == 4) { $hosptime=(int) rand(1,5); $loseruser = $ir['userid']; $reasonhosp = 'Tried to beat someone up and failed!'; $db->query("UPDATE users SET hospital=$hosptime WHERE userid=$loseruser",$c); $db->query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); event_add($ir['userid'],"Don't mess with people bigger than you!",$c); die ("You try to beat up a guy with an easter egg. He turns round and beats you down. You wake up in hospital."); } if ($chance == 5) { print "You found an easter egg but a squirrel jumps out and takes it from your hands. "; } if ($chance == 6) { $gain = rand(1,5); print "While looking for easter eggs you coincidencially you found [b]$gain[/b] crystals. "; $db->query("UPDATE users SET crystals=crystals+$gain where userid=$userid",$c); } if ($chance == 7) { $gain = rand(50,100); print "You turn over a rock and find [b] \$$gain[/b]. You pocket it and carry on hunting. "; $db->query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 8) { print "Nothing here. Just a few chavs. "; } if ($chance == 9) { print "You look behind a giant leaf and find an easter egg! Look in your inventory for a special prize! "; $itemidexplore =rand(70,76); $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print "[img=itmpics/$itemidexplore.jpg] "; } if ($chance == 10) { print "You fall into a bush of nettles. You are stinging all over. "; } print "Turns used: {$ir['easterturns']} "; print "Time remaining: {$ir['eastertime']} "; print " [url='easter.php?action=huntnorth'][img=north.gif][/url] [url='easter.php?action=huntwest'][img=west.gif][/url] [url='easter.php?action=hunteast'][img=east.gif][/url] [url='easter.php?action=huntsouth'][img=south.gif][/url]"; } function hunt_east() { global $db,$ir,$c,$h,$userid; $chance = rand(1,10); $db->query("UPDATE users SET easterturns=easterturns-1 where userid=$userid",$c); if($ir['eastertime'] == 0) { if($ir['easterturns'] == 25) { mysql_query("UPDATE `users` SET `eastertime` = 60, `easterturns` = 24 WHERE `userid` = ".$ir['userid']); //Display first attempt here } } if($ir['eastertime'] < 1) { die("Sorry, time's up! Come back tomorrow for the next hunt"); } if ($chance == 1) { print "You look behind a bush, you think you've found an easter egg, but its only a big rock. "; } if ($chance == 2) { print "Nothing here. "; } if ($chance == 3) { print "Nothing here, just a few stones. "; } if ($chance == 4) { $hosptime=(int) rand(1,5); $loseruser = $ir['userid']; $reasonhosp = 'Tried to beat someone up and failed!'; $db->query("UPDATE users SET hospital=$hosptime WHERE userid=$loseruser",$c); $db->query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); event_add($ir['userid'],"Don't mess with people bigger than you!",$c); die ("You try to beat up a guy with an easter egg. He turns round and beats you down. You wake up in hospital."); } if ($chance == 5) { print "You found an easter egg but a squirrel jumps out and takes it from your hands. "; } if ($chance == 6) { $gain = rand(1,5); print "While looking for easter eggs you coincidencially you found [b]$gain[/b] crystals. "; $db->query("UPDATE users SET crystals=crystals+$gain where userid=$userid",$c); } if ($chance == 7) { $gain = rand(50,100); print "You turn over a rock and find [b] \$$gain[/b]. You pocket it and carry on hunting. "; $db->query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 8) { print "Nothing here. Just a few chavs. "; } if ($chance == 9) { print "You look behind a giant leaf and find an easter egg! Look in your inventory for a special prize! "; $itemidexplore =rand(70,76); $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print "[img=itmpics/$itemidexplore.jpg] "; } if ($chance == 10) { print "You fall into a bush of nettles. You are stinging all over. "; } print "Turns used: {$ir['easterturns']} "; print "Time remaining: {$ir['eastertime']} "; print " [url='easter.php?action=huntnorth'][img=north.gif][/url] [url='easter.php?action=huntwest'][img=west.gif][/url] [url='easter.php?action=hunteast'][img=east.gif][/url] [url='easter.php?action=huntsouth'][img=south.gif][/url]"; } function hunt_south() { global $db,$ir,$c,$h,$userid; $chance = rand(1,10); $db->query("UPDATE users SET easterturns=easterturns-1 where userid=$userid",$c); if($ir['eastertime'] == 0) { if($ir['easterturns'] == 25) { mysql_query("UPDATE `users` SET `eastertime` = 60, `easterturns` = 24 WHERE `userid` = ".$ir['userid']); //Display first attempt here } } if($ir['eastertime'] < 1) { die("Sorry, time's up! Come back tomorrow for the next hunt"); } if ($chance == 1) { print "You look behind a bush, you think you've found an easter egg, but its only a big rock. "; } if ($chance == 2) { print "Nothing here. "; } if ($chance == 3) { print "Nothing here, just a few stones. "; } if ($chance == 4) { $hosptime=(int) rand(1,5); $loseruser = $ir['userid']; $reasonhosp = 'Tried to beat someone up and failed!'; $db->query("UPDATE users SET hospital=$hosptime WHERE userid=$loseruser",$c); $db->query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); event_add($ir['userid'],"Don't mess with people bigger than you!",$c); die ("You try to beat up a guy with an easter egg. He turns round and beats you down. You wake up in hospital."); } if ($chance == 5) { print "You found an easter egg but a squirrel jumps out and takes it from your hands. "; } if ($chance == 6) { $gain = rand(1,5); print "While looking for easter eggs you coincidencially you found [b]$gain[/b] crystals. "; $db->query("UPDATE users SET crystals=crystals+$gain where userid=$userid",$c); } if ($chance == 7) { $gain = rand(50,100); print "You turn over a rock and find [b] \$$gain[/b]. You pocket it and carry on hunting. "; $db->query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 8) { print "Nothing here. Just a few chavs. "; } if ($chance == 9) { print "You look behind a giant leaf and find an easter egg! Look in your inventory for a special prize! "; $itemidexplore =rand(70,76); $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print "[img=itmpics/$itemidexplore.jpg] "; } if ($chance == 10) { print "You fall into a bush of nettles. You are stinging all over. "; } print "Turns used: {$ir['easterturns']} "; print "Time remaining: {$ir['eastertime']} "; print " [url='easter.php?action=huntnorth'][img=north.gif][/url] [url='easter.php?action=huntwest'][img=west.gif][/url] [url='easter.php?action=hunteast'][img=east.gif][/url] [url='easter.php?action=huntsouth'][img=south.gif][/url]"; } function hunt_west() { global $db,$ir,$c,$h,$userid; $chance = rand(1,10); $db->query("UPDATE users SET easterturns=easterturns-1 where userid=$userid",$c); if($ir['eastertime'] == 0) { if($ir['easterturns'] == 25) { mysql_query("UPDATE `users` SET `eastertime` = 60, `easterturns` = 24 WHERE `userid` = ".$ir['userid']); //Display first attempt here } } if($ir['eastertime'] < 1) { die("Sorry, time's up! Come back tomorrow for the next hunt"); } if ($chance == 1) { print "You look behind a bush, you think you've found an easter egg, but its only a big rock. "; } if ($chance == 2) { print "Nothing here. "; } if ($chance == 3) { print "Nothing here, just a few stones. "; } if ($chance == 4) { $hosptime=(int) rand(1,5); $loseruser = $ir['userid']; $reasonhosp = 'Tried to beat someone up and failed!'; $db->query("UPDATE users SET hospital=$hosptime WHERE userid=$loseruser",$c); $db->query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$loseruser",$c); event_add($ir['userid'],"Don't mess with people bigger than you!",$c); die ("You try to beat up a guy with an easter egg. He turns round and beats you down. You wake up in hospital."); } if ($chance == 5) { print "You found an easter egg but a squirrel jumps out and takes it from your hands. "; } if ($chance == 6) { $gain = rand(1,5); print "While looking for easter eggs you coincidencially you found [b]$gain[/b] crystals. "; $db->query("UPDATE users SET crystals=crystals+$gain where userid=$userid",$c); } if ($chance == 7) { $gain = rand(50,100); print "You turn over a rock and find [b] \$$gain[/b]. You pocket it and carry on hunting. "; $db->query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 8) { print "Nothing here. Just a few chavs. "; } if ($chance == 9) { print "You look behind a giant leaf and find an easter egg! Look in your inventory for a special prize! "; $itemidexplore =rand(70,76); $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print "[img=itmpics/$itemidexplore.jpg] "; } if ($chance == 10) { print "You fall into a bush of nettles. You are stinging all over. "; } print "Turns used: {$ir['easterturns']} "; print "Time remaining: {$ir['eastertime']} "; print " [url='easter.php?action=huntnorth'][img=north.gif][/url] [url='easter.php?action=huntwest'][img=west.gif][/url] [url='easter.php?action=hunteast'][img=east.gif][/url] [url='easter.php?action=huntsouth'][img=south.gif][/url]"; } function index() { global $db,$ir,$c,$h,$userid; print "<h3>You Are About To Start The 1 Hour Easter Hunt</h3> You Arrive At The Hunt, Ready To Win Some Eggs And Prove Everyone Wrong [url='easter.php?action=huntnorth'][img=north.gif][/url] [url='easter.php?action=huntwest'][img=west.gif][/url] [url='easter.php?action=hunteast'][img=east.gif][/url] [url='easter.php?action=huntsouth'][img=south.gif][/url]"; } $h->endpage; ?>
-
Re: [mccode v2] Easter Egg Hunt (Finished) :)
-
Attack Script made by us one that works Hopefully.
Uridium replied to Uridium's topic in Free Modifications
Re: Attack Script made by us one that works Hopefully. if we stick with the basics first then we can fix some of the major issues on the script, im still working on the crons trying to get the timings right to update the energy bar.... -
Re: [mccode v2] Easter Egg Hunt (Finished) Sorry none of this is anything to do with me its all the work of Notorious :)
-
Re: [mccode v2] New improved mailbox. Ive altered my mainmenu and taken from header to place into mainmenu. so ecuse me if what i place below is in thr wrong area... open main menu make sure you have.. if($mc > 0) { print "[url='mailbox.php']Mailbox <font color=red>[b]($mc)[/b]</font>[/url] "; } else { print "[url='mailbox.php']Mailbox <font color=blue>(0)</font>[/url] "; And at the top of the page with the rest of the $'s make sure you have $mc=$ir['new_mail']; If your mail count still isnt showing check the mailbox script to seeif it updating the mail count.
-
Attack Script made by us one that works Hopefully.
Uridium replied to Uridium's topic in Free Modifications
Re: Attack Script made by us one that works Hopefully. At the moment ive set my crons for the update of health to 10 mins instead of 5 aslo reducing the cron_fivemins.php so that it goes up by 10 each 10 minutes (thus being longer for non donators) The reason everyone is levelling up so fast is.. use of crystals to regenerate health to which on mine ive only allowed them to do this once per day so they are not constantly upgrading all the time. This can be quite easily added to a script by doing this to your trains so your crystal gym would be.. call this cgym.php overwrite your old one or ammend if you dont want to overwrite <?php $macropage = "cgym.php"; if($ir['crystals'] == 0) { die("<h1>Ahem</h1> <h2>You dont have any crystals to train with</h2> [url='index.php']<<< RETURN HOME >>>[/url]"); } if($ir['crystaltrains'] == 0) { die("<h1>Come Back Tomorrow </h1> <h2>You have already trained for today</h2> [url='index.php']<<< RETURN HOME >>>[/url]"); } if($ir['donatordays'] == 0) { die("This feature is for donators only, [url='donator.php']Click Here to become one![/url]"); } if($ir['jail'] > 0) { die("[b]<font color=red size=+1>You are in Jail for {$ir['jail']} more minute(s). Until you are out you can't train</font>[/b] [url='jail.php']Return to Jail[/url]"); } if($ir['hospital'] > 0) { die("[b]<font color=red size=+1>You are in the hospital for {$ir['hospital']} more minute(s). Until you are out you can't train</font>[/b] [url='hospital.php']Return to Trauma Center[/url]"); } if($_GET['crystals']>25) { die("<h1>You cannot use that many crystals</h1> <h2>25 crystals is the most you can use at a single time</h2> [url='index.php']<<< RETURN HOME >>>[/url] "); } if(isset($_GET['train'])) { $tgain=0; { $out=""; for($i=1;$i<=$_GET['crystals'] && $ir['crystals'] > 0;$i++) { if ($ir['crystals'] >= $_GET['crystals']) { $gain=rand(1,3)/rand(800,1500)*rand(800,1500)*(($ir['will']+20)/150)*($ir['maxenergy']/12); $tgain+=$gain; if ($_GET['train']=="IQ") { $gain/=150; } $ir[$_GET['train']]+=$gain; $egain=$gain/10; $ts=$ir[$_GET['train']]; $st=$_GET['train']; $db->query("UPDATE userstats SET $st=$st+".$gain." WHERE userid=$userid",$c) or die("UPDATE userstats SET $st=$st+$gain WHERE userid=$userid ".mysql_error()); $wu=(int) (rand(8,12)); $db->query("UPDATE users SET crystals=crystals-1,will=will-$wu WHERE userid=$userid",$c); $db->query("UPDATE users SET will=0 WHERE will<0",$c); $db->query("UPDATE users SET crystaltrains=0 WHERE userid=$userid",$c); } else { $out="You do not have that many crystals."; } } } $stat=$ir[$st]; $crystals=($ir['crystals']-$_GET['crystals']); $i--; $out="You begin training your $st. You have gained $tgain $st by training it {$_GET['crystals']} times. You now have $stat $st and $crystals crystals left. "; } else { $out="<h3><center>City Riots Elite Gym</center></h3>"; } print "<table width=50% border=1 bordercolor='blue'> <tr><td background='backmain.jpg'>$out</td></tr><tr> <td align=center valign=middle background='backmain.jpg'><center>You can only train upto 25 Crystals Per Day</br> You currently have [b]<font color=red>{$ir['crystals']}</font>[/b] crystals.</center> </td></tr> <tr><td width=50% align=center valign=middle background='backmain.jpg'>"; if ( $ir['crystals'] > 0) { print " <form action='cgym.php' method='get'> Enter the number of crystals you wish to use: <input type='text' name='crystals' value='' /> Stat: <select type='dropdown' name='train'> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='labour'>Labour</option> <option value='guard'>Defense</option></select></td></tr> <tr><td align=center valign=middle background='backmain.jpg'> <input type='submit' value='Train Now!' /></form> <hr /><h3>Stats Info:</h3>"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $arr=urlencode(serialize(array($ir['strength'],$ir['agility'],$ir['guard'],$ir['labour'],$ir['IQ']))); $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); $db->query("UPDATE users SET cgymlimit=cgymlimit+1"); print "<table border='2'><tr><td>[b]Strength:[/b] {$ir['strength']} [Ranked: {$ir['strank']}]</td><td>[b]Agility:[/b] {$ir['agility']} [Ranked: {$ir['agirank']}]</td></tr> <tr><td>[b]Defense:[/b] {$ir['guard']} [Ranked: {$ir['guarank']}]</td><td>[b]Labor:[/b] {$ir['labour']} [Ranked: {$ir['labrank']}]</td></tr> <tr><td>[b]IQ: [/b] {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td><td>[b]Total stats:[/b] {$ts} [Ranked: $tsrank]</td></tr></table>"; } else { print "You do not have any crystals to train with Or an error has occured! Please attempt to visit this page again if you believe you have the proper amount of cyrstals."; } print "</td></tr></td></tr></table>"; $h->endpage(); ?> and add SQL then add this to your daily cron. This will stop multiple crystal training.. Also this Script only allows 25 crystals to be trained at any one time regardless of the amount the person has.. -
Re: [mccode v2] Easter Egg Hunt (Finished) This game would fit in well with the holiday event creator i made a few weeks ago the sqls may need to be altered to worth it but on the whole its pretty good script welldone notorious :) just a quick change to yours though from this ALTER TABLE `users` ADD `easterhunt` INT(11) NOT NULL DEFAULT '25', ADD `eastertime` INT(11) NOT NULL DEFAULT '0'; To this ALTER TABLE `users` ADD `easterturns` INT(11) NOT NULL DEFAULT '25', ADD `eastertime` INT(11) NOT NULL DEFAULT '0';