Welcome to the Builder Academy

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

More
05 May 2013 03:13 #2111 by rudeboyrave
Replied by rudeboyrave on topic flying bug
he also wants movement messages "bob flys south" and bob is flying here (to room)

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
05 May 2013 04:16 #2116 by Fizban
Replied by Fizban on topic flying bug
Same thing can be done for those though, just as easy to check for the AFF flag as it is for POS_FLYING. Seems more sensible IMO than having to add checks for FLYINGto everything that checks for standing, both current and anything you add in the future.

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

More
05 May 2013 04:22 #2118 by JTP
Replied by JTP on topic flying bug
The move part i was able to do, they work.

But tnx fizban, cant wait to try those aproaches.

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

More
06 May 2013 11:21 - 06 May 2013 11:27 #2141 by JTP
Replied by JTP on topic flying bug
I have come SO far now, everything works, message for leave room, enter room, score, you cant sleep if your flying, if you look in a room you see "Charname is flying here."

BUT :(

when fly spell runs out POS_FLYING is still on, need it to go back to POS_STANDING.

I can somewhat get it to work, if they type stand they return to POS_STANDING, but would be best if it happened automatically when fly spell ended, or else people would appear to be flying though fly ended.


Ideas welcome, maybe i can finally contribute with my first snippet if we can get this last little detail to work.
Last edit: 06 May 2013 11:27 by JTP.

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

More
06 May 2013 12:27 #2143 by rudeboyrave
Replied by rudeboyrave on topic flying bug
since you have it as a spell, cant you use the wear off message?

CyberASSAULT
www.cyberassault.org
cyberassault.org 11111
A post-apocalyptic, sci-fi MUD.

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

More
06 May 2013 12:34 - 06 May 2013 12:38 #2144 by JTP
Replied by JTP on topic flying bug
This is the wear off in spell_parser.c

From stock tba its set to POS_FIGHTING iwe tryed others, dunno why it was set to fighting from beginning. Doesnt look like the skillo can be used.
Code:
spello(SPELL_FLY, "fly", 40, 20, 2, POS_FIGHTING, TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, "You drift slowly to the ground.");
.
Code:
#define skillo(skill, name) spello(skill, name, 0, 0, 0, 0, 0, 0, 0, NULL); /* Arguments for spello calls: * spellnum, maxmana, minmana, manachng, minpos, targets, violent?, routines. * spellnum: Number of the spell. Usually the symbolic name as defined in * spells.h (such as SPELL_HEAL). * spellname: The name of the spell. * maxmana : The maximum mana this spell will take (i.e., the mana it * will take when the player first gets the spell). * minmana : The minimum mana this spell will take, no matter how high * level the caster is. * manachng: The change in mana for the spell from level to level. This * number should be positive, but represents the reduction in mana cost as * the caster's level increases. * minpos : Minimum position the caster must be in for the spell to work * (usually fighting or standing). targets : A "list" of the valid targets * for the spell, joined with bitwise OR ('|'). * violent : TRUE or FALSE, depending on if this is considered a violent * spell and should not be cast in PEACEFUL rooms or on yourself. Should be * set on any spell that inflicts damage, is considered aggressive (i.e. * charm, curse), or is otherwise nasty. * routines: A list of magic routines which are associated with this spell * if the spell uses spell templates. Also joined with bitwise OR ('|'). * See the documentation for a more detailed description of these fields. You * only need a spello() call to define a new spell; to decide who gets to use * a spell or skill, look in class.c. -JE */
.
Last edit: 06 May 2013 12:38 by JTP.

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

Time to create page: 0.212 seconds