LimitedStreak Posted April 5, 2012 Share Posted April 5, 2012 Hello there, Long time since ive posted but im back as an active member seeking help and helping where i can :) Anyway, i am trying to make a script where everytime you have just say 100 points, you are automatically given £1,000,000. I know how make a script where if you have 100 points then you get given £1,000,000, if you have 200 points then you get given £1,000,000 more etc but this will take far too long and there is an infinie maximum that can be reached so this would be time consuming. Can anyone give me heads up on a small piece of coding that would carry a similar or same fuction so everytime you have 100 points, you will recieve £1,000,000 additional please. Thanks in advance :) Quote Link to comment Share on other sites More sharing options...
SilverStar Posted April 5, 2012 Share Posted April 5, 2012 ($points/100)*1000000 Something similar... 1 Quote Link to comment Share on other sites More sharing options...
SilvaTungDevil Posted April 5, 2012 Share Posted April 5, 2012 Put something in globals like this if statement: $points = $ir['crystals']; if(($points % 100) == 0){ $num1= ceil($points/100); $payout = $num1*1000000; //do your db query here and update there money with the new $payout variable } 1 Quote Link to comment Share on other sites More sharing options...
Lithium Posted April 5, 2012 Share Posted April 5, 2012 Put something in globals like this if statement: $points = $ir['crystals']; if(($points % 100) == 0){ $num1= ceil($points/100); $payout = $num1*1000000; //do your db query here and update there money with the new $payout variable } But the fact is that something similar will only satisfy that condition if $points = 0, and obviously the outcome on the payout = 0 as well! Quote Link to comment Share on other sites More sharing options...
HauntedDawg Posted April 5, 2012 Share Posted April 5, 2012 When you implement this, please let me know your game link so i can come make millions of dorrah :) 1 Quote Link to comment Share on other sites More sharing options...
Lithium Posted April 8, 2012 Share Posted April 8, 2012 (edited) if is_int($points % 100) { do something } other than that, you need to somehow check each offer... add a new table let's say with userid and reward_level on is_int($points % 100) where points are 100, is_int will return 1 add the userid and reward_level (as 1) to the table, next check will verify that 100 points have already taken the reward, so it will only deliver on next phase , is_int($points % 100) where points are 200 is_int will return 2 etc etc etc Edited April 8, 2012 by Lithium 1 Quote Link to comment Share on other sites More sharing options...
LimitedStreak Posted May 20, 2012 Author Share Posted May 20, 2012 Iv just check MWG after a long time and realised that people have replied to my post and thanks for trying to help people:D. Im not sure though if you get what i mean. What i need is whenever a user gets just say 10million pounds, 1 point is added to his account so just say a user had 20 million then another 1 point would be added and if he gained 30 million then another point would be added. Quote Link to comment Share on other sites More sharing options...
sniko Posted May 20, 2012 Share Posted May 20, 2012 $money = $ir['money']; // Change $ir[...] to what you use for money $minMoney = 1000000; // 1 Million, as stated above [Post #9] if( $money % $minMoney ) { /* Do query to deduct $minMoney from their money * Do query to add 1 point * Send a user an event? */ } How's that? 1 Quote Link to comment Share on other sites More sharing options...
LimitedStreak Posted May 23, 2012 Author Share Posted May 23, 2012 That looks perfect mate Thank You so much, will check it & get back to you:D 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.