Welcome to the Builder Academy

Question Control weather

More
19 Mar 2016 00:03 - 19 Mar 2016 00:10 #5628 by JTP
Control weather was created by JTP
Hey

When i try
cast 'control weather' dhdhjf
or something else
Then it just says okay

If i use
cast 'control weather' worse or better
Then it stil just say okay

Nothing really seems to happend. Is there a fix to get it to work ?
Last edit: 19 Mar 2016 00:10 by JTP.

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

More
19 Mar 2016 15:38 #5630 by JTP
Replied by JTP on topic Control weather
It is defined in spells.h
and in spell_parser.c
and assigned to a class in class.c

but i dont see the actual ASPELL(spell_control_weather) anywhere

HELP :)

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

More
20 Mar 2016 22:22 #5637 by WhiskyTest
Replied by WhiskyTest on topic Control weather
Yeah, I don't see the ASPELL for it. My guess is it is a placeholder for budding coders such as yourself to create the function.

Once you've written that, you add it to call_magic. Something like this:

if (IS_SET(SINFO.routines, MAG_MANUAL))
switch (spellnum) {
case SPELL_CONTROL_WEATHER: MANUAL_SPELL(spell_control_weather); break;

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

More
20 Mar 2016 22:27 #5638 by JTP
Replied by JTP on topic Control weather
Funny thing is though, that you can do

cast 'control weather' worse or better

Just nothing happends. So somehow it must be in the code ? Just not as a ASPELL ?

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

More
21 Mar 2016 01:00 #5639 by WhiskyTest
Replied by WhiskyTest on topic Control weather
It basically just runs through the process of casting a spell that has no effect:

do_cast : checks this is a legitimate spell, which it is because it has been defined in spells.h and spello. Spello gives it the mana cost and name and things like that.

Then

cast_spell : checks you are in the correct position - not sleeping etc. This is where the OK message comes from.

Then

call_magic : this does all the cool stuff. If the spell deals damage or casts armour and things like that. Because Control Weather is MAG_MANUAL it looks for the additional code to run - which happens to not exist.

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

More
21 Mar 2016 07:31 #5640 by Kyle
Replied by Kyle on topic Control weather
Yeah it's an unfinished spell. Funny how long it's been there. It goes way back to legacy CircleMUD.

We might as well come up with an implementation for the next TBA release (whenever that is planned for).

I'll throw something together this week, unless somebody beats me to it.

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

Time to create page: 0.270 seconds