-
Posts
2,667 -
Joined
-
Last visited
-
Days Won
75
Content Type
Profiles
Forums
Events
Everything posted by Uridium
-
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';
-
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. My concerns regards the attack system isnt the graphical side of it but how it performs. There are so many stupid errors that occur when being attack or taking an attack that just doesnt justify the outcomes. 1 = Players level up way too fast 2 = The Energy bar fills too quickly 3 = Loss of exp 4 = Players with less stats are able to beat players with more stats. Files that need to be taken into concideration are 1 cron_fiveminute.php 2 attack.php 3 attacktake.php 4 attackwin.php 5 attackwon.php 6 attacklost.php We can recuce the amount of time it takes a energy bar to refill by altering the 5 minute cron. Ive already started work on the 5 minute cron to reduce energy increase as a none paying paying donator but i feel the 5 minute cron should be gone and replaced with a greater timescale. -
Re: [mccode v2] Youtube Mod its in the part where you add it to global_func.php or another instance is in youtubevideo.php
-
I really want to fix the problems with the attack script we all know its crap and those that say it isnt are probably blind... As its been proven if we pull our weigh on a script as a team we could make something better (even though i never took part in the last one) oops yes my fault was too usy doing other things.. So why dont we do it and finally get the damn thing working properly.
-
Re: [mccode v2] Most of my Mods if i recall that Joels mods had about 5 or 6 mods included.. so im kinda wondering which mod your referring to.
-
Re: Suicide Bombing How do you work out that by giving it to us for free will result in us thinking its not stolen.. ? Just do what i do edit a script dont put your it, and say to everyone "here guys i made a free mod" :) Its cheap , its chearful and its down right briliant when your not being acused of STEALING :) Someone told me a few days ago that i should sell the mods that i make, because they are useful and well executed. ( now not sounding big headed ) They are right they are well put together. But i dont think ive put enough work into them to say. WOW im shattered i think i'll sell this one.
-
Re: Suicide Bombing OH DEAR. why do people do this Hence why i never put copyright on any of my scripts for the reason most of it has just come from the mcc package so i would be unwise to classify it as a work of my own. Edited Yes Copyrighted NAHHHHHHHH....
-
Re: Businesses Mod [Mccode V2] just add $db to the globals so if its.... global $ir, $inf; then change to global $db, $ir, $inf; and you should be good to go
-
Re: Help with Conversion... Sometimes doing the above can cause other errors i would leave them as they are for now and as you stated before do the first parts. Iv'e found in some cases where ive changed the array to row doesnt always do justice...
-
Re: [MCCODES V2] Abduct someone from Hospital Thats a very clever and ilusive way of thinking Gurpreet. The mods i make are not intended to easily thought about thats why some people think outside the box and add to it.. All i've done is given you the starting block its up to you how you manage it.
-
Re: [MCCODES V2] Abduct someone from Hospital Makes ya kinda proud that i left it in then :)
-
Re: MainMenu Mod! NEW! A Drag n Drop version of this would be a welcome sight :) obviously one that updates the tables aswell...
-
Re: [MCCODES V2] Abduct someone from Hospital Shoutbox i forgot about that bit it doesnt need to be there just i couldnt edit it when i realised it was still in....
-
Thought this was quite funny ;) just lets users see if they can Abduct a user from hospital without being caught themselves.. Call this file hospbust.php <?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); if(!$_GET['ID']) { echo "This user is not in hospital."; } if (!isset($_GET['action'])){ $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=40; echo "Are you sure you want to Abduct {$r['username']} out of hospital? It will cost $energycost energy to Abduct them out of hospital. >[url='hospbust.php?action=yes&ID={$_GET[']Yes[/url] [url='hospital.php']No[/url]<"; } else { //if ($_GET['action']=='yes') { $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=1; $hospitalAbducted=rand(1,10); if ($ir['hospital'] > 0) { echo "You can't Abduct {$r['username']} when your in hospital yourself."; $h->endpage(); exit; } if ($r['hospital'] ==0) { echo "{$r['username']} is already out of hospital."; $h->endpage(); exit; } if ($ir['userid'] == $_GET['ID']) { echo "You Abduct yourself out of hospital."; $h->endpage(); exit; } if ($ir['energy'] < $energycost) { echo "You dont have enough energy to Abduct {$r['username']} out of hospital"; $h->endpage(); exit; } if ($ir['hospital'] > 0) { echo "You can't Abduct {$r['username']} when your the hospital."; $h->endpage(); exit; } if ($ir['userid'] != $_GET['ID']) { $j1per=$db->query("SELECT conf_value FROM settings WHERE conf_id=20",$c); $jj1per=$db->fetch_row($j1per); if ($chance == 1) { } $chance = rand(1,5); } if ($chance == 1) { print "You Successfuly Abducted [b]{$r['username']}[/b] out of hospital"; $db->query("UPDATE users SET hospital=0 WHERE userid={$_GET['ID']}",$c); $db->query("UPDATE users SET hospreason='Not In hospital.' WHERE userid={$_GET['ID']}", $c); $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] Abducted you from hospital.",$c); } if ($chance == 2) { { $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=1; $hospital=(int) rand(1,20); print "You were Beat up by a frenzied OAP whilst trying to Abduct [b]{$r['username']} [/b] and thrown in hospital for $hospital minutes."; $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); $db->query("UPDATE users SET hospital=hospital+$hospital WHERE userid=$userid", $c); $db->query("UPDATE users SET hospreason='Caught Abducting {$r['username']} out of hospital' WHERE userid=$userid", $c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] was Beat Up whilst trying to Abduct you from hospital.",$c); } } if ($chance == 3) { $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=1; $hospital=(int) rand(1,20); print "You were Beat up by a frenzied OAP whilst trying to Abduct [b]{$r['username']} [/b] and thrown in hospital for $hospital minutes."; $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); $db->query("UPDATE users SET hospital=hospital+$hospital WHERE userid=$userid", $c); $db->query("UPDATE users SET hospreason='Caught Abducting {$r['username']} out of hospital' WHERE userid=$userid", $c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] was Beat Up whilst trying to Abduct you from hospital.",$c); } } if ($chance == 4) { print "You Successfuly Abducted [b]{$r['username']}[/b] out of hospital"; $db->query("UPDATE users SET hospital=0 WHERE userid={$_GET['ID']}",$c); $db->query("UPDATE users SET hospreason='Not In hospital.' WHERE userid={$_GET['ID']}", $c); $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] Abducted you from hospital.",$c); } if ($chance == 5) { $qq=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}",$c); $r=$db->fetch_row($qq); $energycost=1; $hospital=(int) rand(1,30); print "You were smashed over the head with a comode whilst trying to Abduct [b]{$r['username']} [/b] and thrown in hospital for $hospital minutes."; $db->query("UPDATE users SET energy=energy-$energycost WHERE userid=$userid",$c); $db->query("UPDATE users SET hospital=hospital+$hospital WHERE userid=$userid", $c); $db->query("UPDATE users SET hospreason='Caught Trying Abducting {$r['username']} out of hospital' WHERE userid=$userid", $c); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] was Beat Up whilst trying to Abduct you from hospital.",$c); } ?> And replace hospital.php with this one. <?php include "globals.php"; echo ' <iframe name="shoutbox" id="shoutbox" src="shoutbox.php" width="100%" frameborder="0"></iframe> <form method="POST" name="shouting" target="shoutbox" action="shoutbox.php"> '.smilies('shouting', 'shout'); if($ir['user_level'] == 2) { echo ' - [[url="shoutbox.php?action=viewbanned"]View Banned[/url]] [[url="shoutbox.php?action=deleteall"]Delete all[/url]]'; } echo '<input type="text" id="shout" name="shout" style="width: 650px;"> <input type="submit" value="Shout!" onclick="window.location=\'hospital.php\';">[url="shoutbox.php"][img=shout-refresh.png][/url] </form>'; if($ir['jail']) { die("<h1>You are in jail so whats the point</h1>"); } print "<h3>Hospital</h3> <table width='75%' class=\"table\" border=\"0\" cellspacing=\"1\"><tr bgcolor=gray><th>Name</th><th>Reason</th><th>Action</th></tr>"; $q=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN gangs c ON u.gang=c.gangID WHERE u.hospital > 0 ORDER BY u.hospital DESC",$c); 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['hospreason']}</td><td>[[url='hospbust.php?ID={$r[']Abduct[/url]]</td></tr>"; } print "</table>"; $h->endpage(); ?> Word of Warning though you can do more harm than good as some Outcomes may see yourself in hosp and the person your trying to save their time has been raised....
-
Re: MainMenu Mod! NEW! Quick fix to allow mailbox and events and also Announcements to be updated.. overwrite your mainmenu.php with this one. <?php global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $mc=$ir['new_mail']; $fm=$ir['money']; $sql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '0' ORDER BY `order`", $c) or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $ec = ($r['name'] == "Events") ? "({$ir['new_events']})" : ""; $mc = ($r['name'] == "Mailbox") ? "({$ir['new_mail']})" : ""; $a = ($r['name'] == "Announcements") ? "({$ir['new_announcements']})" : ""; $j = ($r['name'] == "Jail") ? "({$set['jail_count']})" : ""; $ho = ($r['name'] == "Hospital") ? "({$set['hospital_count']})" : ""; echo '[url="'. $r['link'] .'"]'. $r['name'] .' '. $ec .' '. $mc .' '. $a .' '. $j .' '. $ho .'[/url] '; } if($ir['gang'] > 0) { echo ' [b]Your Gang Area[/b] '; $gsql = mysql_query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '3' ORDER BY `order`", $c) or die(mysql_error()); while ($r = mysql_fetch_array($gsql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } } if($ir['donatordays']) { echo ' [b]Donator Area[/b] '; $dsql = mysql_query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '2' ORDER BY `order`", $c) or die(mysql_error()); while ($r = mysql_fetch_array($dsql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } } if($ir['user_level'] > 1) { echo ' [b]Staff Area[/b] '; $ssql = mysql_query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '1' ORDER BY `order`", $c) or die(mysql_error()); while($r = mysql_fetch_array($ssql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } } ?> For those that are using this script in conjuction with my menu theme and want to add the COIL images then use this.... Big thanks again to HAUNTED for his patience on this one,, dont call this mainmenu.php name it to the default you used when making a new menu theme so for now im calling this one 1.php <?php global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $turns=$ir['search_turns']; $mc=$ir['new_mail']; $fm=$ir['money']; $sql = $db->query('SELECT COUNT(userid) AS num FROM `users` WHERE laston >= UNIX_TIMESTAMP() - 900'); $var = $db->fetch_row($sql); $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ($ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); //$minexp=(int) ($ir['mine_exp']/$ir['mine_needed']*100); //$power=(int) ($ir['power']/$ir['max_power']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $minex=100-$minexp; $pow=100-$power; $zm=money_formatter($ir['money']); $d=""; function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; // Log Suspicious Users // isomerizer.com Copyright 2008+ if ($ir['log'] > 0) { $access = $_SERVER['REQUEST_METHOD']; $log = $_SERVER['REQUEST_URI']; $date = date ('F j, Y'); $time = date('g:i:s a'); $db->query( sprintf("INSERT INTO `logs` ( `ID` , `userid` , `IP` , `action` , `time` , `date` , `access` ) VALUES ( NULL , %u, '%s', '%s', '%s', '%s', '%s')", $userid, $ip, mysql_real_escape_string($log), $time, $date, $access)); } } $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>[url='viewuser.php?u={$ir[']<font color='red'>{$ir['username']}</font>[/url]</font>";$d="[img=donator.gif]"; } $attack_pics = ($ir['attpics']) ? '[img='.$ir['attpics'].']' : 'None, click here to upload'; $gn=""; print"<table width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='round21.jpg'><center>[b]Attack Image[/b]</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center> [url='attackimageuploader.php']".$attack_pics."[/url] <tr> <td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr>"; print "<table width='169' cellpadding='0' cellspacing='0'> <tr> <td width='169' height='39' background='round21.jpg'><center>Player Info</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center> [b]Name:[/b][url='viewuser.php?u={$ir['] $gn{$u} [{$ir['userid']}] $d[/url] Money: {$fm} Level: {$ir['level']} [url='crystalbank.php']Crystals:[/url] {$ir['crystals']} [url="crystaltemple.php?spend=refill><font"][b] [Refill][/b]</font>[/url] [url='bank.php']Bank [/url] [url='cyberbank.php']Cyber Bank[/url] Points: {$ir['points']} [[url='logout.php']Emergency Logout[/url]] </td></tr> <tr> <td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>Player Vitals</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center> [b]Energy:[/b] {$enperc}% [url='crystaltemple.php?spend=refill']<font color='green'>[Refill]</font>[/url] <img src=images/animatedbar.gif width=$enperc height=10><img src=redbar.png width=$enopp height=10> [b]Will:[/b] {$wiperc}% <img src=images/animatedbar.gif width=$wiperc height=10><img src=redbar.png width=$wiopp height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=images/animatedbar.gif width=$brperc height=10><img src=redbar.png width=$bropp height=10> [b]EXP:[/b] {$experc}% <img src=images/animatedbar.gif width=$experc height=10><img src=redbar.png width=$exopp height=10> [b]Health:[/b] {$hpperc}% <img src=images/animatedbar.gif width=$hpperc height=10><img src=redbar.png width=$hpopp height=10> <hr /></td></tr> <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>User Menu</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center>"; $sql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '0' ORDER BY `order`", $c) or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $ec = ($r['name'] == "Events") ? "({$ir['new_events']})" : ""; $mc = ($r['name'] == "Mailbox") ? "({$ir['new_mail']})" : ""; $a = ($r['name'] == "Announcements") ? "({$ir['new_announcements']})" : ""; $j = ($r['name'] == "Jail") ? "({$set['jail_count']})" : ""; $ho = ($r['name'] == "Hospital") ? "({$set['hospital_count']})" : ""; echo '[url="'. $r['link'] .'"]'. $r['name'] .' '. $ec .' '. $mc .' '. $a .' '. $j .' '. $ho .'[/url] '; } echo '</td> </tr>'; if($ir['gang'] > 0) { print " <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>Your Gang</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center>"; $gsql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '3' ORDER BY `order`", $c) or die(mysql_error()); while ($r = mysql_fetch_array($gsql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } echo '</td> </tr>'; } if($ir['donatordays']) { print " <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>Donator Menu</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center>"; $dsql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '2' ORDER BY `order`", $c) or die(mysql_error()); while ($r = mysql_fetch_array($dsql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } echo '</td> </tr>'; } if($ir['user_level'] > 1) { print " <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> <td width='169' height='39' background='round21.jpg'><center>Staff Only</td></tr> <tr> <td width='169' background='round17a.jpg' valign='top'><center>"; $ssql = $db->query("SELECT * FROM `mainmenu` WHERE `active` = '0' && `staff` = '1' ORDER BY `order`", $c) or die(mysql_error()); while($r = mysql_fetch_array($ssql)) { echo '[url="'. $r['link'] .'"]'. $r['name'] .'[/url] '; } echo "</td> <tr><td width='169' height='21' height='21' background='round20.jpg'><center></td></tr><tr><td> </td></tr> <tr> </tr>"; } echo '</table>'; ?>
-
Re: MainMenu Mod! NEW! Big thanks to eagle eyd Haunted for spotting this :) On crazy's mainmenu.php we found the cause of my error for the reporting of the endpage() find $h = ($r['name'] == "Hospital") ? "({$set['hospital_count']})" : ""; echo '[url="'. $r['link'] .'"]'. $r['name'] .' '. $e .' '. $m .' '. $a .' '. $j .' '. $h .'[/url] '; Replace with $ho = ($r['name'] == "Hospital") ? "({$set['hospital_count']})" : ""; echo '[url="'. $r['link'] .'"]'. $r['name'] .' '. $e .' '. $m .' '. $a .' '. $j .' '. $ho .'[/url] '; The problem consisted because MCC already uses $h as it cause to End so on Crazy's We just alter his $h to $ho to compensate for it..