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
➜ SMAUG
➜ SMAUG coding
➜ Mages do it with mana - or do they?
Mages do it with mana - or do they?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Garaelb
(54 posts) Bio
|
Date
| Sat 26 Jul 2003 03:05 PM (UTC) |
Message
| I have this MOB who is suppose to be an evil spell caster. The problem is when the players enter the room he starts fighting with weapons instead of casting spells at them. First thing I did was remove the weapons. I figured no weapons - no weapon attacks Right? WRONG! With no weapons the MOB started punching and still not casting spells. I'm not sure why so naturally I come to you folks here to seek the answers to -
How do you assign mana to a MOB?
How do you assign spells to a MOB
How do you get the MOB to cast spells instead of fighting?
| Top |
|
Posted by
| Gatewaysysop2
USA (146 posts) Bio
|
Date
| Reply #1 on Sat 26 Jul 2003 07:42 PM (UTC) |
Message
| No offense here, but you could have at least looked at some of the overly obvious things being employed by the myriad of spell casting mobs in stock SMAUG/FUSS/etc. I hate to sound like an elitist or something, but I honestly think that if you had done that you'd have figured all or most of this out. Alas, I digress:
I don't even think MOBs need mana to cast spells, but I could be wrong. You can, of course, give them as much as you want. It's just another field you can set using Area Editor or whatever.
If you want the MOB to cast spells, there are spec_funcs for these sort of things. I think there are at least three different 'classes' of spells you can have the mob set to cast. If you're using Nick's Area Editor there's a drop down for this. You can also add some things like fireballs, flamestrike, etc. using the "attacks" field, and also remove the "kick/punch/bash/stun/trip" items if you don't want them using those.
If you want to use specific spells that are not pre-set in the spec_funcs or available under "attacks" then you have to write a mprog for your beastie. Easiest way to do this is some kind of random "fight" prog, set to whatever frequency you feel is appropriate. Therein you can simply add lines like,
c 'whatever spell you want'
Actually you can have it cast several in a row if you want, or maybe randomize which spells it casts, like this:
if rand(50)
c 'spell number 1'
else
c 'spell number 2'
endif
I'm sure you get the idea. Hope that helps somehow.
|
"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence | Top |
|
Posted by
| Meerclar
USA (733 posts) Bio
|
Date
| Reply #2 on Sat 26 Jul 2003 11:56 PM (UTC) Amended on Sat 26 Jul 2003 11:58 PM (UTC) by Meerclar
|
Message
| Be aware though, even with all the mprogs and spec functions you can give a mob, they WILL attack with whatever weapons are available to them - be they actual weapons or claws and teeth. It's pretty well impossible (without HUGE code revisions) to stop a caster mob from engaging in melee. Besides, even if you did, you only give the big dumb warriors a rather substantial edge in fights with casters, something I'm sure your caster classes will really appreciate in pk.
In a nutshell, mobs dont cast spells INSTEAD of fighting, they cast IN ADDITION to fighting, something sure to frustrate your players if handled properly. |
Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.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.
13,395 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top