oxidati0n Posted July 23, 2007 Share Posted July 23, 2007 This is really good.. I've only thought of the mod just now. This is good if you delete players regulary on your game, This allows those slots to be filled in without no need in trying. Tested and Works Firstly Run this SQL You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Next open register.php and find where it says You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now add this to your daysold.php cron You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Updated---- Your done! Please give me +1 REMEMBER: If you want quality mods like these always buy from http://www.netcodesuk.com/mods.php. Quote Link to comment Share on other sites More sharing options...
YoungGold Posted July 23, 2007 Share Posted July 23, 2007 Re: [V1] FREE! ID refiller/counter great mod +1 for u i was looking for one of these great addition just going to add it now Quote Link to comment Share on other sites More sharing options...
YoungGold Posted July 23, 2007 Share Posted July 23, 2007 Re: [V1] FREE! ID refiller/counter it didn't work for me but then again im using v2 would ya mind converting :D i would do it but im a schedule Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted July 23, 2007 Share Posted July 23, 2007 Re: [V1] FREE! ID refiller/counter 1 prob if i delete someone wont the user it fills the thing with wont there id change Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted July 23, 2007 Share Posted July 23, 2007 Re: [V1] FREE! ID refiller/counter I guess you have to wait a day for this mod to kick in? :wink: Needed something like this just deleted 700 user's. :/ Quote Link to comment Share on other sites More sharing options...
oxidati0n Posted July 23, 2007 Author Share Posted July 23, 2007 Re: [V1] FREE! ID refiller/counter lol set it to every hour then? Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted July 23, 2007 Share Posted July 23, 2007 Re: [V1] FREE! ID refiller/counter Shouldn't there be a query somewhere to delete from the free_id's table. Like after a user registers, it should delete that id from the free_id's table? Quote Link to comment Share on other sites More sharing options...
YoungGold Posted July 24, 2007 Share Posted July 24, 2007 Re: [V1] FREE! ID refiller/counter o no wonder it dont work im so dumb lol the reason it didn't work for me is because i dont have my crons wokring atm as im the only one on my game ocding it lol Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted July 24, 2007 Share Posted July 24, 2007 Re: [V1] FREE! ID refiller/counter Ya...It won't work for anyone without the delete query. Quote Link to comment Share on other sites More sharing options...
oxidati0n Posted July 24, 2007 Author Share Posted July 24, 2007 Re: [V1] FREE! ID refiller/counter Ya...It won't work for anyone without the delete query. Yep thanks zaver. I completely forgot. +1 Quote Link to comment Share on other sites More sharing options...
Z?v?? Posted July 24, 2007 Share Posted July 24, 2007 Re: [V1] FREE! ID refiller/counter Still don't work properly. If you don't have any id's in the free_id's table then it gives a query error. You need to have it to where it only deletes from the free_id's table if there is something in it. Quote Link to comment Share on other sites More sharing options...
chaoswar4u Posted July 26, 2007 Share Posted July 26, 2007 Re: [V1] FREE! ID refiller/counter Come on OXI dont ditch this bro. This would be great for all users. :mrgreen: Quote Link to comment Share on other sites More sharing options...
3XTR3M3 Posted July 27, 2007 Share Posted July 27, 2007 Re: [V1] FREE! ID refiller/counter nice mod oxi Quote Link to comment Share on other sites More sharing options...
chaoswar4u Posted August 5, 2007 Share Posted August 5, 2007 Re: [V1] FREE! ID refiller/counter Id Refiller Counter V2 CREATE TABLE free_ids ( id INT( 11 ) NOT NULL ) TYPE=MYISAM ; Add to cron_day $q=$db->query("SELECT userid FROM users ORDER BY userid DESC"); $total=$db->num_rows($q); while($total > 0) { $q2=$db->query("SELECT * FROM users WHERE userid={$total}"); $q3=$db->query("SELECT * FROM free_ids WHERE id={$total}"); if($db->num_rows($q2) == 0 and $db->num_rows($q3) == 0) { $db->query("INSERT INTO free_ids (id) VALUES ({$total});"); } $total--; } In register.php Find $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES( '{$username}', '{$_POST['username']}', md5('{$_POST['password']}'), 1, $sm, 1, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', unix_timestamp(), '{$_POST['email']}', -1, '$ip');") $i=mysql_insert_id($c); Replace $getidq=$db->query("SELECT * FROM free_ids ORDER BY id DESC LIMIT 1;"); if($db->num_rows($getidq) == 0) { $id=""; } else { $getid=$db->fetch_row($getidq); $id=$getid['id']; } if($db->num_rows($getidq)) { $db->query("DELETE FROM free_ids WHERE id={$id}"); } $db->query("INSERT INTO users (userid, username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES('$id' ,'{$username}', '{$_POST['username']}', md5('{$_POST['password']}'), 1, $sm, 1, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); $i=mysql_insert_id($c); This is my V2 of this mod from OXI. Works perfect. +1 for you oxi Quote Link to comment Share on other sites More sharing options...
oxidati0n Posted August 5, 2007 Author Share Posted August 5, 2007 Re: [V1] FREE! ID refiller/counter Id Refiller Counter V2 CREATE TABLE free_ids ( id INT( 11 ) NOT NULL ) TYPE=MYISAM ; Add to cron_day $q=$db->query("SELECT userid FROM users ORDER BY userid DESC"); $total=$db->num_rows($q); while($total > 0) { $q2=$db->query("SELECT * FROM users WHERE userid={$total}"); $q3=$db->query("SELECT * FROM free_ids WHERE id={$total}"); if($db->num_rows($q2) == 0 and $db->num_rows($q3) == 0) { $db->query("INSERT INTO free_ids (id) VALUES ({$total});"); } $total--; } In register.php Find $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES( '{$username}', '{$_POST['username']}', md5('{$_POST['password']}'), 1, $sm, 1, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', unix_timestamp(), '{$_POST['email']}', -1, '$ip');") $i=mysql_insert_id($c); Replace $getidq=$db->query("SELECT * FROM free_ids ORDER BY id DESC LIMIT 1;"); if($db->num_rows($getidq) == 0) { $id=""; } else { $getid=$db->fetch_row($getidq); $id=$getid['id']; } if($db->num_rows($getidq)) { $db->query("DELETE FROM free_ids WHERE id={$id}"); } $db->query("INSERT INTO users (userid, username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES('$id' ,'{$username}', '{$_POST['username']}', md5('{$_POST['password']}'), 1, $sm, 1, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); $i=mysql_insert_id($c); This is my V2 of this mod from OXI. Works perfect. +1 for you oxi Thanks for sharing with these guys. Quote Link to comment Share on other sites More sharing options...
hrabik1 Posted February 1, 2008 Share Posted February 1, 2008 Re: [V1] FREE! ID refiller/counter +1 Quote Link to comment Share on other sites More sharing options...
Richard Posted February 2, 2008 Share Posted February 2, 2008 Re: [V1] FREE! ID refiller/counter Thanks Oxi, Great Mod. I had a major Prob with ID's on my Game, It jumped from 6 to 1113 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.