Please login or register.

Login with username, password and session length
Advanced search  

News:

Get quality web hosting, virtual private servers, reseller web hosting, and dedicated servers from www.webhostfreaks.com or www.serverpowered.com!

Pages: [1] 2  All

Author Topic: mysq and php math function help  (Read 227 times)

0 Members and 1 Guest are viewing this topic.

Jiraiya

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 205
    • View Profile
mysq and php math function help
« on: November 16, 2008, 07:03:49 PM »
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
Logged
It doesn't work

gaza165

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 395
    • View Profile
    • WWW
Re: mysq and php math function help
« Reply #1 on: November 16, 2008, 07:13:02 PM »
Talk to Twister, he is currently in the process of making 'i think' a similar game..

apologies if i have got that wrong.
Logged

Twister1004

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 170
  • PHP 5.2.1 MySQL 5.0
    • View Profile
Re: mysq and php math function help
« Reply #2 on: November 16, 2008, 07:13:20 PM »
I figured out the hard way, you can't make a game like that if you are new to PHP SQL and MySQL. It will eat you alive! *rawr!*

I would say you need to know how to alter stuff in the database  by Update and stuff.

secondly I would go for the train thingy.

thirdly (Lol, I know) I would go for the different kinds of skills.
Logged
Logic is all the PHP
PHP - 1 Year / HTML - 1 Year / CSS - 1 Year / SQL - 1 Year / Javascript - 2 months

If the time for helping someone comes to this day, wouldn't you be glad to help someone that is trying to?

Twister1004

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 170
  • PHP 5.2.1 MySQL 5.0
    • View Profile
Re: mysq and php math function help
« Reply #3 on: November 16, 2008, 07:15:22 PM »
Actually, Gaza, I'm not. xD. Its for a game called Fable. I'm just wanting to make a calculator so I can get the exact about of EXP with out using a RL Calculator.
Logged
Logic is all the PHP
PHP - 1 Year / HTML - 1 Year / CSS - 1 Year / SQL - 1 Year / Javascript - 2 months

If the time for helping someone comes to this day, wouldn't you be glad to help someone that is trying to?

Jiraiya

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 205
    • View Profile
Re: mysq and php math function help
« Reply #4 on: November 16, 2008, 07:15:56 PM »
I still need to get this thing up somehow
Logged
It doesn't work

Twister1004

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 170
  • PHP 5.2.1 MySQL 5.0
    • View Profile
Re: mysq and php math function help
« Reply #5 on: November 16, 2008, 07:17:51 PM »
Well First you need to give the a default value of their HP, MP, skill power, and all that junk =)
Logged
Logic is all the PHP
PHP - 1 Year / HTML - 1 Year / CSS - 1 Year / SQL - 1 Year / Javascript - 2 months

If the time for helping someone comes to this day, wouldn't you be glad to help someone that is trying to?

gaza165

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 395
    • View Profile
    • WWW
Re: mysq and php math function help
« Reply #6 on: November 16, 2008, 07:19:33 PM »
Sorry Twister, i just assumed that you guys were doing the same game. It seems that you both know what your talking about...

good luck with it all...
Logged

Crayon Violent

  • Global Moderator
  • Freak!
  • *
  • Offline Offline
  • Posts: 9,422
    • View Profile
Logged

Jiraiya

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 205
    • View Profile
Re: mysq and php math function help
« Reply #8 on: November 16, 2008, 07:22:53 PM »
i already have all the npc stats set in a database
Logged
It doesn't work

Twister1004

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 170
  • PHP 5.2.1 MySQL 5.0
    • View Profile
Re: mysq and php math function help
« Reply #9 on: November 16, 2008, 07:26:15 PM »
Now you will need to get them out of the database and alter them as nessarry.
Logged
Logic is all the PHP
PHP - 1 Year / HTML - 1 Year / CSS - 1 Year / SQL - 1 Year / Javascript - 2 months

If the time for helping someone comes to this day, wouldn't you be glad to help someone that is trying to?

Jiraiya

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 205
    • View Profile
Re: mysq and php math function help
« Reply #10 on: November 16, 2008, 07:29:11 PM »
thats what i need help with
Logged
It doesn't work

Twister1004

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 170
  • PHP 5.2.1 MySQL 5.0
    • View Profile
Re: mysq and php math function help
« Reply #11 on: November 16, 2008, 07:32:19 PM »
I would recommend you read the page Crayon Violent wrote.

You will need to know how to do all the MySQL, SQL, and PHP functions with that.

SELECT - Take out out of the database
UPDATE - Update an existing column
ALTER - Change something in the database (Add to or something)
Logged
Logic is all the PHP
PHP - 1 Year / HTML - 1 Year / CSS - 1 Year / SQL - 1 Year / Javascript - 2 months

If the time for helping someone comes to this day, wouldn't you be glad to help someone that is trying to?

Jiraiya

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 205
    • View Profile
Re: mysq and php math function help
« Reply #12 on: November 16, 2008, 08:07:50 PM »
i have no clue were to start with this any ideas please
Logged
It doesn't work

Barand

  • Sen . (ile || sei)
  • Staff Alumni
  • 'Mind Boggling!'
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 15,096
  • php 4.3/5.1 MySql 5.0.1
    • View Profile
Re: mysq and php math function help
« Reply #13 on: November 16, 2008, 08:12:41 PM »
When you are out of your depth move to the shallow end and start with something simpler.
Logged
|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts
|baaSelect| generate js and php code for dynamic linked dropdowns

Jiraiya

  • Enthusiast
  • Offline Offline
  • Gender: Male
  • Posts: 205
    • View Profile
Re: mysq and php math function help
« Reply #14 on: November 16, 2008, 08:14:33 PM »
but this is what i have left to really get done
Logged
It doesn't work

PHP Freaks Forums

 
 
Pages: [1] 2  All
 

Page created in 0.058 seconds with 20 queries.