Welcome to the Builder Academy

Question flying bug - down to 1 little issue, then we have a snippet.Still need help pls

More
06 May 2013 16:11 - 06 May 2013 16:11 #2149 by JTP
Replied by JTP on topic flying bug
Rumble will add this snippet when its done, come on lads :)
Tnx to rumble im closer, he just dont recall the right syntax, hope someone else does, in:
Code:
/* affect_update: called from comm.c (causes spells to wear off) */ void affect_update(void) { struct affected_type *af, *next; struct char_data *i; for (i = character_list; i; i = i->next) for (af = i->affected; af; af = next) { next = af->next; if (af->duration >= 1) af->duration--; else if (af->duration == -1) /* No action */ ; else { if ((af->spell > 0) && (af->spell <= MAX_SPELLS)) if (!af->next || (af->next->spell != af->spell) || (af->next->duration > 0)) if (spell_info[af->spell].wear_off_msg) send_to_char(i, "%s\r\n", spell_info[af->spell].wear_off_msg); affect_remove(i, af); } } }
.

Rumble said somewhere after wear_off we need something like
if af->spell = FLY or fly or Fly set POS_STANDING
Last edit: 06 May 2013 16:11 by JTP.

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

More
06 May 2013 17:02 #2150 by Fizban
Code:
if (af->spell == SPELL_FLY) GET_POS(ch) = POS_STANDING;

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

More
06 May 2013 17:13 #2153 by JTP
Code:
if (spell_info[af->spell].wear_off_msg) <--this line send_to_char(i, "%s\r\n", spell_info[af->spell].wear_off_msg); <--or this ? affect_remove(i, af);
.

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

More
06 May 2013 17:17 #2155 by Fizban
I'd put it after:
Code:
send_to_char(i, "%s\r\n", spell_info[af->spell].wear_off_msg);

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

More
06 May 2013 18:16 - 06 May 2013 18:16 #2157 by JTP
Code:
added: if (af->spell == SPELL_FLY) GET_POS(ch) = POS_STANDING; gave error: 'ch' undeclared tried adding: struct char_data *ch; gave error: dereferencing pointer to incomplete type :(
.
Last edit: 06 May 2013 18:16 by JTP.

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

More
06 May 2013 19:30 #2158 by Rumble
This one you should be able to figure out. Just look at what variables are being used in the function... change ch to i

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

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

Time to create page: 0.275 seconds