ID:270902
Oct 23 2006, 4:16 pm
|
|
Ok ive been wondering is there a way to set a list of contents on a monster and in a death check proc make it add the stuff in the mosters contents to my contents? ive never really messed with setting contents on something besides a playable mob, but i think there is could some one please provide a simple example or tell me how?
|
National Guardsmen wrote:
Ok ive been wondering is there a way to set a list of contents on a monster and in a death check proc make it add the stuff in the mosters contents to my contents? ive never really messed with setting contents on something besides a playable mob, but i think there is could some one please provide a simple example or tell me how? If your monsters are descended from /atom (they're probably mobs, right? That means that they're descended from /mob, which is descended from /atom) then they also have a contents list. You can add or subtract items from your monsters' contents just like you would for your playable characters. In fact, your program can be made in such a way that you only have to program it once for players, monsters, and NPCs: mob |
In response to Mecha Destroyer JD
|
|
and in the death of the monster i belive you can do this:
usr.contents += M.contents add that to your deathcheck i got almost the same but for gold and exp, but i think usr.contents is supposed to be src.contents |
I'm contemplating a way to auto add to the player's contents..