Code for Rom2.4b4: spell_closing_weave v1.0 by Kracus Thanks to the people below for the making muds possible! :) Based on ROM Version 2.4 beta (c)1993-96 Russ Taylor Based on Merc 2.1 code by Hatchet, Furey, and Kahn Original DikiMud by: Hans Staerfeldt, Katja Nyboe, Tom Madsen, Micheal Seifert, Sebastian Hammer This is a spell that closes a portal, and if the portal is two-way it closes the portal on the other side as well. Example: cast 'closing weave' portal It works for stock rom as is, but you need to add it in a spellgroup to be available to mortals. This spell also does not allow one to close a portal that is permanent( -1 ) or a portal->timer of ( 0 ) I provided two version of: void spell_closing_weave. The first version closes only the side that the person closing the weave is on. The second version closes both sides of a two-way portal. -Kracus Thanks to Russ Taylor and RomCrew for the Rom2.4 code. ...put in the help.are -1 ClOSING WEAVE~ Syntax: cast 'closing weave' portal This spell allows the caster to use a spell to close any portals that are non-permanent. Closing Weave may only be used on objects that are portals. If the portal is a two-way portal the closing weave spell will close both sides of the portal. -Code by Kracus ~ ...put in magic2.c either the One-Way or Two-Way version. // Closing Weave(One-Way Portals)- code by Kracus void spell_closing_weave( int sn, int level, CHAR_DATA *ch, void *vo,int target) { OBJ_DATA *obj; obj = get_obj_here(ch, target_name); // Defines portal location if((IS_SET(ch->in_room->room_flags, ROOM_SAFE) // Noclose in safe rooms ||(IS_SET(ch->in_room->room_flags, ROOM_PRIVATE)))) { send_to_char("You fail close the gateway.\n\r",ch); return; } if(obj == NULL) { send_to_char("Channel a closing weave to close what...?",ch); return; } if( obj->item_type != ITEM_PORTAL ) // Has to be a portal { send_to_char( "You are not the Creator!\n\r", ch ); return; } if(obj->timer <= 0) // Set to make sure permanent or 0 portals nonclose { send_to_char("You cannot close a permanent gateway.",ch); return; } act("$p shimmers in a white light, then closes.",ch,obj,NULL,TO_ROOM); act("$p shimmers in a white light, then closes.",ch,obj,NULL,TO_CHAR); extract_obj(obj); // Close the portal return; } // Closing Weave(One-Way && Two-Way Portals)- code by Kracus void spell_closing_weave( int sn, int level, CHAR_DATA *ch, void *vo,int target) { OBJ_DATA* src; OBJ_DATA* dst; if ((IS_SET(ch->in_room->room_flags, ROOM_SAFE) // Kracus- noclose in safe rooms ||(IS_SET(ch->in_room->room_flags, ROOM_PRIVATE)))) { send_to_char("You fail close the gateway.\n\r",ch); return; } src = get_obj_here(ch, target_name); // Kracus-defines portal location if (src == NULL) { send_to_char("Channel a closing weave to on what?", ch); return; } if ( src->item_type != ITEM_PORTAL ) // Kracus- has to be a portal { send_to_char( "You cannot close that.\n\r", ch ); return; } if ( src->timer <= 0 ) // Set to make sure permanent or 0 portals nonclose { send_to_char("You cannot close a permanent gateway.",ch); return; } // Find second portal for (dst = get_room_index(src->value[3])->contents; dst != NULL; dst = dst->next_content) { if (is_name(target_name, dst->name) && dst->item_type == ITEM_PORTAL && dst->value[3] == ch->in_room->vnum) break; } // Set to make sure permanent or 0 portals nonclose if (dst != NULL && dst->timer <= 0 ) { send_to_char("You cannot close a permanent gateway.",ch); return; } act("$p shimmers in a white light, then closes.", ch, src, NULL, TO_ROOM); act("$p shimmers in a white light, then closes.", ch, src, NULL, TO_CHAR); extract_obj(src); // Close the source portal if (dst != NULL) // Check for one-sided portal { extract_obj(dst); // Close the destination portal } return; } ...put in const.c { "closing weave", { 31, 35, 53, 53 }, { 1, 1, 0, 0 }, spell_closing_weave, TAR_IGNORE, POS_STANDING, NULL, SLOT(596), 50, 24, "", "!Closing Weave!", "" }, ...put in magic.h DECLARE_SPELL_FUN( spell_closing_weave ); ...Raise MAX_SKILL by 1 in merc.h ...If you make a new spellgroup for it Raise MAX_GROUP by 1 in merc.h ...Put in a spellgroup to make available to mortals like transporation ...remove o files and do a make // have fun..Kracus