Score Sheet Question...

  • Papaya Pete
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 years 8 months ago - 5 years 8 months ago #916 by Papaya Pete
Score Sheet Question... was created by Papaya Pete
So I'm working on a new score sheet, and I think it looks a lot better than just plain text in a large paragraph. There's one question I had though, and it's about saving throws.

I figured out what functions get the class, level, and so on of the player (GET_CLASS, GET_LEVEL, GET_RACE, etc.). What is the function that is used to get the player's saving throws?

Edit:

Exciting! I believe I found it! Nevermind! But I'll post the function here just in case anyone else wants to know... though I have the feeling that I might be the only one who didn't know. :P

Its a function in class.c called...

saving_throws(int class_num, int type, int level)

So to call a saving throw for a character, in this case paralyzation:

saving_throws(GET_CLASS(ch), 0, GET_LEVEL(ch))
Last edit: 5 years 8 months ago by Papaya Pete. Reason: Found the answer.

Please Log in or Create an account to join the conversation.

More
5 years 8 months ago #918 by Liko
Replied by Liko on topic Score Sheet Question...

Papaya Pete wrote: So I'm working on a new score sheet, and I think it looks a lot better than just plain text in a large paragraph. There's one question I had though, and it's about saving throws.

I figured out what functions get the class, level, and so on of the player (GET_CLASS, GET_LEVEL, GET_RACE, etc.). What is the function that is used to get the player's saving throws?

Edit:

Exciting! I believe I found it! Nevermind! But I'll post the function here just in case anyone else wants to know... though I have the feeling that I might be the only one who didn't know. :P

Its a function in class.c called...

saving_throws(int class_num, int type, int level)

So to call a saving throw for a character, in this case paralyzation:

saving_throws(GET_CLASS(ch), 0, GET_LEVEL(ch))


My friend,

try:
  GET_SAVE(ch, SAVING_PARA)
  GET_SAVE(ch, SAVING_ROD)
  GET_SAVE(ch, SAVING_PETRI)
  GET_SAVE(ch, SAVING_BREATH)
  GET_SAVE(ch, SAVING_SPELL)

Example:
send_to_char(ch, "Para: %d\r\n", GET_SAVE(ch, SAVING_PARA));


Hopefully that is what your looking for. :)

DragonBall: Tournament (1.2.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

  • Papaya Pete
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 years 8 months ago #919 by Papaya Pete
Replied by Papaya Pete on topic Score Sheet Question...
Hmmm, I'll try that one out too, the way I described above actually works. But I like your way a little better, it looks cleaner when gazing at the code. :) Thanks a bunch.

Please Log in or Create an account to join the conversation.

Time to create page: 0.963 seconds