Results 1 to 5 of 5

Thread: Battle Script for PHP RPG Game...

  1. #1

    Thread Starter
    Hyperactive Member flame_211's Avatar
    Join Date
    Jun 2000
    Location
    I dont really think I know where I am???
    Posts
    393

    Battle Script for PHP RPG Game...

    Ok, i need an alorithm for determining how much damage a player will do, and how many times to attack in a row, also maybe have it caluclate exp, etc, any help with something like this would be greatly appreciated, and deffinately rewarded, you would probably given a role as an admin in my game if you did this. BTW my game is at http://alltom.com/flame i got most things running, but I am haveing difficulty figuring out how the hell to make a battle script >_< all i can do is make it determine exactly what amount they will do(not acurately tho) and then each player attacks the other player exactly once... Remeber:
    Site : http://www.alltom.com/flame even if you dont wanna make/help with the battle codeing, you can still come and talk, im getting lonely in there :'(
    Reach me at:
    AIM: FlameWide
    AIM: Itz deep6
    MSN/Email: [email protected]

    Check out these sites:
    My Blog

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Create a function that makes a ratio between the defeated and the defeater. So, say the defeated's max HP was 40 and the player's is 20, and his attack is 1 - 5 while the player's was 1 - 3. Now let's look at this:
    Code:
    Pseudocode:
    
    ratHP = defeated.maxhp / player.maxhp
    ratLBW = defeated.weaponlowerbound / player.weaponlowerbound
    ratHBW = defeated.weaponhigherbound / player.weaponhigherbound
    
    exp = 100 * (ratHP * ratLBW * ratHBW)
    It may make for interesting play, ex. if the player is david in a david-goliath 'situation', he would get a TON more experience (Say 100 hp vs. 20, =5x100). Which would be a lot.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    Hyperactive Member flame_211's Avatar
    Join Date
    Jun 2000
    Location
    I dont really think I know where I am???
    Posts
    393
    thanks, ill try it out

    BTW: http://alltom.com/flame (its my game if you wanna check it out :P)
    Reach me at:
    AIM: FlameWide
    AIM: Itz deep6
    MSN/Email: [email protected]

    Check out these sites:
    My Blog

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Your game doesn't work for me. It displays nothing.
    Logging in does nothing, clicking help does nothing...

    I tried both Mozilla 1.2 and (ugh) IE 6
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    It's actually not even a valid HTML file: it has no html tags, nothing
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width