Welcome to Dream.In.Code
Getting Help is Easy!

Join 107,710 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,111 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



[PHP/MySQL] [RPG ONLINE] Requirements for stats/items question

 
Reply to this topicStart new topic

[PHP/MySQL] [RPG ONLINE] Requirements for stats/items question, What is the best way to create requirements

Fratyr
post 19 Apr, 2008 - 09:11 AM
Post #1


New D.I.C Head

*
Joined: 10 Apr, 2008
Posts: 4

Hello.
Just wonder what is the best way to create requirements for lets say, some stat like "Strenght"?

I want this stat be available only for player with level 4 and above. How do i do this?
Just do IF/switch operations and then display/allow player to interact with this stat or it's an additional column in DB which decides on what level player gets this stat and can raise it?

player stats table looks like:
CODE

"CREATE TABLE `p_stats` (
    `a_id` INT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    PRIMARY KEY(`a_id`),
    `c_id` INT(20) UNSIGNED NOT NULL,
    `p_id` INT(20) UNSIGNED NOT NULL,
    `strenght` INT(20) UNSIGNED default '0',
    `agility` INT(20) UNSIGNED default '0',
    `vitality` INT(20) UNSIGNED default '0',
    `focusing` INT(20) UNSIGNED default '0',
    `rage` INT(20) UNSIGNED default '0',
    `intellect` INT(20) UNSIGNED default '0',
    `wisdom` INT(20) UNSIGNED default '0'
    )";


Thanks, Fratyr.
User is offlineProfile CardPM

Go to the top of the page


2457
post 20 Apr, 2008 - 01:27 PM
Post #2


D.I.C Head

**
Joined: 9 Apr, 2008
Posts: 69

try to be a bit more specific. at least for me the information provided is not enough.

But anyway... when loading the interface where the player could select this.. attribute, You should query the database for exsisting attributes, and preform a check to see what attributes the player can acces.

//yo, I know its twisted, but it will work..
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/30/08 03:17AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month