Well spell_summon() has code in it which can be used to find and transfer a mob into the current room. Copy the spell to a new name, and add in code which performs your level checks.
Depending on how you exactly want to do things in terms of the fighting, changes the best way to go about things. If you want this spell to be cast while the player is fighting who will summon a mob replacement. You could make it so when the mob is transfered into the room within the same spell function starts attaching who ever ch->fighting is set to. Use something like one_hit() or something to do this. You may want to make the victim change target it they are an NPC - up to you.
Then stop the player fighting if this is relevant - look at do_peace() for a command which stops everyone in the room fighting.
Good luck,
- Kal
Kalahn
Developer of the Dawn of Time codebase
http://www.dawnoftime.org/
How could I make a spell summon a mob to fight inplace of the player that summoned it and not attack that player.. also, to make this more complex, I want to set the npc that the player can call based on their level. ie: John is level 10 so he can only call an NPC which was specified for levels 1-10 .. am I making any sense? hope so hehe
thanks!
any questions about what I'm trying to say (cuz I know it's kinda garbled) Xavaier@Xavaier.com
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.