Multiclassing, advance command...

From: peter dahlgren (
Date: 11/16/02

Hi again...

i have reached the part in the code to alter the advance command, what could be the smart way to alter this one...?

let's say that the player's class array looks like this

chclass[0] = CLASS_MAGE           class_level[0] = 20

chclass[1] = CLASS_WARRIOR     class_level[1] = 10

chclass[2] = CLASS_UNDEFINED  class_level[2] = CLASS_UNDEFINED

and so on...

this gives the player a GET_LEVEL(ch) = 30

so... given all this information... if i should simply edit the advance command to edit the GET_LEVEL, the GET_CLASS_LEVEL(ch, i) will stay as it is, and if i edit it to change the current leveling position in the class array, the class levels could get negative if the demote level is greater than the actual class_level... so what i want help with is a quick function that keeps this in mind and decreases the class_level, and if it should hit 0, it removes that class from the array, and turns the slot back into -1... and continue to do so until the demoting is finished... if someone is advanced by a god, it should of course raise the current position class_level as many levels as GET_LEVEL...

well, that's about it, i can probably write it all myself, but i don't know how to make it work properly, and i don't know exactly where to put it...

help? :)

Gratis e-mail resten av livet på:

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT