Welcome to the Builder Academy

Question Score Sheet Question...

More
18 Oct 2012 22:31 - 18 Oct 2012 22:43 #916 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: 18 Oct 2012 22:43 by Papaya Pete. Reason: Found the answer.

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

More
18 Oct 2012 23:47 #918 by Liko
Replied by Liko on topic Re: 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:
Code:
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:
Code:
send_to_char(ch, "Para: %d\r\n", GET_SAVE(ch, SAVING_PARA));


Hopefully that is what your looking for. :)

Randian(0.0.0)
Owner/Developer

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

More
19 Oct 2012 00:12 #919 by Papaya Pete
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.173 seconds