Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Dawn of Time ➜ Configuration ➜ Summoning a mob...

Summoning a mob...

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Xavaier   USA  (26 posts)  Bio
Date Thu 09 May 2002 07:08 PM (UTC)
Message
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
Top

Posted by Kalahn   United Kingdom  (138 posts)  Bio
Date Reply #1 on Fri 10 May 2002 06:41 AM (UTC)
Message
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/
Top

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.


12,885 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.