Jiraiya Posted December 8, 2008 Share Posted December 8, 2008 how would i go about creating a leveling system with php and mysql? Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/ Share on other sites More sharing options...
will35010 Posted December 8, 2008 Share Posted December 8, 2008 You would start by learning the language. Get a book on php/mysql. Then post back here with your code when you need help. Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709740 Share on other sites More sharing options...
Brian W Posted December 8, 2008 Share Posted December 8, 2008 assuming he does already have at least basic knowlege of PHP and knowlege of using SQL to connect to a mysql db: what is getting leveled? What causes *whatever* to increase/decrease level? Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709746 Share on other sites More sharing options...
premiso Posted December 8, 2008 Share Posted December 8, 2008 You would start by learning the language. Get a book on php/mysql. Then post back here with your code when you need help. Umm...to be a bit more explanatory, even if you know the language that will not help. First setup an outline of what you want the script to be able to do. IE: I want the script to take a look at the user's time played and based on the timeplayed give the user a new level. Write out exactly what you want, than one by one code in the pieces. I always start coding with a very descriptive plan that way I stay on track and know what I need to do. Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709757 Share on other sites More sharing options...
Jiraiya Posted December 8, 2008 Author Share Posted December 8, 2008 i want the script to increase the level of a player by one when variable "B" reaches 22% increase of its self and then to update variable "B" Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709766 Share on other sites More sharing options...
revraz Posted December 8, 2008 Share Posted December 8, 2008 May be easier to have a table that sets each level instead, like 1 = 1 2 = 100 3 = 500 etc Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709782 Share on other sites More sharing options...
Brian W Posted December 8, 2008 Share Posted December 8, 2008 let me see if I got this. you store a percentage in your db (var B). When you execute some page, you want to check to see if B > 22 { then Level + 1 and update B to some value } right? Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709863 Share on other sites More sharing options...
Jiraiya Posted December 8, 2008 Author Share Posted December 8, 2008 i want to make it so that once a players variable "B" reaches a certain point that the player can click on a link to increase there level by one Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709880 Share on other sites More sharing options...
revraz Posted December 8, 2008 Share Posted December 8, 2008 As stated, build a table with the values that correspond to the level requirements. i want the script to increase the level of a player by one when variable "B" reaches 22% increase of its self and then to update variable "B" Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709900 Share on other sites More sharing options...
Brian W Posted December 8, 2008 Share Posted December 8, 2008 something like <?php if($B > 22){ echo '<a href="levelup.php">Level Up!</a>'; } ?> but you'll of course need the variable $B defined and you'll have to build your own page to do the processing and such. But get the gist? Link to comment https://forums.phpfreaks.com/topic/136110-i-need-some-guidance/#findComment-709911 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.