Uridium Posted June 5, 2009 Posted June 5, 2009 Was bored so came up with this little addition it allows users to send Text Messages to each other. users must register a Mobile number (Not Thier Personal one) just one thats made up by themselves All users start with 10 credits and they depleet as they send messages. Once they are out of Credit they can either purchase more with cash or crystals or use as donator based addition for extra cash. Users that dont have credit can read texts but cant send texts. Users can change their Mobile Number when ever they wish. But bare in mind once changed they will have to tell their friends or they will be sending messages to a number thats no longer vaild... heres a few screenies.... yes its the MAILBOX but with a little more fun. Quote
Strats Posted June 5, 2009 Posted June 5, 2009 Re: [MCCODES V2] Mobile text messaging I like it. It looks fun Quote
chicka Posted June 5, 2009 Posted June 5, 2009 Re: [MCCODES V2] Mobile text messaging nice mod illusions!!!well done Quote
Uridium Posted June 5, 2009 Author Posted June 5, 2009 Re: [MCCODES V2] Mobile text messaging Working Demo each user when regd or those that are reg are given 10 credits you will need to goto Preferences and Create your mobile number make sure its not your own just make one up...... the send a message via the normal mailbox to the person you want to contact giving your mobile number... My mobile number on the test site is 07772323 http://www.mccode.doom-nights.com Quote
Uridium Posted June 5, 2009 Author Posted June 5, 2009 Re: [MCCODES V2] Mobile text messaging I'll post the script in a few just need some people on the TESTSITE to test the texts and stuff are woking for them Quote
Uridium Posted June 5, 2009 Author Posted June 5, 2009 Re: [MCCODES V2] Mobile text messaging SQLS You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. call this file textmessage.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Call this file textcontacts.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. call this file textdlarchive.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Part 2 Below Quote
Uridium Posted June 5, 2009 Author Posted June 5, 2009 Re: [MCCODES V2] Mobile text messaging PART 2 open up mainmenu.php find $mc=$ir['new_mail']; near top of page Underneath add $tm=$ir['new_textmessage']; Now goto the Announcements part on the same file after the fine } Add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now open up preferences.php wheres the Cases are Under the pass_change and after the break(); } add case 'mobilenumchange2': do_mobilenum_change(); break;  case 'mobilenumchange': mobilenum_change(); break; Now for the link add this with the rest of the links Create or Change Mobile Number And after the Password function section add this... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And your done if you want to make it so users have to donate then the $ for this is $db->query("UPDATE users SET tcredits=10 WHERE userid=$userid"); im using 10 as a guidline you can use what you want and thats it your done,. Quote
CrazyT Posted June 5, 2009 Posted June 5, 2009 Re: [MCCODES V2] Mobile text messaging For this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Could have. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Note: not tested, feel free to test it Quote
jonomatt Posted June 6, 2009 Posted June 6, 2009 Re: [MCCODES V2] Mobile text messaging how do they buy credits may i ask? :? Quote
Uridium Posted June 6, 2009 Author Posted June 6, 2009 Re: [MCCODES V2] Mobile text messaging Ooops i knew there was something id forgotten i'll write up a script for it SORRY about that was also trying to do other tasks aswell... Quote
jonomatt Posted June 6, 2009 Posted June 6, 2009 Re: [MCCODES V2] Mobile text messaging $db->query("UPDATE users SET tcredits=10 WHERE userid=$userid"); kk and where do we add that line? lol Quote
Voice4Vision Posted June 6, 2009 Posted June 6, 2009 Re: [MCCODES V2] Mobile text messaging $db->query("UPDATE users SET tcredits=10 WHERE userid=$userid"); kk and where do we add that line? lol That should go into your day cron. Quote
Uridium Posted June 6, 2009 Author Posted June 6, 2009 Re: [MCCODES V2] Mobile text messaging $db->query("UPDATE users SET tcredits=10 WHERE userid=$userid"); kk and where do we add that line? lol That is just an example of the SQL youd need to add to update the credits per user. Quote
jonomatt Posted June 7, 2009 Posted June 7, 2009 Re: [MCCODES V2] Mobile text messaging people can have the same phone number? on my game my number is 999 and so is urs illusions, any idea on how to fix that please? Quote
Uridium Posted June 7, 2009 Author Posted June 7, 2009 Re: [MCCODES V2] Mobile text messaging I'll update the prefs and repost when its done Quote
jonomatt Posted June 7, 2009 Posted June 7, 2009 Re: [MCCODES V2] Mobile text messaging cheers still +1 for the mod very good :) Quote
Uriah Posted June 8, 2009 Posted June 8, 2009 Re: [MCCODES V2] Mobile text messaging If you were to put $db->query("UPDATE users SET tcredits=10 WHERE userid=$userid"); in your day cron, that would give each user 10 free per day. I would suggest adding it to your register.php instead so that each user gets 10 when they register and they have to purchase them after that. You could run it as a cron once to set all current users and then leave it to the register.php for all new members. Simply add the values to the line that starts out like this... $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy,.... in the register file Quote
Guest Sniko` Posted June 8, 2009 Posted June 8, 2009 Re: [MCCODES V2] Mobile text messaging Buy Credits - Untested You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I think it should work Quote
Haunted Dawg Posted June 8, 2009 Posted June 8, 2009 Re: [MCCODES V2] Mobile text messaging Buy Credits - Untested You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I think it should work Where's the connection? Where's the defined $db? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Untested Quote
CrazyT Posted June 8, 2009 Posted June 8, 2009 Re: [MCCODES V2] Mobile text messaging $db->query("ALTER TABLE users SET credit = credit + '$_POST['b_credits']' WHERE userid=$userid"); You would have error on that and. echo 'Thanks for purchasing {$_POST['b_credits']} for {$price}'; Should be: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
jonomatt Posted June 8, 2009 Posted June 8, 2009 Re: [MCCODES V2] Mobile text messaging what about if you want to buy it though cash? ie $1 = 1000 credits? Quote
CrazyT Posted June 8, 2009 Posted June 8, 2009 Re: [MCCODES V2] Mobile text messaging what about if you want to buy it though cash? ie $1 = 1000 credits? Why would you wan't $1 = 1000 credit's.. i would make it. $5000 = 100 credit's.. lol If your have has ton's of money in it make the price higher, so the game money goes down. Quote
jonomatt Posted June 9, 2009 Posted June 9, 2009 Re: [MCCODES V2] Mobile text messaging it was meant to be an expample lol how do we get money from it im asking? Quote
Uridium Posted June 10, 2009 Author Posted June 10, 2009 Re: [MCCODES V2] Mobile text messaging if you want to use the Donation part to give users Credits... Use this,,,, open donator.php and add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now open ipn_donator.php and overwrite the packs part with this one You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And add this to the bottom after pack 5 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Uridium Posted June 10, 2009 Author Posted June 10, 2009 Re: [MCCODES V2] Mobile text messaging if( $pack != 1 and $pack != 2 and $pack != 3 and $pack != 4 and $pack != 5 and $pack != 6) { fclose($fp);die(""); } if(($pack == 1 || $pack == 2 || $pack == 3) && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 4 && $payment_amount != "5.00") { fclose ($fp);die(""); } if($pack == 5 && $payment_amount != "10.00") {fclose ($fp);die(""); } if($pack == 6 && $payment_amount != "5.00") {fclose ($fp);die(""); } Make sure you change the Price values to suit your game or if you have more than 6 packs then just rename 6 to the next available number for yout packs. 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.