-
Posts
144 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by KiX
-
Re: [mccode v2] Donator and Non-Donator Lottery I presume you have added the lot_DON to your users table right? Is that happening when the cron runs?
-
[MOD] ALL VERSIONS Interactive Radio station for your members
KiX replied to Uridium's topic in Free Modifications
Re: [MOD] ALL VERSIONS Interactive Radio station for your members d00d I will definitely try it out. this is fantastic! +1 for you -
Re: [mccode v2] Display Cabinet Well apparently you did not create the table. did u run the SQL info I put in the post?
-
Re: [mccode v2] Fight the good Fight Good one mate. I have something similar, but I have also included another little sniplet there to avoid people from using 2 screens for example. Some people are loading 2 browsers. 1 to attack and 1 to use their health packs to continue on healing themselves. under illussions code add if ($ir['attacking'] > 0 && $ir['attacking']!=$_GET['ID']) { $att=$db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); session_unset(); session_destroy(); die("[url='login.php']Continue to login...[/url]"); } +1 for you though. I am a great fan of your mods!
-
Re: [mccode v2] Display Cabinet I will just paste the entire code, because I am not getting any errors display.php <?php include "globals.php"; if ($_GET['ID'] == $ir['userid']) { print " <h1>MY DISPLAY CABINET</h1>"; $display=$db->query("SELECT * FROM display WHERE disp_userid=$userid"); $mydisplay=$db->fetch_row($display); //check if I have bought the display cabinet. If yes, show display cabinet. if ($ir['display'] > 0) { print "Welcome to your personal display cabinet. Here you will be able to store all your personal items without cluttering your inventory. You will also be able to show off to the other citizens all the good stuff you have. "; //start showing display cabinet. $disp=$db->query("SELECT iv.*,i.*,it.* FROM display iv LEFT JOIN items i ON iv.disp_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.disp_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($disp) == 0) { print "<font color=red>[b]You have no items![/b]</font>"; } else { print "<font color=yellow>[b]Your item(s) are listed below.[/b] </font> <table width=35% class="table" border="0" cellspacing="1"> <tr> <td align='center' class="h">Item</td> <td align='center' class="h">Item Pic</td> <td align='center' class="h">Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($disp)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4>[b]{$lt}[/b]</td></tr>"; } print "<tr><td>{$i['itmname']}"; if ($i['disp_qty'] > 1) { print " x{$i['disp_qty']}"; } print "</td>"; print"<td><center>[img=itmpics/{$i[]</center>"; print "</td>"; print"<td><center>[url='displayrem.php?ID=$userid&action=remit&itm={$i[']Move Back To Inventory[/url]</center>"; print "</td>"; print "</tr>"; } print "</table>"; } }else{ $price = 1000; print "Welcome to your personal display cabinet. Here you will be able to store all your personal items without cluttering your inventory. You will also be able to show off to the other citizens all the good stuff you have. Obtain your own Display Cabinet for the low price of $price credits. "; if ($_GET['buy'] == "yes") { if ($ir['credits']<$price) { print "<font color=red>Sorry, but you do not have enough credits to purchase the Display Cabinet.</font>"; } else { $db->query("UPDATE users SET display=1, credits=credits-$price where userid=$userid",$c); print "<font color=green>Congratulations! You have bought the Display Cabinet. Go to your [url='inventory.php']inventory[/url] to start adding things to it.</font>"; } }else{ print "[url='?ID=$userid&buy=yes']Lets Buy It![/url]"; } } }else{ $userdisplay=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); $userdisplay=$db->fetch_row($userdisplay); print " <h1>{$userdisplay['username']}'s DISPLAY CABINET</h1>"; print "Welcome to {$userdisplay['username']}'s personal display cabinet. Here you will be able to see all of the personal items {$userdisplay['username']} has to show. "; //start showing user display cabinet. $disp=$db->query("SELECT iv.*,i.*,it.* FROM display iv LEFT JOIN items i ON iv.disp_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.disp_userid={$_GET['ID']} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($disp) == 0) { print "<font color=red>[b]{$userdisplay['username']} has no items![/b]</font>"; } else { print "<font color=yellow>[b]{$userdisplay['username']}'s item(s) are listed below.[/b] </font> <table width=35% class="table" border="0" cellspacing="1"> <tr> <td align='center' class="h">Item</td> <td align='center' class="h">Item Pic</td> </tr>"; $lt=""; while($i=$db->fetch_row($disp)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4>[b]{$lt}[/b]</td></tr>"; } print "<tr><td>{$i['itmname']}"; if ($i['disp_qty'] > 1) { print " x{$i['disp_qty']}"; } print "</td>"; print"<td><center>[img=itmpics/{$i[]</center>"; print "</td>"; print "</tr>"; } print "</table>"; } } $h->endpage(); ?>
-
Re: [mccode v2] Display Cabinet Good point. Here is the fix for that. find this code in display.php if ($_GET['buy'] == "yes") { $db->query("UPDATE users SET display=1, credits=credits-$price where userid=$userid",$c); print "<font color=green>Congratulations! You have bought the Display Cabinet. Go to your [url='inventory.php']inventory[/url] to start adding things to it.</font>"; }else{ print "[url='?ID=$userid&buy=yes']Lets Buy It![/url]"; } and replace with if ($_GET['buy'] == "yes") { if ($ir['credits']<$price) { print "<font color=red>Sorry, but you do not have enough credits to purchase the Display Cabinet.</font>"; } else { $db->query("UPDATE users SET display=1, credits=credits-$price where userid=$userid",$c); print "<font color=green>Congratulations! You have bought the Display Cabinet. Go to your [url='inventory.php']inventory[/url] to start adding things to it.</font>"; } }else{ print "[url='?ID=$userid&buy=yes']Lets Buy It![/url]"; } Remember that you need to change credits for crystals for it to work for you.
-
Re: [mccode v2] Display Cabinet here is the SQL table without the ` SQL query: CREATE TABLE display ( disp_id INT( 11 ) NOT NULL AUTO_INCREMENT , disp_itemid INT( 11 ) NOT NULL , disp_userid INT( 11 ) NOT NULL , disp_qty INT( 11 ) NOT NULL DEFAULT '0', PRIMARY KEY ( disp_id ) ) ALTER TABLE users ADD display int(1) NOT NULL DEFAULT '0';
-
Re: [mccode v2] Display Cabinet Your like me Zero :P, you hate them.... and i dont stop banging on about tables :P lol. how can i edit if my ip is different. It won't let me edit it out :(
-
Re: [mccode v2] Display Cabinet yeah i forgot to take em out, but i will do that now.
-
Re: [mccode v2] Display Cabinet I must admit I still do not understand much about what I can post or not. I made this from scratch, just took some code from the inventory, but that is it. hehe np Tezza.
-
Re: [mccode v2] Display Cabinet at a quick reminder about my scripts. I do not use crystals, instead they are called credits, so you will have to modify the code accordingly.
-
Re: [mccode v2] Display Cabinet It moves items from your inventory to your display cabinet for others to see what you have. So you can just keep in your inventory the items you need.
-
I don't know if this was made already, but here it is. I made this mostly from scratch, taking a bit of code from the inventory. But mostly I made it. I know you can tweak it to make it better, but It is good for our needs. So here it goes. First make a file called display.php <?php include "globals.php"; if ($_GET['ID'] == $ir['userid']) { print " <h1>MY DISPLAY CABINET</h1>"; $display=$db->query("SELECT * FROM display WHERE disp_userid=$userid"); $mydisplay=$db->fetch_row($display); //check if I have bought the display cabinet. If yes, show display cabinet. if ($ir['display'] > 0) { print "Welcome to your personal display cabinet. Here you will be able to store all your personal items without cluttering your inventory. You will also be able to show off to the other citizens all the good stuff you have. "; //start showing display cabinet. $disp=$db->query("SELECT iv.*,i.*,it.* FROM display iv LEFT JOIN items i ON iv.disp_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.disp_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($disp) == 0) { print "<font color=red>[b]You have no items![/b]</font>"; } else { print "<font color=yellow>[b]Your item(s) are listed below.[/b] </font> <table width=35% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td align='center' class=\"h\">Item</td> <td align='center' class=\"h\">Item Pic</td> <td align='center' class=\"h\">Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($disp)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4>[b]{$lt}[/b]</td></tr>"; } print "<tr><td>{$i['itmname']}"; if ($i['disp_qty'] > 1) { print " x{$i['disp_qty']}"; } print "</td>"; print"<td><center>[img=itmpics/{$i[]</center>"; print "</td>"; print"<td><center>[url='displayrem.php?ID=$userid&action=remit&itm={$i[']Move Back To Inventory[/url]</center>"; print "</td>"; print "</tr>"; } print "</table>"; } }else{ $price = 1000; print "Welcome to your personal display cabinet. Here you will be able to store all your personal items without cluttering your inventory. You will also be able to show off to the other citizens all the good stuff you have. Obtain your own Display Cabinet for the low price of $price credits. "; if ($_GET['buy'] == "yes") { $db->query("UPDATE users SET display=1, credits=credits-$price where userid=$userid",$c); print "<font color=green>Congratulations! You have bought the Display Cabinet. Go to your [url='inventory.php']inventory[/url] to start adding things to it.</font>"; }else{ print "[url='?ID=$userid&buy=yes']Lets Buy It![/url]"; } } }else{ $userdisplay=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); $userdisplay=$db->fetch_row($userdisplay); print " <h1>{$userdisplay['username']}'s DISPLAY CABINET</h1>"; print "Welcome to {$userdisplay['username']}'s personal display cabinet. Here you will be able to see all of the personal items {$userdisplay['username']} has to show. "; //start showing user display cabinet. $disp=$db->query("SELECT iv.*,i.*,it.* FROM display iv LEFT JOIN items i ON iv.disp_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.disp_userid={$_GET['ID']} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($disp) == 0) { print "<font color=red>[b]{$userdisplay['username']} has no items![/b]</font>"; } else { print "<font color=yellow>[b]{$userdisplay['username']}'s item(s) are listed below.[/b] </font> <table width=35% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td align='center' class=\"h\">Item</td> <td align='center' class=\"h\">Item Pic</td> </tr>"; $lt=""; while($i=$db->fetch_row($disp)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4>[b]{$lt}[/b]</td></tr>"; } print "<tr><td>{$i['itmname']}"; if ($i['disp_qty'] > 1) { print " x{$i['disp_qty']}"; } print "</td>"; print"<td><center>[img=itmpics/{$i[]</center>"; print "</td>"; print "</tr>"; } print "</table>"; } } $h->endpage(); ?> Make a file called displayadd.php <?php include "globals.php"; if ($_GET['ID'] == $ir['userid']) { switch($_GET['action']) { case "addit": addit(); break; default: index(); break; } } function index() { global $db, $ir,$c,$userid,$h; print " [b]Welcome to your Display Cabinet[/b] From this utility you will be able to add items into your Display Cabinet. "; $display=$db->query("SELECT * FROM items WHERE itmid={$_GET['itm']}"); $mydisplay=$db->fetch_row($display); $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} AND iv.inv_itemid={$_GET['itm']} ORDER BY i.itmtype ASC, i.itmname ASC"); $itemcnt=$db->fetch_row($inv); print " <table width='75%' cellspacing=1 class='table'> <tr> <td width='50%'>[b]Store Item[/b] <form action='displayadd.php?ID=$userid&action=addit&itm={$_GET['itm']}' method='post'> Item: {$mydisplay['itmname']} Amount: <input type='text' name='add' value='{$itemcnt['inv_qty']}' /> <input type='submit' value='Store' /></form> </td> </tr> </table>"; } function addit() { global $db,$ir,$c,$userid,$h; $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} AND iv.inv_itemid={$_GET['itm']} ORDER BY i.itmtype ASC, i.itmname ASC"); $itemcnt=$db->fetch_row($inv); $display=$db->query("SELECT * FROM display WHERE disp_userid=$userid AND disp_itemid={$_GET['itm']}"); $mydisplay=$db->fetch_row($display); $_POST['add']=abs((int) $_POST['add']); if($_POST['add'] > $itemcnt['inv_qty']) { print "You don't have that amount of items.."; } else { if ($mydisplay['disp_itemid'] >0) { $db->query("UPDATE display SET disp_qty=disp_qty+{$_POST['add']} where disp_userid=$userid AND disp_itemid={$_GET['itm']}"); item_remove($userid, $_GET['itm'], $_POST['add']); } else { $db->query("INSERT INTO display VALUES ('',{$_GET['itm']},$userid,{$_POST['add']})"); item_remove($userid, $_GET['itm'], $_POST['add']); } print "[b]You have sent your {$i['itmname']} to your Display Cabinet[/b] [url='display.php?ID=$userid']> Go to Display Cabinet[/url]"; } } $h->endpage(); ?> Make a file called displayrem.php <?php include "globals.php"; if ($_GET['ID'] == $ir['userid']) { switch($_GET['action']) { case "remit": remit(); break; default: die("Error!"); break; } } function remit() { global $db,$ir,$c,$userid,$h; $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} AND iv.inv_itemid={$_GET['itm']} ORDER BY i.itmtype ASC, i.itmname ASC"); $itemcnt=$db->fetch_row($inv); $display=$db->query("SELECT * FROM display WHERE disp_userid=$userid AND disp_itemid={$_GET['itm']}"); $mydisplay=mysql_num_rows($display); $checkdisp=$db->fetch_row($display); if($mydisplay < 1) { die("You don't have that amount of items.."); } else { if ($checkdisp['disp_qty'] <= 1) { $db->query("DELETE FROM display WHERE disp_id = {$checkdisp['disp_id']} LIMIT 1"); }else{ $db->query("UPDATE display SET disp_qty=disp_qty-1 WHERE disp_userid=$userid AND disp_itemid={$_GET['itm']}"); } item_add($userid, $_GET['itm'], 1); print "[b]You have sent your {$i['itmname']} to your Inventory[/b] [url='inventory.php?ID=$userid']> Go to your Inventory[/url]"; } } $h->endpage(); ?> **Find inventory.php** if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']Equip as Armor[/url]]"; } and add underneath print " [[url='displayadd.php?ID=$userid&action=add&itm={$i[']Display[/url]]"; **Find in viewuser.php** [[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]]"; and replace with [[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]] [[url='display.php?ID={$r[']Display Cabinet[/url]]"; SQL query SQL query: CREATE TABLE `display` ( `disp_id` INT( 11 ) NOT NULL AUTO_INCREMENT , `disp_itemid` INT( 11 ) NOT NULL , `disp_userid` INT( 11 ) NOT NULL , `disp_qty` INT( 11 ) NOT NULL DEFAULT '0', PRIMARY KEY ( `disp_id` ) ) ALTER TABLE `users` ADD `display` int(1) NOT NULL DEFAULT '0'; Hope you like it. I have added itmpics from another mod I use. I don't remember who made it, but it is available here as well. Enjoy it!
-
Re: [mccode v2] Thanksgiving Treats Yes Finally I get the infamous Zero to comment! I feel honoured, and yes you are right. That will be my next task I think. Thanks for +1 though.
-
Well this is just a quick mod adapted from search the streets. I made it in a few minutes so I hope you like it. Instructions: You will have to create a few items and substitute $itemidexplore = xxx; to you own item numbers. Create a file called thanksgiving.php <?php include "globals.php"; print " <h1>UE ThanksGiving 2008</h1> "; $thankssearch=$db->query("SELECT * FROM thanksgiving WHERE thanksUSER=$userid"); $thanks=$db->fetch_row($thankssearch); if (empty($thanks['thanksID'])) { $db->query("INSERT INTO thanksgiving VALUES('',$userid,'50','50','50','50','50')"); $itemidexplore = 120; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); } if ($_GET['action'] != 'door') { print " Gobble Gobble. Yes, those were the last word of Bobby, my turkey pet. I must say that it was a sad moment, but boy, was he delicious. Since I had such a wonderful Halloween, I decided to include all of you in my ThanksGiving Festivities. All you have to do is choose a door and let the fun being. </p>"; print" <table style='text-align: top; width: 50%;' border='0' cellpadding='2' cellspacing='2'> <tr> <td align='center'> <a href='?action=door&door=1'>[img=thanksgiving2008/door.jpg] Door 1</a> Turns Left: {$thanks['turn1']} </td> <td align='center'> <a href='?action=door&door=2'>[img=thanksgiving2008/door.jpg] Door 2</a> Turns Left: {$thanks['turn2']} </td> <td align='center'> <a href='?action=door&door=3'>[img=thanksgiving2008/door.jpg] Door 3</a> Turns Left: {$thanks['turn3']} </td> <td align='center'> <a href='?action=door&door=4'>[img=thanksgiving2008/door.jpg] Door 4</a> Turns Left: {$thanks['turn4']} </td> <td align='center'> <a href='?action=door&door=5'>[img=thanksgiving2008/door.jpg] Door 5</a> Turns Left: {$thanks['turn5']} </td> </tr> </table> "; } if ($_GET['door'] > 0) { $doorturn = "turn".$_GET['door']; $steps=abs((int) $thanks[$doorturn]); if (empty($steps) OR $steps <= 0) { print "Sorry you have used all your turns on this door. "; print "[url='thanksgiving.php']Try Another Door?[/url] "; }else{ $chance = rand(1,10); //give some gifts if ($chance == 1) { print "Gobble. Gobble. Try again!"; print" "; } if ($chance == 2) { $gain = rand(5,50); print "You open the door and you find [b]$gain[/b] credits! WAY TO GO!!!"; $db->query("UPDATE users SET credits=credits+$gain where userid=$userid",$c); print" "; } if ($chance == 3) { print "You walk in and laying in the floor you find a Bag of Treats! Nice one!"; $itemidexplore = 103; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print" "; } if ($chance == 4) { print "Eeeeek! Get out you pervert!!!"; print" "; } if ($chance == 5) { print "Gobble. Gobble. Boom. Bam. Cut. Slip. HAHAHA, got him this time. Nice Turkey!"; $itemidexplore = 121; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print" "; } if ($chance == 6) { $gain = rand(50000,1000000); print "What is that shining in the floor? Wow you just found [b] \$$gain[/b]. "; $db->query("update users set money=money+$gain where userid=$userid",$c); } if ($chance == 7) { print "You walk in and laying in the floor you find a Points Pack! Nice one!"; $itemidexplore = 111; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print" "; } if ($chance == 8) { print "Gobble. Gobble. Try again!"; print" "; } if ($chance == 9) { print "You walk in and laying in the floor you find a Donator Lottery Ticket! Good Luck!"; $itemidexplore = 115; $db->query("INSERT INTO inventory VALUES('',$itemidexplore,$userid,1)",$c); print" "; } if ($chance == 10) { print "You open the door and a pile of carving knifes fall on you. "; $hosptime=(int) rand(1,5); $reasonhosp = 'Who is the turkey now?'; $db->query("UPDATE users SET hospital=$hosptime WHERE userid=$userid",$c); $db->query("UPDATE users SET hospreason='$reasonhosp' WHERE userid=$userid",$c); $thankssearch=$db->query("UPDATE thanksgiving SET $doorturn=$doorturn-1 WHERE thanksUSER=$userid"); event_add($ir['userid'],"Ouch! Those knifes were sharp",$c); die ("Next time wear protection. "); } //finish it off $thankssearch=$db->query("UPDATE thanksgiving SET $doorturn=$doorturn-1 WHERE thanksUSER=$userid"); print "You have {$thanks[$doorturn]} turn(s) left. "; print "[url='?action=door&door={$_GET[']Try Again?[/url] "; print "OR "; print "[url='thanksgiving.php']Try Another Door?[/url] "; } } $h->endpage; ?> SQL CREATE TABLE IF NOT EXISTS `thanksgiving` ( `thanksID` int(2) NOT NULL auto_increment, `thanksUSER` varchar(255) NOT NULL, `turn1` int(2) NOT NULL default '50', `turn2` int(2) NOT NULL default '50', `turn3` int(2) NOT NULL default '50', `turn4` int(2) NOT NULL default '50', `turn5` int(2) NOT NULL default '50', KEY `thanksID` (`thanksID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; For the door I just downloaded the following image.
-
Re: [mccode v2] Donator and Non-Donator Lottery What problems are you having?
-
Re: [mccode v2] Donator and Non-Donator Lottery For that question you are best asking your host. Each of them are different. It is not usually a http, but a direct link to it.
-
Re: [mccode v2] Donator and Non-Donator Lottery in the cpanel, you just need to put when u want it to run.
-
Re: [mccode v2] Improved Security on Attack System my apologies....... it was supposed to be ALTER TABLE `users` ADD `attchk` INT(2) NOT NULL DEFAULT '1';
-
[mccodes v2] Find random items while playing the game...
KiX replied to MDK666's topic in Free Modifications
Re: [mccodes v2] Find random items while playing the game... Worked gr8! I will definitely use it on my site Underground Evolution. Good one. +1 -
Well, I got tired of ppl refreshing and pressing the back button to beat our npcs. So I made this little mod. There are a few out there, but I do not think they are safe enough. Yes, I know you can do this with cookies, but I am just a noob at this coding stuff. I did not know how to do it, so I did it this way. :) You will need to edit all the attack files. So lets start. attacktake.php - Find this line print "You beat {$r['username']} "; and add underneath $db->query("UPDATE users SET attchk=1 WHERE userid=$userid"); attacklost.php - Find this line $r=$db->fetch_row($od); and add underneath $db->query("UPDATE users SET attchk=1 WHERE userid=$userid"); attackbeat.php - Find this line $hosptime=rand(50,150)+floor($ir['level']/2); and add underneath $db->query("UPDATE users SET attchk=1 WHERE userid=$userid"); attackwon.php - Find this line $stole=round($r['money']/(rand(200,5000)/10)); and add underneath $db->query("UPDATE users SET attchk=1 WHERE userid=$userid"); and finally .... attack.php - Find this line if(rand(1,100) <= $hitratio) and add ON TOP OF IT, NOT UNDERNEATH $db->query("UPDATE users SET attchk=1 WHERE userid=$userid"); Find this line $mw=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']})"); and add underneath if(($youdata['attchk'] != $_GET['nextstep']) AND ($youdata['attchk'] > 1)) { print"Hmm, we do not like Cheaters you know! [url='index.php']> Back[/url]"; $db->query("UPDATE users SET attchk=1, hospital=300, hospreason='Cheating whilst attacking' WHERE userid=$userid"); stafflog_add("{$youdata['username']} WAS CHEATING IN ATTACK!!!!"); die; } You will need to add attchk to your users table ALTER TABLE `users` ADD `test` INT(2) NOT NULL DEFAULT '1'; And that is it. :) enjoy!!
-
Re: Donator and Non-Donator Lottery [V2] Yes there needs to be 2 items. One of the lottery tickets is bought through explore and the other one when you donate to paypal. When you receive the item, you will see it in your inverntory and you decide if you want to use it in this month's draw, sell it, or send it to someone. Once you use it, you will see in the top of your inventory a link to see all your purchased lottery tickets for the month with its assigned lottery ticket. At the end of the month, the cron chooses randomly the winner and then the prize to both the donator and non-donator lottery winners.
-
Re: Donator and Non-Donator Lottery [V2] ahh ok I think I know why. I currently have my items that they can give you upto 5 effects, where as mccodes only comes with 3 as default. find all this code and delete it if($r['effect4_on']) { $einfo=unserialize($r['effect4']); if($einfo['inc_type']=="percent") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $inc=round($ir['max'.$einfo['stat']]/100*$einfo['inc_amount']); } else { $inc=round($ir[$einfo['stat']]/100*$einfo['inc_amount']); } } else { $inc=$einfo['inc_amount']; } if($einfo['dir']=="pos") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $ir[$einfo['stat']]=min($ir[$einfo['stat']]+$inc, $ir['max'.$einfo['stat']]); } else { $ir[$einfo['stat']]+=$inc; } } else { $ir[$einfo['stat']]=max($ir[$einfo['stat']]-$inc, 0); } $upd=$ir[$einfo['stat']]; if(in_array($einfo['stat'], array('strength', 'agility', 'guard', 'labour', 'IQ'))) { $db->query("UPDATE `userstats` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } else { $db->query("UPDATE `users` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } } if($r['effect5_on']) { $einfo=unserialize($r['effect5']); if($einfo['inc_type']=="percent") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $inc=round($ir['max'.$einfo['stat']]/100*$einfo['inc_amount']); } else { $inc=round($ir[$einfo['stat']]/100*$einfo['inc_amount']); } } else { $inc=$einfo['inc_amount']; } if($einfo['dir']=="pos") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $ir[$einfo['stat']]=min($ir[$einfo['stat']]+$inc, $ir['max'.$einfo['stat']]); } else { $ir[$einfo['stat']]+=$inc; } } else { $ir[$einfo['stat']]=max($ir[$einfo['stat']]-$inc, 0); } $upd=$ir[$einfo['stat']]; if(in_array($einfo['stat'], array('strength', 'agility', 'guard', 'labour', 'IQ'))) { $db->query("UPDATE `userstats` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } else { $db->query("UPDATE `users` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } }
-
Re: Donator and Non-Donator Lottery [V2] hehe i think u cut a bit too much :) I would try to copy/paste it from scratch then do a fing/replace for Credit and make it Crystal credit and make it crystal -case sensitive-
-
Re: Donator and Non-Donator Lottery [V2] d00d I was really half asleep when i posted this.. yes there is something in day cron. in your daily cron file find $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); paste this under $db->query("UPDATE users SET lotterycap=10",$c); Thanks Castle