Jiraiya Posted November 17, 2008 Share Posted November 17, 2008 i want a to have a fighting like system in the game i am making. like in the mysql table there are npc enemys for players to fight against to train there characters. the npc enemys have preset health Skill(what is used to determine strength basically its just subtracting the skill from the enemys health and keep doing that until the one of them dies by having there health reach zero. and when a player kills a npc enemy i want the player to gain a set amount of "skill" points and cash to add to there character profiles any idea were i should start? im new to using php and mysql but im learning npc health dmg skillgained gold nin1 50 7 10 2 nin2 600 15 100 6 nin3 2400 200 200 8 nin4 7500 1500 300 10 nin5 21500 2500 400 12 nin6 100000 7500 1500 15 nin7 410000 35000 3500 18 nin8 1500000 100000 10000 22 nin9 5000000 750000 50000 27 nin10 17500000 2000000 100000 33 nin11 65000000 5000000 500000 40 nin12 185000000 12500000 750000 48 Edit Delete nin13 1000000000 100000000 1000000 55 Quote Link to comment Share on other sites More sharing options...
Greaser9780 Posted November 20, 2008 Share Posted November 20, 2008 Do you know how to Update MySQL tables and gather information from them? This is going to be the major part of what you need to do. Quote Link to comment Share on other sites More sharing options...
Jiraiya Posted November 20, 2008 Author Share Posted November 20, 2008 i kinda know how to but not really sure about it. Quote Link to comment Share on other sites More sharing options...
corbin Posted November 20, 2008 Share Posted November 20, 2008 http://www.google.com/search?hl=en&q=php+mysql+tutorial&btnG=Google+Search&aq=f&oq= tizag and w3schools are usually good. Quote Link to comment Share on other sites More sharing options...
Jiraiya Posted November 23, 2008 Author Share Posted November 23, 2008 iv already searched that site and it wasnt much help Quote Link to comment Share on other sites More sharing options...
Twister1004 Posted November 26, 2008 Share Posted November 26, 2008 Well, lets say I have a database called, "game" and a table called "monsters". The table will probably look like this, name| Health | damage | | | ------------------------ nin1| 50 | 3 | nin2| 600 | 10 | nin3| 2400 | 20 | nin4| 7500 | 26 | nin5| 21500 | 32 | nin6|100000 | 50 | Now look at that. 50 damage!? We need to change that. So an UPDATE query would be necessary. //Change the value from 50 to 42 //define the table UPDATE `game` (Tablename) //now SET the value SET `damage` = '42' //Where at? WHERE `name` = 'nin6' There you go There is an update for you =). Quote Link to comment Share on other sites More sharing options...
corbin Posted November 27, 2008 Share Posted November 27, 2008 Are double slash (//) comments legal in SQL? I think only -- and /* */ are legal, but I could be wrong. Quote Link to comment Share on other sites More sharing options...
Twister1004 Posted November 27, 2008 Share Posted November 27, 2008 I don't know if its legal in SQL, but I was trying to make a point 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.