-
Posts
244 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Analog
-
Thank you Dominion for the response to the ideas I posted and the short discussion about them. However, overall I feel ideas are not really welcomed based on the response I've got so far. @A_b Not once did I mention McCodes as being the focus of anything. My ideas are/were merely general thoughts regarding things contained within the forums. With that said, I shall just keep the rest of my thoughts to myself and go back to being the occasional lurker.
-
There is an MWG awards board but I see no "Contest" or "Competitions" boards. MWG awards was/is a nomination based system, not a contest/competition. If there is another location please point me in the direction of it so that I can see what has been done. If the goal is just to bring forum post counts up then I think the bigger picture may be missing. Shouldn't the goal be something more like increasing quality post? Having good quality, informative post will spawn other discussions. Either way doesn't matter, the idea was more of just a community involvement project. I am missing the logic here. Having things organized will cause more confusion? Of course I know it is/would be a lot of work. Definitely not something that could be done overnight but feel it would make things more user friendly.
-
I've been lurking around for about the past month after being away for quite some time and I see its the same old thing. Lots of complaining and pointing out what is wrong but no ideas on how to "jump start" the community again. So here is an idea to maybe start a little community involvement for the better... Weekly/Monthly Competitions It could cover a whole range of topics to bring the "community" feeling back to the forums. Another idea.... Seems to be several gaming engines available but not much info about them... So how about a community "how to" guide for each of them... Installation, how to operate, etc.... A small suggestion also... Better organization of mods contained in the forums. Such as add on games, attacking mods, market mods, etc. Might take a little work but an organized front might make it more enticing for new user to stay active as it will be easier to find what they are looking for. Like all good communities there needs to be a clear and concise "code of conduct" that needs to be followed by members and enforced by staff. I am even willing to step up and help make these things happen if it means keeping this community alive and thriving as it once was when I joined it.
-
Minigame - Deal Or No Deal - [$19] - PayPal / AlertPay
Analog replied to Prodigy-A's topic in Paid Modifications
I noticed when I played that it said the last briefcase contained $100 even though that amount was previously eliminated... Actually I have created a similar game months ago but using the name of "Lets Make A Deal". Never released publicly as a modification though. -
First thing I see is your setting $health to = 100 prior to the if statement. With that being said, your if statement is always going to return false....
-
I don't post much but I'm still around...
-
A couple of things... 1. After buying a house and the players will resets to 100 appears to be happening outside of this file. Is there a function called on every page that is checking a players will? (example: a marriage script) 2. In the query that updates players after they purchase a house it is updating a field named maxdealers. I'm assuming this is for a mod you have added. I've add an update to the query willmax=$np['hWILL']}) as it appears other parts of the code use that field as well. 3. When selling a house the fields maxwill and willmax were being updated but no will. Changed that query to update will to 100. <?php include "globals.php"; $mpq=mysql_query("SELECT * FROM houses WHERE hWILL={$ir['willmax']}",$c); $mp=mysql_fetch_array($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=mysql_query("SELECT * FROM houses WHERE hID={$_GET['property']}",$c); $np=mysql_fetch_array($npq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']},willmax={$np['hWILL']},maxdealers={$np['maxdealers']} WHERE userid=$userid"); print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!"; } } else if(isset($_GET['sellhouse'])) { $npq=mysql_query("SELECT * FROM houses WHERE hWILL={$ir['willmax']}",$c); $np=mysql_fetch_array($npq); if($ir['willmax'] == 100) { print "You already live in the lowest property!"; } else { mysql_query("UPDATE users SET money=money+{$np['hPRICE']},will=100,maxwill=100,willmax=100 WHERE userid=$userid",$c); print "You sold your {$np['hNAME']} and went back to being homeless."; } } else { print "<center>Your current property: <font color=blue><b>{$mp['hNAME']}</b></font> The houses you can buy are listed below. Click a house to buy it."; if($ir['maxwill'] > 100 && $ir['marriedwill'] == 0) { echo'<a href="?sellhouse">Sell Your House</a>'; } $hq=mysql_query("SELECT * FROM houses WHERE hWILL>{$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { print "<table cellspacing=1 class='table'><tr style='background:gray;'><th>House</th><th>Pic</th><th>House Price</th><th>House Will</th><th>Buy?</th></tr>"; $hq=mysql_query("SELECT * FROM houses WHERE hWILL>{$ir['willmax']} ORDER BY hWILL ASC",$c); while($r=mysql_fetch_array($hq)) { print "<tr><td>{$r['hNAME']}</a></td> <td><img src='{$r['hPIC']}' width='137' height='72' alt='' /></td> <td>\$$t".money_formatter($r['hPRICE'],'')."</td> <td>{$r['hWILL']}</td> <td><a href='estate.php?property={$r['hID']}'>Buy</tr>"; } print "</table>"; } } $h->endpage(); ?>
-
I vote Yes.... If players could not attack within the same race I could see the game becoming very unbalanced. For instance lets say 2 races available, Humans & Aliens. During signup 70% of players choose human, while it would give Aliens more targets, it would also make aliens targeted by more people. The exception would be if a players race was assigned during the registration process instead of being chosen by the player.
-
Updated original post to v1.0.1 Now tracks how many times a code used during registration
-
Thank You all
-
I assumed ibank is storing info on how long the investment can be.. (ie 1 week at 2% interest, 2 weeks at 4.5%, etc....)
-
Without seeing the rest of the file the only thing I can come up with is maybe there is a form above that with an action to call gym.php
-
Promo Code Manager v1.0.1 This simple addition will give you the ability to manage promotional codes for your game without having to make changes to the registration file. Installation requires editing 1 file, creation of 1 file, adding 1 table to your database. 1. Create the following table in your database CREATE TABLE IF NOT EXISTS `promo` ( `id` int(3) NOT NULL AUTO_INCREMENT, `code` varchar(255) NOT NULL, `used` int(5) NOT NULL, `crystals` int(11) NOT NULL, `cash` int(11) NOT NULL, `donor` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; 2. Copy and Paste the below code into a file named promo.php and upload to your host. <?php /** * @name promo.php * @author Analog * @link http://www.krbjdesigns.com * @version 1.0.1 * @copyright All rights reserved by Analog and KRBJ Designs 2011 * Permission is granted to use and distribute this script without charge. * This script can be edited/altered and any edits/alterations are the sole * property of the auther of the edits/alterations. The altered code * can be distributed freely so long as a copy of the original code * is distributed along with the new script. * * To sum that up: you can basically do what you want, but any works * derived from this script must be distributed with a copy of the * original script. */ include "globals.php"; if($ir['user_level'] != 2) { print "<h1>Access Denied!</h1>"; $h->endpage(); exit; } if(isset($_GET['action']) && $_GET['action'] == "del") { $id = abs($_GET['id']); $db->query("DELETE FROM promo WHERE id = $id"); print "<h2>Promo Code Deleted</h2>"; } if(isset($_GET['action']) && $_GET['action'] == "add") { if(preg_match("/[^A-Za-z0-9 ]/", $_POST['code'])) { print "<h2>Promo code can only contain letters, numbers, and spaces</h2>"; } else { $code = $_POST['code']; $money = abs($_POST['money']); $crystals = abs($_POST['crystals']); $donor = abs($_POST['donor']); $db->query("INSERT INTO promo VALUES('','$code', 0,$crystals, $money, $donor)"); print "<h2>Promo Code Added</h2>"; } } print <<<EOF <div style='width: 450px; margins: auto; padding: 5px; text-align: left; border: 1px solid black;'> Welcome to the promo code control area. From this one area you have full access to manage all of the promo codes that are currently available to new players when they register. This allows you to create multiple special offers to new players. </div> <form action='promo.php?action=add' method='post'> <table> <tr> <th colspan='2'> Add New Code </th> </tr> <tr> <td>Code:</td> <td><input type='text' name='code' /></td> </tr> <tr> <td>Money:</td> <td><input type='text' name='money' value='0' /></td> </tr> <tr> <td>Crystals:</td> <td><input type='text' name='crystals' value='0' /></td> </tr> <tr> <td>Donor Days:</td> <td><input type='text' name='donor' value='0' /></td> </tr> <tr> <th colspan='2'> <input type='submit' value='Add Promo Code' /> </th> </tr> </table> </form> EOF; $q = $db->query("SELECT * FROM promo ORDER BY id DESC"); print <<<EOF <table width='95%' border='1'> <tr> <th colspan='6'> Current Promo Codes Available </th> </tr> <tr> <th>Promo Code</th> <th>Used</th> <th>Money</th> <th>Crystals</th> <th>Donor Days</th> <th>Action</th> </tr> EOF; while($x = $db->fetch_row($q)) { print <<<EOF <tr> <td>{$x['code']}</td> <td>{$x['used']}</td> <td>{$x['cash']}</td> <td>{$x['crystals']}</td> <td>{$x['donor']}</td> <td><a href='promo.php?action=del&id={$x['id']}'>Delete</a></td> </tr> EOF; } print <<<EOF </table> EOF; $h->endpage(); ?> 3. Make the folowing 2 changes to your register.php file.... Find $sm=100; if($_POST['promo'] == "Your Promo Code Here") { $sm+=100; } Replace with $money = 0; //Base Starting Cash $crystals = 0; //Base Starting Crystals $donor = 0; //Base Starting Donor Days if(isset($_POST['promo'])) { if(!preg_match("/[^A-Za-z0-9 ]/", $_POST['promo'])) { $code = $_POST['promo']; $q = $db->query("SELECT * FROM promo WHERE code = '$code'"); $promo = $db->fetch_row($q); $money = ($promo['cash']) ? $money + $promo['cash'] : $money; $crystals = ($promo['crystals']) ? $crystals + $promo['crystals'] : $crystals; $donor = ($promo['donor']) ? $donor + $promo['donor'] : $donor; $db->query("UPDATE promo SET used = used + 1 WHERE id = {$promo['id']}"); } } 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, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); Replace with $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, lastip_signup) VALUES ( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $money, $crystals, $donatordays, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); That is it! You have now installed this simple promo code manager. Simply go to http://yourgameurl.com/promo.php and setup/mange your promo codes This modification was created with an unedited register.php file. If you have already modified your register.php, you may need to make slight changes to the edits I have posted. As always... backup your files before making changes UPDATES! v1.0.1 - Added tracking of how many times a code is used
-
@rulerofzu - if it is a default viewuser.php file then $r is the result of the query ran to pull that players info for the profile, $ir is the player signed in looking at the profile @Daron - change sensei = to student =
-
obviously something is causing an error... try setting php error reporting to all on your viewuser file and it might point you in the right direction error_reporting(E_ALL);
-
It depends on the complexity of the work that needs to be done and the amount of time it will take.
-
lol, you are correct as I just noticed I put the comma on the wrong line. Like it is posted, if the player had 3 students it would display.... ,student1 student2 student3 the 2 $students lines need switched around for what I had in my head so that it displays like student1, student2, student3 The comma is there to separate the user names if there is more than one. As he is planning to have the ability to have up to 3 students.
-
Just add this to the file you want to display the students in, then echo $students where you want it to display. This is not tested! $q = mysql_query("SELECT userid, username FROM users WHERE sensei = {$r['userid']}"); $students = "Students:"; $sep = 0; if(!mysql_num_rows($q)) { $students .= " N/A"; } while($stu = mysql_fetch_array($q)) { if($sep > 0) { $students .= " <a href='viewuser.php?u={$stu['userid']}'>{$stu['username']}</a>"; } else { $students .= ", <a href='viewuser.php?u={$stu['userid']}'>{$stu['username']}</a>"; $sep = 1; } }
-
no problem, just shout if you need help with it
-
that should do it
-
mysql_query("UPDATE users SET sensei='{$ir['userid']}' WHERE userid='{$f['proposer']}'") or die(mysql_error()); Knowing you are trying to allow each sensei to have 3 students, the above line sets the student as the sensei of the sensei..... if that makes much sense 1. Only update the sensei field of the student 2. Update the student field of the sensei Also I see if you are a student of a sensei, you can still in turn be a sensei of 3 students of your own. Is this how it is suppose to be?
-
Spider Man Half Full or Half Empty?