Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Request for help. Regarding CAN_CAST
Request for help. Regarding CAN_CAST
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Sokol
(3 posts) Bio
|
Date
| Tue 10 Aug 2004 12:47 AM (UTC) Amended on Tue 10 Aug 2004 02:56 AM (UTC) by Sokol
|
Message
| I have made a Dual Class / Tripple Class code for smaug FUSS. That is to say I have the dual/trip class code in and have run into afew glitches. the one I'd like to address right now is CAN_CAST here is what my mud.h has
Code will follow below:
---------------------------------------------
#define CAN_CAST(ch) (((ch)->class != 2 && (ch)->class != 3) \
&& ((ch)->dual_class != 2 && (ch)->dual_class != 3) \
&& ((ch)->trip_class != 2 && (ch)->trip_class != 3))
---------------------------------------------
Now obviously I have a problem here :) Can some one give
me a solution that will allow one to cast if the
class is a caster, if the dual_class is a caster, or if the
trip_class is a caster. For instance If I start as a
warrior and dual at a set level to mage I want to have that char be able to cast from that point on.
thanks,
sokol
sokol@eqinterface.com | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #1 on Tue 10 Aug 2004 01:47 AM (UTC) |
Message
| What exactly is the error? Are you getting a compile error, it it not working correctly, allowing anyone to cast, or is it not letting anyone cast, etc. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
Posted by
| Sokol
(3 posts) Bio
|
Date
| Reply #2 on Tue 10 Aug 2004 02:51 AM (UTC) Amended on Tue 10 Aug 2004 02:55 AM (UTC) by Sokol
|
Message
| It's not letting them cast.
"You can't do that."
Any non immortal can't cast.
The way it is now is it's looking for the player to be anything but class 2 or 3, dual_class 2 or 3, or trip_class 2 or 3.
I'm looking for a better CAN_CAST solution.
-Sokol | Top |
|
Posted by
| Malelder
(9 posts) Bio
|
Date
| Reply #3 on Tue 10 Aug 2004 05:49 PM (UTC) |
Message
| Hmm..I'm reading:
#define CAN_CAST(ch) (((ch)->class != 2 && (ch)->class != 3) \
&& ((ch)->dual_class != 2 && (ch)->dual_class != 3) \
&& ((ch)->trip_class != 2 && (ch)->trip_class != 3))
as:
"If class is not 2 and 3, AND dual is not 2 and 3, AND trip is not 2 and 3".
so if any of your 3 classes are 2 or 3, then you can't cast...i think changing the &&'s on the outside to ||'s would fix it up.
that way if any of the 3 classes are magic using classes, then they can cast. but i suck at coding, so i could be wrong (;
| Top |
|
Posted by
| Sokol
(3 posts) Bio
|
Date
| Reply #4 on Tue 10 Aug 2004 06:39 PM (UTC) |
Message
| Nope, I initialy had it set to || which is OR and that also had a problem. I solved the problem, been away from muds for awhile, but it seems in smaug you have to have 1 or above in the spell to cast period. Unless it's my code causing this.
-sokol | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,631 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top