Hey all, I'm still after several months fiddling with this damnable gate spell I coded in and I need an idea as to what to put in to remove or purge the gate once you enter it. Mind you this is a spell. The primary function of the spell is of course to open a gate to a location and then after those who want to enter, enter the gate, and the caster steps through, the gate should immediately vanish. This is taken from my spells.c file: #define PORTAL_OBJ 20 /* the vnum of the portal object */ ASPELL(spell_gate) { struct obj_data *portal, *tportal; struct extra_descr_data *new_descr, *new_tdescr; char buf[80]; if (ch == NULL || victim == NULL) return; /* create the portal */ portal = read_object(PORTAL_OBJ, VIRTUAL); GET_OBJ_VAL(portal, 0) = victim->in_room; GET_OBJ_TIMER(portal) = (int) (GET_LEVEL(ch) / 10); CREATE(new_descr, struct extra_descr_data, 1); new_descr->keyword = str_dup("portal gate gateway"); sprintf(buf, "You can barely make out %s.", world[victim->in_room].name); new_descr->description = str_dup(buf); new_descr->next = portal->ex_description; portal->ex_description = new_descr; obj_to_room(portal, ch->in_room); act("$n conjures a gateway out of thin air.", TRUE, ch, 0, 0, TO_ROOM); act("You conjure a gateway out of thin air.", TRUE, ch, 0, 0, TO_CHAR); /* create the portal at the other end */ tportal = read_object(PORTAL_OBJ, VIRTUAL); GET_OBJ_VAL(tportal, 0) = ch->in_room; GET_OBJ_TIMER(tportal) = (int) (GET_LEVEL(ch) / 15); CREATE(new_tdescr, struct extra_descr_data, 1); new_tdescr->keyword = str_dup("portal gate gateway"); sprintf(buf, "You can barely make out %s.", world[ch->in_room].name); new_tdescr->description = str_dup(buf); new_tdescr->next = tportal->ex_description; tportal->ex_description = new_tdescr; obj_to_room(tportal, victim->in_room); act("A glowing gateway appears out of thin air.", TRUE, victim, 0, 0, TO_ROOM); act("A glowing gateway opens here for you.", TRUE, victim, 0, 0, TO_CHAR); } riodan@cyberspace.org +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT