-
Posts
2,921 -
Joined
-
Last visited
-
Days Won
48
Content Type
Profiles
Forums
Events
Everything posted by KyleMassacre
-
I started this a while ago and never really tested it all that much but I figure we as a community can make it better and possibly work. In all honesty I have not idea what I need to fix nor do I really have time but maybe we all can. I'll admit it's not very good and can be better so don't hate but appreciate since something like this can ultimately improve your players game experience. https://bitbucket.org/KyleMassacreMC/mccodes-economy-manager
-
I think in reality that a thread like this would be hard to achieve. For one, who is going to be the judge? This thread was made by Danny which these people are his opinion. I have an idea of possibly how we as a community can accomplish something like this and try to get a consensus with the moderation team before making my idea public and see what the other fellas have to say.
-
I started on it a while ago and put it in a private bitbucket repo but just never got around to completing it
-
I would crete a function that handles that kind of stuff. Everything you make will have a base price based on what you would ideally want it to be. And if it goes into negative then you need to figure out a way to get people to start buying
-
I noticed http://makewebgames.io and makewebgames.io are completely different as mentioned in another post. If I go to the latter I am always logged out until I click a link
-
All this stuff is going into review and we are discussing a tactical way of handling this sort of thing. Thanks for the input
-
Somethings as you can see have changed quite immensely with the look and feel of the site. Albeit, I myself am trying to get the hang of everything. So maybe as we all get used to the new software upgrade we can post some differences that we see and maybe show how they work. I will start with the "Mark Channels Read" button at the top (sorry for my unlicensed paint2 watermarks): What this button does is automatically mark all of your unread topics (see image below) as read: If I recall where I added a border those will have a highlight and a fill on the speech bubbles. Another abnormality is the subscriptions. If you notice your topic replies now come in the form of a PM (Private Message). I don't know if there is a way to turn that off because I couldn't find one, but it looks like one of them things that is a standard now. One of the cool things which I haven't tried out about it is that it looks as if you can reply to the thread via the PM. Maybe I will try it out and let you know if that works. For us staff members we have a neat feature in there too about posts under moderation that we can easily tend to and either approve or delete the posts straight from there. Another thing that people for now need to bare with is the Spam Filter. Dave has worked hard on this and it may require some adjustments as time goes on. But at the request and complaining of [uSER=64687]Dominion[/uSER] and I, this was desperately needed. Also I noticed and pointed out to Dave is that some messages that contain "Spam" are sent to the user blank. I have come to the realization that it has to do with links being in the messages. I don't know for sure how many links are permitted via the Spam Settings but maybe it needs adjusting.
-
- 1
-
-
Yeah abs((int)$num); is basically all you will need in this script because all you have is (int)$number; and here is why: $db->query('update users set crystals = crystals - -1000'); In your case -1000 is an integer but in math a positive - negative comes out as positive. So the user would actually gain crystals if they put a negative number
-
I agree with Dave. Thats what I was going to get at as well before I started rambling on haha. Even in the case of jcvenom, I talked him out of a lot of gnarly stuff. I agree I cant compare you two because you are two different people. But Coly, I think you are great and a real nice guy and dont listen to people when they tell you stuff because some people cant just give constructive advice for whatever reason.
-
I know exactly what you are talking about and I am sorry if I couldn't give you the info that you wanted but I also have to respect people's privacy. IMHO, information that the public can't see is hidden for a reason (granted this person covered their tracks, so any information I could have given wouldn't have helped any). Maybe Dave, Dom, and I can have a chat and lay out some rules and revamp some existing ones. Dave and I have already chatted a bit earlier today and we both agreed on actually using the infraction system (which with VB5 there is a give infraction button in plain view of the post). The only difficult thing is this forum is open to the public so we can permaban and they can just re-register, so we will be running in circles.
-
Bugs/Errors/ Suggestions for MWG community as a whole.
KyleMassacre replied to Sim's topic in Feedback and Site Support
I wasn't insinuating that you were calling me out specifically but please do. And I agree with your idea of archiving, I'm not too familiar with VBulletin enough to know how it works but I am sure there is a plugin or option that does that sort of thing. I don't think we intentionally stay in the past so maybe we need a topic reconfiguration and add some more categories and sub categories. Granted most people are probably driven here by searching for a Mafia script and go to mccodes.com and find the ad for this forum, but that's just the way it is for now at least -
Securing this wouldn't be too hard. Basically anything that the user touches needs to be secured for example any get or post requests. You can make use of the abs() for your post variables. Without actually looking at it right now I believe you were typecasting your variables as Int but a negative number is considered an Int which is where the abs function comes in
-
All fine and dandy. I don't mind helping people sometimes ;)
-
Here is some advice: I am not sure if it was the forum but format your code please. I just went a head and re-wrote the entire thing because it was un-readable. But I think your main problem was missing a closing curly bracket "}" somewhere. I used the switch method with all the functions just to ease the readability of the code for you but its probably better if you dont
-
Whoops :o Seems as if I got carried away with the closing ")"
-
Bugs/Errors/ Suggestions for MWG community as a whole.
KyleMassacre replied to Sim's topic in Feedback and Site Support
I agree but I am failing to see where mods take sides. I can only speak for myself but I don't think that I take sides and if so, that is not my intent at all. I for one get boo'd all the time for locking/deleting stuff from people that I would call my friends. But as Mods+ we should not be taking any sides. Since you run your own community, you should know that sometimes it is hard to determine what should or should not stay. Somethings that get said tend to help the situation. Can some people word things differently? Yes they can. I know we have the Collab thread that tends to be an all out war at times but is long as its not super bad, I feel thats how it is supposed/going to be. People just need to try and plea their cases as best as they can. If I get caught slipping let me know. Some people have and I have given my reason on why I feel something should stay and we talk about it very respectfully. I think this is kind of covered above I believe VB does archive in their own sort of odd way. I dont think that merging them would be something that I personally would do because then people will be scrolling through walls of text to find what they are looking for. And I personally havent looked but I dont think I have a way to clean these up but maybe Dave does or has an idea of what he can do with the super old stuff Dave will have to handle that ;) -
Try this: <?php /* * When you go live you may wish to remove this */ ini_set('display_errors',1); error_reporting(E_ALL); include "globals.php"; $spend = isset($_GET['spend'] ? $db->escape($_GET['spend']) : false) switch ($spend) { case 'brefill': braveRefill(); break; case 'refill': refillEnergy(); break; case 'IQ': buyIq(); break; case 'IQ2': buyIqSubmit(); break; case 'money': spendMoney(); break; case 'money2': spendMoneyConfirm(); break; default: index(); break; } function index() { global $ir, $set, $h; print "Welcome to the crystal temple!<br /> You have <b>". number_format($ir['crystals']) ."</b> crystals.<br /> What would you like to spend your crystals on?<br /> <br /> <a href='crystaltemple.php?spend=refill'>Energy Refill - {$set['ct_refillprice']} Crystals</a><br /> <a href='crystaltemple.php?spend=IQ'>IQ - {$set['ct_iqpercrys']} IQ per crystal</a><br /> <a href='crystaltemple.php?spend=money'>Money - \$".number_format($set['ct_moneypercrys'])." per crystal</a><br />"; $h->endpage(); return; } function braveRefill() { global $set, $db, $ir, $h; if($ir['crystals'] <$set['br_refillprice']) { print "You don't have enough crystals!"; $h->endpage(); return; } else if($ir['brave'] == $ir['maxbrave']) { print "You already have full energy."; $h->endpage(); return; } else { $db->query("UPDATE users SET brave=maxbrave,crystals=crystals-{$set['br_refillprice']} WHERE userid={$ir['userid']}"); echo "You have spent ". number_format($set['br_refillprice']) . "and filled up your brave"; $h->endpage(); return; } } function refillEnergy() { global $set, $db, $ir, $h; if($ir['crystals'] <$set['ct_refillprice']) { print "You don't have enough crystals!"; $h->endpage(); return; } else if($ir['energy'] == $ir['maxenergy']) { print "You already have full energy."; $h->endpage(); return; } else { $db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid={$ir['userid']}"); print "You have paid ". number_format($set['ct_refillprice']) ."crystals to refill your energy bar."; $h->endpage(); return; } } function buyIq() { global $ir, $set, $h; print "Type in the amount of crystals you want to swap for IQ.<br /> You have <b>{$ir['crystals']}</b> crystals.<br /> One crystal = {$set['ct_iqpercrys']} IQ. <form action='crystaltemple.php?spend=IQ2' method='post'> <input type='text' name='crystals' /><br /> <input type='submit' value='Swap' /> </form>"; $h->endpage(); return; } function buyIqSubmit() { global $set, $db, $ir, $h; $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough crystals or did not fill out the form.<br /> <a href='crystaltemple.php?spend=IQ'>Back</a>"; } else { $iqgain=$_POST['crystals']*$set['ct_iqpercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid={$ir['userid']}"); $db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid={$ir['userid']}"); print "You traded {$_POST['crystals']} crystals for $iqgain IQ."; $h->endpage(); return; } } function spendMoney() { global $ir, $set, $h; print "Type in the amount of crystals you want to swap for money.<br /> You have <b>{$ir['crystals']}</b> crystals.<br /> One crystal = \$".number_format($set['ct_moneypercrys']).". <form action='crystaltemple.php?spend=money2' method='post'> <input type='text' name='crystals' /><br /> <input type='submit' value='Swap' /> </form>"; $h->endpage(); return; } function spendMoneyConfirm() { global $set, $db, $ir, $h; $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough crystals or did not fill out the form.<br /> <a href='crystaltemple.php?spend=money'>Back</a>"; } else { $iqgain=$_POST['crystals']*$set['ct_moneypercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid={$ir['userid']}"); print "You traded {$_POST['crystals']} crystals for \$".number_format($iqgain)."."; } $h->endpage(); return; }
-
That is kind of odd because there are posts by members in that area, not that particular thread but maybe because it was "Featured" which seems kind of new
-
[MENTION=65371]sniko[/MENTION] are you around?
-
I was working on a feature that generically determined the game inflation. I was doing it by: Giving the game X amount of money and crystals ie 1 million game money and like 100k crystals. And every time a player would do a crime or course then the money would be taken from the games bank account(s) and given to the player. Also when a player would buy something in game from like a city shop the money would go back into the bank account. Then I would just query up and sum all the players money and compare it to the bank account and adjust prices on in game items based on that. So if the players had less money than the game, economy is good and items are cheaper but if the players have more money than the game then items were more expensive. This is just to kind of simulate real world
-
I think web games are a tough market these days. I think a lot of it has to do with what you've already mentioned with the social networks. Since approximately 90% of the worlds population is on some form of social networking site it is really tough for people to create a browser-based game and have it succeed. What a lot of the community is not doing is going mobile, A lot of people are on the go all the time and they don't have time to sit in front of their computer and play game
-
SQL Injection,. Help to Prevent Please :D
KyleMassacre replied to jedigunz's topic in Engine Support
Nope nothing popped up with any of those. I found your current account but not any others. -
SQL Injection,. Help to Prevent Please :D
KyleMassacre replied to jedigunz's topic in Engine Support
if you give me your first and last name I could find it that way -
SQL Injection,. Help to Prevent Please :D
KyleMassacre replied to jedigunz's topic in Engine Support
I think I figured out that dumb "- - - UPDATED - - -" thing. Seems if you post again, it will update your latest post so this is a test haha - - - Updated - - - Maybe not? -
SQL Injection,. Help to Prevent Please :D
KyleMassacre replied to jedigunz's topic in Engine Support
Yep Dom I get the emails (faster than topic replies). If you get me the email or domain you used to license your game I can see what I can do for you. But yes, all you really need is abs(int($_GET['id'])); and that should fix it. The link Dom gave you is also excellent when you upgrade to PHP > 5* - - - Updated - - - It is more secure than V2. It checks to see if you have magic quotes enabled and sanitizes stuff if it does/does not. But GMQ has been determined really bad so has been disabled by default now in later PHP versions