[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Request for help. Regarding CAN_CAST

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Request for help. Regarding CAN_CAST

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Sokol   (3 posts)  [Biography] bio
Date Tue 10 Aug 2004 12:47 AM (UTC)  quote  ]

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
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Tue 10 Aug 2004 01:47 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Sokol   (3 posts)  [Biography] bio
Date Reply #2 on Tue 10 Aug 2004 02:51 AM (UTC)  quote  ]

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
[Go to top] top

Posted by Malelder   (9 posts)  [Biography] bio
Date Reply #3 on Tue 10 Aug 2004 05:49 PM (UTC)  quote  ]
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 (;


[Go to top] top

Posted by Sokol   (3 posts)  [Biography] bio
Date Reply #4 on Tue 10 Aug 2004 06:39 PM (UTC)  quote  ]
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
[Go to top] 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.


1,467 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]