Blade Maker Posted October 31, 2010 Posted October 31, 2010 I decided that I want to become a good coder when it comes to modding mccodes. So I am no longer selling the stealing mod instead you all can have it for free! To get this all you have to do is tell me how I did! Also the crystal bank was not made by me so I do not know if it is debugged, I found it in the old free modifications forum. steal.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Run these sql: [mysql]ALTER TABLE `users` ADD `steal_timestamp` INT( 11 ) NOT NULL DEFAULT 'No Message'; [/mysql] crystalsbank.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Run this sql: [mysql] ALTER TABLE `users` ADD `crystalbank` INT( 11 ) NOT NULL DEFAULT '-1'; [/mysql] I do not know if the crystal bank works as I stated above I found it in the old posts. I hope you like it and if you find any bugs NOT sloppy code but bugs please let me know. I did edit something and did not test it so there might be a bug but I doubt it....Thanks! Quote
Rasheed saeed Posted October 31, 2010 Posted October 31, 2010 Hello, First of all, thank you for the modification. It's a modification that can be really handy to game of such a high economy! But I see that you use some code that really isn't needed. And some different options that could save you around 1-6 minutes of coding. First of all: Your selects As you can tell by the .SQL file which comes in Mccodes V2. There are some pretty big tables there. And what I'm seeing here, your selecting everything from 1 huge table, and 1 big one. To make the action of the query to run faster(and making the page abit faster) select what only needs to be selected. Secondly: mysql_fetch_assoc I'm not exactly sure why your using this for. It's not needed in like, there. For when (SELECTING - UPDATING - etc..) mysql_query|$db->query is just the only thing you need. 3rd'ly: Brackets () Your using many brackets on things which isn't needed. And I remember Illusions and Danny969 telling me this "It can actually slow the script down" I personally don't know why, and yet soon have to find out, but right now, it's just a no goner. So on: PRINT & DIE() Don't use die. It waste time for you having to shift using the brackets. Also, print is 5 letters long. Were echo is only 4 letters long, and can save you some times. If you think about is.. If you have 4 PRINTS, which has 5 letters in it. That 20 letters(No I'm not be sarcastic xD). Now with the echo.. Do the same. That's 16 letters. So since it's 4 more letters next, you can actually write another ECHO out. My view of why I use it. People say it's quicker.. But I personally think it's only quicker to type ;) $_GET/$_POST: Nothing to do with security. Instead of you having to write, or COPY and PASTE out either of the one for when you using it via a verible. I personally just use. $G_? - $P_? It's alot quicker to type, so yet again, saving you some time. Last: YAYY!! I have no Idea why your using strlen for an IF(). If you didn't know why it exactly did. http://uk2.php.net/manual/en/function.strlen.php Sorry to bore you, but hopefully this would help some begginer's out when these are adding it to their game. I'm sure they'll be safe putting it on without having to make another thread on asking some to secure it and shizzle... :) Quote
Blade Maker Posted October 31, 2010 Author Posted October 31, 2010 Ok thanks, other then that how is it? Quote
Rasheed saeed Posted October 31, 2010 Posted October 31, 2010 I haven't read all of the code yet, so I can't really say UPTO now. No offence, but by the way you write that, it seams that you are only interested on getting positive feedback on the modification. I'm not saying you shouldn't, you do deserve it from the small modification. But please try to sound like you actually want to learn... Quote
Blade Maker Posted October 31, 2010 Author Posted October 31, 2010 Yeah I would like to learn also, thanks. Quote
The Monk Posted October 31, 2010 Posted October 31, 2010 http://php.net/manual/en/function.mysql-real-escape-string.php Have a look at that function. Using that in your queries can remove a lot of SQL Injections, its not a 1 step instant security solution but it does haves a lot of pros for such a small bit of editing in your queries. Quote
rulerofzu Posted October 31, 2010 Posted October 31, 2010 Sorry but your mod fails and ill point out why it failed on many levels. You didnt write it. Instead your taking code from other mods, other posts and examples placing it altogether and saying hey look at my mod. Hence why it fails. You have very little concept of php code and what should be used and where. Quote
Blade Maker Posted October 31, 2010 Author Posted October 31, 2010 No I made this mod, now stop. Quote
Dominion Posted October 31, 2010 Posted October 31, 2010 No I made this mod, now stop. you did ask for help... also you need to say where you got the cbank from since it's not yours (as you said). Quote
Jaaaacccckkk Posted October 31, 2010 Posted October 31, 2010 Sorry but your mod fails and ill point out why it failed on many levels. You didnt write it. Instead your taking code from other mods, other posts and examples placing it altogether and saying hey look at my mod. Hence why it fails. You have very little concept of php code and what should be used and where. This is exactly what MWG doesn't really need right now, members pushing newbies away. Just because he's wanting help, doesn't mean you can throw everything at him, atleast give some constructive criticism! Quote
Djkanna Posted October 31, 2010 Posted October 31, 2010 If you did make this why is the event_add concept correct when you couldn't do it in your other mod (different topic) ? I'm sorry but I don't believe you did it without either the help of someone's code or someone's guidance. Quote
Blade Maker Posted October 31, 2010 Author Posted October 31, 2010 I modified the sending script into a stealing script, I will fix the event I just made that really quick I said I do not know if it works yet. Quote
Dominion Posted October 31, 2010 Posted October 31, 2010 Sorry but your mod fails and ill point out why it failed on many levels. You didnt write it. Instead your taking code from other mods, other posts and examples placing it altogether and saying hey look at my mod. Hence why it fails. You have very little concept of php code and what should be used and where. This is exactly what MWG doesn't really need right now, members pushing newbies away. Just because he's wanting help, doesn't mean you can throw everything at him, atleast give some constructive criticism! If you did make this why is the event_add concept correct when you couldn't do it in your other mod (different topic) ? I'm sorry but I don't believe you did it without either the help of someone's code or someone's guidance. no one is saying he did not have help Random Multiple Jaaaacccckkk i agree, however he was going to sell this. It started at $8... Quote
Djkanna Posted October 31, 2010 Posted October 31, 2010 "You didnt write it. Instead your taking code from other mods, other posts and examples placing it altogether and saying hey look at my mod." - "No I made this mod, now stop. " Pretty much sums it up for me. Quote
Blade Maker Posted October 31, 2010 Author Posted October 31, 2010 Gosh who would have thought me making a free mod would make all this happen. Are you guys trying to stop beginners from learning? Pretty soon the mccode mods stuff is going to go dead if this keeps up. Quote
Dominion Posted October 31, 2010 Posted October 31, 2010 Gosh who would have thought me making a free mod would make all this happen. Are you guys trying to stop beginners from learning? Pretty soon the mccode mods stuff is going to go dead if this keeps up. it's not the free mod... It's that you're selling mods and this was on sale for $8 before hand... @djkanna - missed that post >.< Quote
Blade Maker Posted October 31, 2010 Author Posted October 31, 2010 Ok well I decided I am not good enough to sell these yet which is why I posted it for free, whats the big deal? Quote
Curt Posted October 31, 2010 Posted October 31, 2010 Hey, Dont let some criticism get you down. As you stated this is your first mod, so its only common that mistakes will be made. The most important thing is that you are learning. When you post a free mod you should always expect some negative comments, but what does not kill you makes you stronger. So keep your head up :) Quote
The Monk Posted November 1, 2010 Posted November 1, 2010 I'd declare this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. before any queries involving it, under globals is a good place. Also I'd personally declare it You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. That will force a number with less processor use. Quote
Djkanna Posted November 1, 2010 Posted November 1, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Would suffice 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.