Spells: * Mark Rune * Travel Rune Description: Two spells used to travel in the realms. You first mark a rune, storing where you are, and the number of charges (depending on your INT stat), and then you can use it later to travel there at any time. You can not mark or travel a rune in no-recall, private and solitary places. How to install 1.- ALWAYS BACKUP :) 2.- Depending on your mud, you need to create a new type of item, called ITEM_RUNA. Make the neccesary changes in the neccesary files. 3.- == MAGIC.H == DECLARE_SPELL_FUN( spell_marcar_runa ); DECLARE_SPELL_FUN( spell_viajar_runa ); 4.- == MAGIC.C == void spell_marcar_runa( int sn, int level, CHAR_DATA *ch, void *vo,int target) { OBJ_DATA *runa; ROOM_INDEX_DATA *lugar; lugar = ch->in_room; runa = get_eq_char(ch,WEAR_HOLD); if ( IS_SET(lugar->room_flags, ROOM_NO_RECALL ) || IS_SET(lugar->room_flags, ROOM_PRIVATE ) || IS_SET(lugar->room_flags, ROOM_SOLITARY )) { send_to_char( "This is not the appropiate place to mark a rune.\n\r", ch ); return; } if (runa == NULL || runa->item_type != ITEM_RUNA) { send_to_char("You need to hold a blank rune for this spell to work.\n\r",ch); return; } if (runa->value[0] == 1) { send_to_char("This rune has already been marked.\n\r",ch); return; } if (runa != NULL && runa->item_type == ITEM_RUNA) { act("You raise $p towards the sky.",ch,runa,NULL,TO_CHAR); act("$n raises $p towards the sky.",ch,runa,NULL,TO_ROOM); act("You invoke all your power to mark $p!",ch,runa,NULL,TO_CHAR); act("$n invokes all of his powers to mark $p!",ch,runa,NULL,TO_ROOM); } runa->value[0] = 1; /* Marking the rune */ runa->value[1] = ch->perm_stat[STAT_INT]; /* Number of charges */ runa->value[2] = ch->in_room->vnum; /* Destiny Vnum */ char buf[MAX_STRING_LENGTH]; sprintf( buf, "a rune to %s", ch->in_room->name); free_string( runa->short_descr ); runa->short_descr = str_dup( buf ); sprintf( buf, "A rune to %s has been left here.", ch->in_room->name); free_string( runa->description ); runa->description = str_dup( buf ); } void spell_viajar_runa( int sn, int level, CHAR_DATA *ch, void *vo,int target) { ROOM_INDEX_DATA *origen; ROOM_INDEX_DATA *destino; OBJ_DATA *runa; origen = ch->in_room; runa = get_eq_char(ch,WEAR_NONE); if ( IS_SET(origen->room_flags, ROOM_NO_RECALL ) || IS_AFFECTED(ch, AFF_CURSE)) { send_to_char( "You have failed.\n\r", ch ); return; } if (runa == NULL || runa->item_type != ITEM_RUNA) { send_to_char("The marked rune has to be in your inventory for this spell to work.\n\r",ch); return; } if (runa->value[0] != 1) { send_to_char("This rune hasn't been marked yet.\n\r",ch); return; } act("$n invokes the power of a rune to travel.",ch,NULL,NULL,TO_ROOM); act("$n dissapears before your eyes.",ch,NULL,NULL,TO_ROOM); act("You invoke the power of $p to travel.\n\r",ch, runa,NULL,TO_CHAR); destino = get_room_index(runa->value[2]); char_from_room(ch); char_to_room(ch, location); runa->value[1] -= 1; /* You use a charge of the rune when travelling */ act( "$n appears in the room.", ch, NULL, NULL, TO_ROOM ); do_function(ch, &do_look, "auto"); if ( runa->value[1] == 0 ) /* When v1 reaches 0, the rune dissapears */ { act( "$p explodes in many fragments.", ch, runa, NULL, TO_ROOM ); act( "$p explodes in many fragments.", ch, runa, NULL, TO_CHAR ); extract_obj( runa ); } return; } 5.- Add the spells to the classes you want, and create the object of type rune Do a make clean, and compile. ------------ Well, this should be all, any comments, ideas, or problems (hope not) involving those spells, mail me at thanagrim@hotmail.com, and I will check them :) Thanagrim - Nueva Thoria IMP telnet://nuevathoria.wolfpaw.net:3600