>Then came the tricky part, to make the weapon disappear after a given >time. I have tried many different solutions, but all made the MUD crash >or the code was just skipped over in the system (even though no errors >in Make). >This includes an add to point_update, a few lines in update_char_objects, >a whole new comm.c check called update_astral, among others (too many >to be mentioned here). > >Have somebody out there had the same problem as I have? >Maybe someone can help me... > >The thing is, that I want the blade gone in a given time. Even >GET_OBJ_TIMER didn't work. Not even a new structure called >astral_timer worked (Instead, the MUD crashed every tick). > >/Christoffer Why not have it remove the weapon when an affect wears off (ie: AFF_ASTRAL), and have the spello call both MAG_MANUAL and MAG_AFFECTS, where MAG_AFFECTS sets the astral flag. Then, where it actually removes the spell (affect_from_char I believe), check to see if the affect being removed is AFF_ASTRAL. If it is, call a new function remove_astral_sword(ch); remove_astral_sword should be a fairly easy function to write, just search through eq, then inventory. If you come across the sword, unequip it, then do: obj_from_char(obj, ch); extract_obj(obj); That should work. By the way, you should make the sword not be removable from equipped position until it vanishes :) Hope this helps, Rasdan / \ _ ) (( )) ( (@) /|\ ))_(( /|\ _ |-|`\ / | \ (/\|/\) / | \ (@) | | ------------/--|-voV---\`|'/--Vov-|--\--------------|-| |-| '^` (o o) '^` | | | | James C. Thomas Jr. `\Y/' Founder of Finality |-| |-| rasdan@finality.com | | | | finality.com 4000 |-| |_|_____________________________________________________| | (@) l /\ / ( ( \ /\ l `\|-| l / V \ \ V \ l (@) l/ _) )_ \I `\ /' ` +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST