Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > MUD Players and General Discussion > Newbie Help
Click here to Register

Reply
 
Thread Tools
Old 07-18-2002, 07:10 AM   #1
Nostrum
Member
 
Join Date: Apr 2002
Posts: 47
Nostrum is on a distinguished road
Send a message via ICQ to Nostrum
Wink

Anyone out there have a problem with sset? I am using SMAUG1.4 and when i attempt to sset the new spell, it claims it isn't a skill or spell. I found another person having the same problem from SMAUGWiz but he has no solution either. If anyone can help it would be greatly appreciated. Thanks!
Nostrum is offline   Reply With Quote
Old 07-22-2002, 11:27 AM   #2
Seraph
New Member
 
Join Date: Apr 2002
Location: Australia
Posts: 14
Seraph is on a distinguished road
Send a message via ICQ to Seraph Send a message via MSN to Seraph
Ok, i'm not a wiz at this sorta stuff, but when making skills etc, try using the 'sn' instead of the name...*shrugs* if it doesn't work, write back and i'll have another look.
Seraph is offline   Reply With Quote
Old 07-22-2002, 06:09 PM   #3
Thathalum
New Member
 
Join Date: Jul 2002
Home MUD: Unicorn Valley
Posts: 4
Thathalum is on a distinguished road
Syntax would be to create a spell called Bloom
sset create skill bloom
sset 'bloom' type spell
sset 'bloom' target <target type>
sset 'bloom' minpos 12
etc...
or, you could type:
sset create skill bloom
slo 'bloom'
sset <sn> type spell
Lastly, don't forget to type: sset save skill table otherwise all your work will be voided. Spells can be tested without a reboot, skills need to have a reboot before they can be tested.
Thathalum is offline   Reply With Quote
Old 08-01-2002, 12:15 PM   #4
Nostrum
Member
 
Join Date: Apr 2002
Posts: 47
Nostrum is on a distinguished road
Send a message via ICQ to Nostrum
I gave the mud a rest for a while, and when I came back and tried again I found the same problem. I finally got the code to compile after getting some help from the posters here. I can sset all fields without problem until I get to the code field. I get an error message stating that it isn't a skill or spell, but the code is there, compiled and ready to go or so I thought. I can go to the .txt file and modify it from there and then run a make. Then I reboot the mud and try the spell and it states, the spell has no affects. If I use slookup I find the spell now has null in the code field. I missed a step somewhere and the thing is I don't know where. It is not a spell that modifies a stat so it shouldn't need an affect. The spell is an area attack. All help offered is greatly appreciated.
Nostrum is offline   Reply With Quote
Old 08-05-2002, 03:20 PM   #5
Nostrum
Member
 
Join Date: Apr 2002
Posts: 47
Nostrum is on a distinguished road
Send a message via ICQ to Nostrum
I checked the modules using grep. I still do not see why I am having these problems. I first added the code and compiled and recompiled till no errors reported. After using sset, several errors appeared. I /**/ the code out, and I give up for now. I would like to say thanks to Erdos and Dre for the help on the code. Also, thanks to Thathalum and Seraph for assistance with sset. If I missed someone I apologize.

Nostrum is offline   Reply With Quote
Old 08-05-2002, 04:23 PM   #6
Thathalum
New Member
 
Join Date: Jul 2002
Home MUD: Unicorn Valley
Posts: 4
Thathalum is on a distinguished road
If you are trying to use a different code then spell_smaug to effect your spell, you need to declare the code (i.e. spell_quantum_spike). But, before you do that, you have to actually define it in the code. I believe it's in tables.c, mud.h, and magic.c

The code you need to add looks something like this: (for the bloom example)

In Mud.h - do a search for spell_quantum_spike and then add: DECLARE_SPELL_FUN( spell_your_spell );

In Tables.c - do the same search, then add:
if ( !str_cmp( name, "spell_your_spell" )) return spell_your_spell;
then search again and add:
if ( spell == spell_your_spell ) return "spell_your_spell";

Then make clean, recompile...reboot your mud. sset 'your spell' code spell_your_spell, then sset save skill table. Then reboot again. That *should* fix it.
Thathalum is offline   Reply With Quote
Old 08-05-2002, 06:03 PM   #7
Nostrum
Member
 
Join Date: Apr 2002
Posts: 47
Nostrum is on a distinguished road
Send a message via ICQ to Nostrum
case ATCK_FYREBALL:
retcode = spell_fyreball( skill_lookup( "fyreball" ),
ch->level, ch, victim );
break;

in fight.c ln 487


if ( spell == spell_fyreball ) return "spell_fyreball";

in tables.c ln 811

if ( !str_cmp( name, "spell_fyreball" )) return spell_fyreball;

in tables.c ln 131

DECLARE_SPELL_FUN( spell_fyreball );

in mud.h ln 4250

the above are the modules and lines where the code lies. Is there a chance that my placement could have something to do with it? For instance, does SMAUG require an order to where every function is placed, and could that affect this as well? Also here is some advice i received:

The problem is you need to add ATCK_FYREBALL to the enumeration of mob attacks in mud.h. Ie, add it to this list, but before MAX_ATTACK_TYPE:

/*
* Attack types
*/
typedef enum
{
ATCK_BITE, ATCK_CLAWS, ATCK_TAIL, ATCK_STING, ATCK_PUNCH, ATCK_KICK,
ATCK_TRIP, ATCK_BASH, ATCK_STUN, ATCK_GOUGE, ATCK_BACKSTAB, ATCK_FEED,
ATCK_DRAIN, ATCK_FIREBREATH, ATCK_FROSTBREATH, ATCK_ACIDBREATH,
ATCK_LIGHTNBREATH, ATCK_GASBREATH, ATCK_POISON, ATCK_NASTYPOISON, ATCK_GAZE,
ATCK_BLINDNESS, ATCK_CAUSESERIOUS, ATCK_EARTHQUAKE, ATCK_CAUSECRITICAL,
ATCK_CURSE, ATCK_FLAMESTRIKE, ATCK_HARM, ATCK_FIREBALL, ATCK_COLORSPRAY,
ATCK_WEAKEN, ATCK_SPIRALBLAST, MAX_ATTACK_TYPE
} attack_types;

Youll notice that this list already has 32 entries... fortunately, mob attacks are an extended bitvector, meaning you are no longer limited to 32 flags.

Of course, youll also need to add "fyreball" to the attack_flags string array in build.c. The order of the above enumeration and the attack_flags string array must be preserved: thus, if you added ATCK_FYREBALL between ATCK_CURSE and ATCK_EARTHQUAKE, then you must add "fyreball" between "curse" and "earthquake".

I highly recommend that you add ATCK_FYREBALL at the very end (but still before MAX_ATTACK_TYPE): this will ensure that mobs whose attacks were saved before the change, will keep the same attacks.

There are other problems in the code you posted too.

When it loops through the room, it skips players who have wizinvis set to LEVEL_IMMORTAL (51). however, it is possible for imms to set their wizinvis to a mortal level higher than the caster (IE: caster is level 20, imm is wizinvis level 30). So you should change ">= LEVEL_IMMORTAL" to "> get_trust(ch)".

Furthermore, this code uses the act function badly... i quote:
act( AT_MAGIC, "A seering ball of flame from you,"
" engulfs $N",
ch, ch, vch , TO_CHAR );

The 4th argument of the act function is supposed to be a pointer to an object (or to NULL if the echo has nothing to do with objects). So you should change the above to
act( AT_MAGIC, "A seering ball of flame from you,"
" engulfs $N",
ch, NULL, vch , TO_CHAR );

Also, you call act twice, once with TO_CHAR as the 6th arg, and once with TO_ROOM as the 6th arg. This means the victim will see "A seering ball of flame from Bob, engulfs Joe", but they ought to see "A seering ball of flame from Bob, engulfs you".. note the YOU. this is a common error.

To correct it, use 3 acts: one with TO_CHAR as arg 6, one with TO_VICT as arg 6, and one with TO_NOTVICT as arg 6. TO_VICT will go only to the victim and TO_NOTVICT is the same as TO_ROOM except that it skips the victim. The one with TO_NOTVICT should be like the one you posted with TO_ROOM, the one with TO_VICT should replace "$N" with "you".

Hope this helps...

-thanks for the continued assistance-
Nostrum is offline   Reply With Quote
Reply


Thread Tools


SSET in SMAUG - Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for new and exp. players - SMAUG MUD Greetmir Advertising for Players 0 04-29-2005 11:39 AM
Chronicles/Smaug Mud CTA Advertising for Staff 0 05-16-2003 11:15 PM
Smaug bug Samson MUD Coding 0 10-23-2002 06:57 AM
smaug Blank Deed Newbie Help 3 07-24-2002 11:19 AM
Smaug Code Help Please Klered MUD Coding 2 07-12-2002 09:42 PM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 10:43 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014