blackcloudmafia Posted September 24, 2010 Posted September 24, 2010 Is there anyone that can make a mod where the game random picks a player or 2 and gives out free donator packs or items if there is some one that can do this mod what would it cost to have it made Quote
Joshua Posted September 24, 2010 Posted September 24, 2010 Eh you can do that via crons if you want it "simple" $xx = $db->query("SELECT `userid` FROM `users`"); $x = $db->num_rows($xx); $rand = rand(1,$x); $db->query("UPDATE `users` SET `donatordays`=`donatordays`+ An integer here WHERE (`userid` = ".$rand.")"); Slap the above in the day cron and it would auto credit a random user with the donator days you decide. Granted it's highly simple, but effective. Quote
rulerofzu Posted September 25, 2010 Posted September 25, 2010 No where laston?? If your gonna do it then credit those actually playing! Quote
Dominion Posted September 25, 2010 Posted September 25, 2010 @ Joshua - what about the sites that have gaps in the id numbers? "ORDER BY RAND() LIMIT 1" in the query also means your not selecting every id when you only need 1. may also wish to check about fedjail days and laston (as rulerofzu said) don't want someone winning if not online. item_add() and event_add() to give the user a pack (assuming you have donator packs?) and to tell them they have it and/or what item they won... edit - http://jan.kneschke.de/projects/mysql/order-by-rand/ Quote
Joshua Posted September 25, 2010 Posted September 25, 2010 It was just a rough idea on how to get started on it, I was leaving the finer details to the actual maker ;p Quote
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.