User Name:


Forgot your password?
Vote for Us!
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing, DotBot, Sogou

Members: 0
Guests: 13
Newest Member
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » Spell
Forum Rules | Mark all | Recent Posts

< Newer Topic :: Older Topic > Help!

Pages:<< prev 1 next >>
Post is unread #1 May 4, 2003, 4:15 pm
Go to the top of the page
Go to the bottom of the page


JoinedMay 4, 2003

I tried to create a new spell on-line
I used the command sset skill and I've got no problems.
Now... I rebooted the Mud and tried to use the spell. I setted it up this way:
sset 449 (sn) type spell

So, I'm sure it's a spell

If i try to cast this spell it said to me I can't because is not a spell.
I tried again compiling skill.dat and magic.c

I didn't work anyway.
What can I do?
This is the spell with using slookup:
Sn: 155 Slot: 449 Spell: 'kraken '
Author: Krisaore
Flags: nobind nobrew
Saves: none SaveEffect: none
Type: Spell Target: ignore Minpos: fighting Mana: 150 Beats: 3 Range: 0
Flags: 4352 Guild: -1 Value: 0 Info: 0
Rent: -2 Code: (null)
It's a water dragon attack.
Tnx for your time
Post is unread #2 May 4, 2003, 5:12 pm
Go to the top of the page
Go to the bottom of the page

Black Hand
JoinedJan 1, 2002

You don't have a code field set for it.

sset kraken code

If it was created entirely online, use spell_smaug as the code.
Post is unread #3 May 5, 2003, 7:55 pm   Last edited Nov 24, 2007, 4:36 pm by Samson
Go to the top of the page
Go to the bottom of the page

The Null Value
GroupAFKMud Team
JoinedFeb 23, 2003

I just want to add a comment here.

I taught myself how to write online spells in SMAUG 1.4 by using slookup and looking at many many spells and finding out their differences. In the process I also ripped open the code and tried to find out what it all did.

For example:

[526hp 1042m 150mv]  [8265625exp]  slookup cure light
Sn:   62 Slot:   16 Spell: 'cure light          '
Author: Smaug
DamType: none  ActType: none   ClassType: none   PowerType: minor
Saves: none  SaveEffect: none
Type: Spell  Target: defensive  Minpos: fighting  Mana: 10  Beats: 12  Range: 0
Flags: 0  Guild: -1  Value: 0  Info: 512
Rent: -2  Code: spell_smaug
Wearoff: !Cure Light!

Affect 1 modifies hit by '1d8+(l/4)'

Hitchar   : You cure $N's light wounds.
Hitvict   : Your light wounds mend and your pain ebbs slightly.
--------------------------[CLASS USE]--------------------------

If you look, it shows you how to write the affect equasion and a few other useful bits. Now if you also test the spells you look up, you can get a greater idea of how it all works. The only thing I was never able to completely decipher was the Wearoff: !Cure Light! line. My guess is that by surrounding the spell in exclaimation marks it tells the game to remove the affects, much like an if check in C looks for the opposite of something's value when it's prefixed by one.

Hope this little note helps. Also if you notice anything say 'Code: spell_cure_poison' or the like under Slookup, you can go and find that code in the various files. This should help you get closer to writing more advanced spells for your game.
Pages:<< prev 1 next >>