KyleMassacre Posted May 13, 2013 Share Posted May 13, 2013 (edited) Due to the forum software change this got messed up so the fix is located here: http://makewebgames.io/forum/game-engines/mccode-development-support/free-modifications/24597-player-classes?p=377046#post377046 Edited May 15, 2016 by KyleMassacre 4 Quote Link to comment Share on other sites More sharing options...
sniko Posted May 13, 2013 Share Posted May 13, 2013 Awesome! Great work, and a great modification :) You must spread some Reputation around before giving it to KyleMassacre again. Quote Link to comment Share on other sites More sharing options...
Hedge Posted May 13, 2013 Share Posted May 13, 2013 nice mod, been thinking of doing something like this myself, but with more in-game bonuses for the different classes Quote Link to comment Share on other sites More sharing options...
SRB Posted May 13, 2013 Share Posted May 13, 2013 You must spread some Reputation around before giving it to KyleMassacre again. Oh, go on then, I'll take it :P 1 Quote Link to comment Share on other sites More sharing options...
Dave Posted May 13, 2013 Share Posted May 13, 2013 Very nice modification! Looks well written as well. Maybe instead of limiting them to money, crystal, strength etc make a drop down of all fields in the users/userstats table. I did something similar with my donation system and it was very popular. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 13, 2013 Author Share Posted May 13, 2013 nice mod, been thinking of doing something like this myself, but with more in-game bonuses for the different classes Thank you hedge. I figure this can be a start and people can build off of it like maybe add to the crons different things like faster regens etc. Very nice modification! Looks well written as well. Maybe instead of limiting them to money, crystal, strength etc make a drop down of all fields in the users/userstats table. I did something similar with my donation system and it was very popular. Hmmm, not a bad idea. Ill have to look into that, no promises though :p because when it comes to .js im lost lol Quote Link to comment Share on other sites More sharing options...
peterisgb Posted May 13, 2013 Share Posted May 13, 2013 not bad mod, i had police vs hacker on my site lol. good mod, Quote Link to comment Share on other sites More sharing options...
Scorpio Posted May 13, 2013 Share Posted May 13, 2013 (edited) Hello there, What dose this mod do? Edited May 13, 2013 by Scorpio Quote Link to comment Share on other sites More sharing options...
sniko Posted May 13, 2013 Share Posted May 13, 2013 Hello there, What dose this mod do? 2. Player Features: a. Pick a class during registration b. Upon registering the player will get X amount of a stat increase the admin decided upon :) -somehow, too short- Quote Link to comment Share on other sites More sharing options...
Scorpio Posted May 13, 2013 Share Posted May 13, 2013 Aaah, i know what it is now. great going to add it to my game! Thanks Kyle! Great user you are. Quote Link to comment Share on other sites More sharing options...
Scorpio Posted May 13, 2013 Share Posted May 13, 2013 And thanks Sniko! Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 13, 2013 Author Share Posted May 13, 2013 (edited) @sniko: In a nutshell, yes. Good lookin out. You as the admin will make up player classes like peterisgb said he had polices and hackers for example. Now lets say you have these player classes and you know in movies police always kick the bad guys ass so they need to be stronger so you can give them like 100 strength boost and hackers are generally smarter (even a broken clock is right twice a day) so you can give them a 100 labor boost when they start. @scorpio: Thanks and let me know how it works out for ya Edited May 13, 2013 by KyleMassacre Quote Link to comment Share on other sites More sharing options...
peterisgb Posted May 13, 2013 Share Posted May 13, 2013 i've asked magictallguy to quick run through the codes and he said all good so i will add it later and give some feedback. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 13, 2013 Author Share Posted May 13, 2013 i've asked magictallguy to quick run through the codes and he said all good so i will add it later and give some feedback. It should be pretty good to go. The only thing really that you can do which I failed to do is maybe secure the get variable a little bit but it shouldnt be too much of a problem since im not really calling and Information from the db with the get and sniko did mention to me to use filter_input () instead of filter_var which in theory would be correct since it is an input but with filter_var, if it comes out false the value entered into the db is defaulted at 0 for that flag or whatever Quote Link to comment Share on other sites More sharing options...
Script47 Posted May 13, 2013 Share Posted May 13, 2013 Great mod dude :) Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 14, 2013 Author Share Posted May 14, 2013 Great mod dude :) Thank you Script. Are you or anyone else using it cause I would like to know if it is working properly or if I need to fix anything? Maybe if I get time I can create a page that will tell people about each class before signing up Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted June 11, 2013 Share Posted June 11, 2013 (edited) Hey Kyle, I am trying to implement this mod into my game however it all seems to work apart from inserting the class Id into the users table it's setting it at 0 Not sure if its because o have a register and a validate page Any help would be great Also the below insert query is in our validate page as that's where it inserts the new user into the database not sure if that makes a difference This what we have: r=$db->fetch_row($q); } $_POST['gender'] = mysql_real_escape_string($_POST['gender']); $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,player_class) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 10, 10, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP', '{$_POST['classID']}')"); $i=$db->insert_id(); Edited June 11, 2013 by Bennyh789 Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted June 11, 2013 Author Share Posted June 11, 2013 by validate you mean like an email validation where they click a link that you email them to validate their actual email? Quote Link to comment Share on other sites More sharing options...
spikereloaded Posted June 11, 2013 Share Posted June 11, 2013 by validate you mean like an email validation where they click a link that you email them to validate their actual email? yes Kyle they get an email that they have to click a link on to activate the account. Quote Link to comment Share on other sites More sharing options...
rockwood Posted June 11, 2013 Share Posted June 11, 2013 awesome mod Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted June 11, 2013 Author Share Posted June 11, 2013 yes Kyle they get an email that they have to click a link on to activate the account. Hmm its strange cause I'm not seeing how it wouldn't insert correctly. This is an exact copy and paste from my site in which I started several accounts and it worked fine. But ill keep thinking cause now its bothering me haha. Has anyone else tried this and getting the same issue(s)? awesome mod Thank you Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted June 11, 2013 Author Share Posted June 11, 2013 It seems that I forgot to add the userstats insert upon registering, im at work right now so i cant access really anything here so my bad, its a rookie mistake but basically you need to change the insert query for userstats to the variables listed above: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Something like that, the values may not be in the correct order so pay attention ;) Quote Link to comment Share on other sites More sharing options...
Dragon Blade Posted June 11, 2013 Share Posted June 11, 2013 Wow! This modfication looks great! Going to convert it to a V1 and add it into my game. Tell you how it gose Kyle! Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted June 11, 2013 Share Posted June 11, 2013 Don't worry Kyle all sorted now with just a few edits Thanks very much Quote Link to comment Share on other sites More sharing options...
Dragon Blade Posted June 11, 2013 Share Posted June 11, 2013 (edited) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The drop down doesnt show? It shows this for the player class bit You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Any reasons why to? I have got the SQL, added it into the global_func etc... Edited June 11, 2013 by Dragon Blade 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.