G'day all I'm stuck here. I need to add some type of delay system in, which can calculate how long is left in the delay and can recurisivly delay .... that might sound confussing .. check out my code and see what i've got. And hopefully I can someone can send some pointers out to help us. Thanks alsot. oo code oo ^^^^^^^^^^^^^^^ // Now memorise the spells, IF you are sitting down. if (standing == FALSE) { sprintf (buf, "You begin %s.\n", string5); send_to_char (buf, ch); for (sp_level=1; sp_level <= SPELL_LEVELS; sp_level++) { for (spell_pos=1; spell_pos <=MAX_SPELLS_PER_LEVEL; spell_pos++) { // Assumptions here : G_S_M = 0 means that theres no spell and // G_S_T_B_M != 0 means there's is a spell ready to be memed. if ( (GET_SPELL_MEMORISED(ch, sp_level, spell_pos) == 0) && (GET_SPELL_TO_BE_MEMED(ch, sp_level, spell_pos) != 0) ){ // MEMORISE this spell!!! // Now do delay .... //SET_DELAY(ch, DELAY_MEMORISE, 10*sp_level, TRUE, FALSE, LSE); // Record that the spell has been memorised. GET_SPELL_MEMORISED(ch, sp_level, spell_pos) = GET_SPELL_TO_BE_MEMED(ch, sp_level, spell_pos); // Display the spell memorised. sprintf (buf, "You have successfully memorised %s.\n", spells [GET_SPELL_MEMORISED(ch, sp_level, spell_pos)]); send_to_char (buf, ch); } } } } } // End of the sitting down meming process ... +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | | Or send 'info circle' to majordomo@cspo.queensu.ca | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST