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 ➜ SMAUG ➜ SMAUG coding ➜ A little better of a question (Familiar spell)

A little better of a question (Familiar spell)

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


Posted by Halomantis   (27 posts)  Bio
Date Mon 26 May 2003 05:00 AM (UTC)
Message
I was following some instructions on how to set up a familiar spell. The directions are straight foward enough except for one part. Step 5 has me a little confused. If you want the whole code goto http://www.kyndig.com/codes/diku/merc/smaug/snippets/more9.html.

Install:

Step 1:
Include this file (familiar.c) in your make file or project

Step 2:
Add to tables.c around line 793:
if ( spell == spell_familiar ) return "spell_familiar"; // familiar

Step 3:
Add to tables.c around line 101, under case 'f':
if ( !str_cmp( name, "spell_familiar" )) return spell_familiar; // familiar

Step 4:
Add to mud.h around line 3896:
DECLARE_SPELL_FUN( spell_familiar ); // familiar

Add to mud.h around line 1409:
#define MOB_VNUM_FAMILIAR 6 // familiar snippet
The above line should be changed to a generic mob that you need to
create in one of your areas (preferably limbo.are).

Step 5:
Add summon familiar to your skills.dat and .class files as appropriate.
(Suggested: code: spell_familiar, mana: 40, beats: 14)


And please don't burn me I tried to word this the best I could and have included as much info as I have been asked.
Top

Posted by Halomantis   (27 posts)  Bio
Date Reply #1 on Mon 26 May 2003 11:12 AM (UTC)
Message
I might have figured it out. We shall see. I just did a whole slew of sset commands.

sset familiar code; typespell; acttype; powertype; flag; value; target; min pos; beats; mana
Top

Posted by Halomantis   (27 posts)  Bio
Date Reply #2 on Mon 26 May 2003 08:19 PM (UTC)
Message
Ok everything works fine but how can I make it so the code check your class changing what creatures are casted. Like having stuff like bears and such answer a druid or demons and such answering a vampire and such.
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #3 on Tue 27 May 2003 04:43 AM (UTC)
Message
I'm not sure exactly what the syntax is, but a check like this or something similar would probably do:

if (summon->demon && ch->class->vampire )
{
Summon code for the demon...
}
if (summon->bear && ch->class->druid )
{
Summon code for bear...
}

If that doesn't help in any shape or form (note I haven't spent much time coding smaug, I'm an SWR person all the way) then just post and say so. I'll download the snippet and give you some code that you can stick right into your .c files.

~Nick Cash
http://www.nick-cash.com
Top

Posted by Halomantis   (27 posts)  Bio
Date Reply #4 on Tue 27 May 2003 05:34 AM (UTC)
Message
Hey that is perfect.. I could not figure out what kind of check to use. Thanks!
Top

Posted by Nick Cash   USA  (626 posts)  Bio
Date Reply #5 on Tue 27 May 2003 03:10 PM (UTC)
Message
So it worked alright? I read through the posts again and it looks like I did it backwords in a way, but hey, if it works for you then all is good.

Happy Coding.

~Nick Cash
http://www.nick-cash.com
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.


18,065 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.