Welcome to the Builder Academy

Question Summon Ally Snippet

More
Yesterday 18:12 #10879 by wlessard1
This one is I think interesting and expandable. BTW I use Bramage as my IMM. This is not just a new summon spell but a variable summon spell. You can set multiple mobs and randomize the summons.
Code:
In spells.h at the bottom of your spells list add #define SPELL_SUMMON_ALLY            70 /* Summon random ally for caster Bramage */ Next in spell_parser.c /* Summon Ally Spell Bramage */   spello(SPELL_SUMMON_ALLY, "summon ally", 80, 65, 5, POS_STANDING,   TAR_IGNORE, FALSE, MAG_SUMMONS, "A glowing portal appears, what will come out?"); Finally in magic.c in the summon section. #define MOB_ALLY_WOLF        631  /**< vnum for Summon Ally Spell */ #define MOB_ALLY_RAVEN      632  /**< vnum for Summon Ally Spell */ #define MOB_ALLY_IMP        633  /**< vnum for Summon Ally Spell */ A little further down /* Summon Ally spell, randomly returns a mob */ case SPELL_SUMMON_ALLY:     msg = 4; /* Whatever floats your boat */     fmsg = rand_number(2, 6); /* Random failure message */     switch (rand_number(1, 3)) {       case 1:         mob_num = MOB_ALLY_WOLF;         break;       case 2:         mob_num = MOB_ALLY_RAVEN;         break;       case 3:         mob_num = MOB_ALLY_IMP;         break;       default:         mob_num = MOB_ALLY_WOLF; /* Fallback */     }     pfail = 0; /* Spell always succeeds, no materials needed */     break; I am not a fan of materials to summon. Just me. You can look at summon clone and see where to add in materials. Finally at the bottom of the summoning #undef MOB_ALLY_WOLF #undef MOB_ALLY_RAVEN #undef MOB_ALLY_IMP

Don't forget to make 3 new MOBs for this. You can obviously change the names and adjust the starts to your hearts content. I think that is everything


As normal No disclaimers or claims of it working on your MUD. 

Peace Love and Pizza!

Please Log in or Create an account to join the conversation.

Time to create page: 0.362 seconds