sset RIS flags

Posted by Txzeenath on Fri 29 Apr 2005 12:20 PM — 3 posts, 15,861 views.

USA #0
Hmm this really isn't my strong suit :-p so I was wondering if someone could help me.

I'm running a modified Smaug(1.4a) mud.. think this is just about the only thing left not modified .... and this is why :-p
(i'm horrible with bit <-> string stuff)

Surprisingly enough after these years nobody has changed this(publicly anyway)

In sset, if you do: sset <spell> affect resistant paralysis
It will str_dup the paralysis, writing the words to the file and making the affect useless as the fread and fwrite for skills/spells don't check for this type of thing.

What I am looking for is a way to convert this into a bitvector form. Right now the modifier field is defined as a "char" both in mud.h and the function itself.

Basically... I want to be able to set spells via words rather than have to find the bitvectors for the RIS.

This is where it...hmm not much on coding words haha... I code alone.. never need to talk. Let's say copies it to the structure.


CREATE (aff, SMAUG_AFF, 1);
if (!str_cmp (duration, "0"))
duration[0] = '\0';
if (!str_cmp (modifier, "0"))
modifier[0] = '\0';
aff->duration = str_dup (duration);
aff->location = loc;
aff->modifier = str_dup (modifier);
aff->bitvector = bit;
aff->next = skill->affects;
skill->affects = aff;
send_to_char ("Ok.\n\r", ch);
return;



Not sure if anyone here knows.. but samson will definately.

Wouldn't it be possible for me to use a form of the (I believe it is called this) fread_flag_string from the afkmud codebase to find the bitvector based on the words.
Amended on Wed 04 May 2005 11:10 AM by Txzeenath
USA #1
Hmm seems this got scrolled off the list... sooo...


*bump*
USA #2
CREATE (aff, SMAUG_AFF, 1);
if (!str_cmp (duration, "0"))
duration[0] = '\0';
if (!str_cmp (modifier, "0"))
modifier[0] = '\0';
aff->duration = str_dup (duration);
aff->location = loc;
aff->modifier = str_dup (modifier);
aff->bitvector = bit;
aff->next = skill->affects;
skill->affects = aff;
send_to_char ("Ok.\n\r", ch);
return;

needed to paste that to look at it. Add somewhere a spot where it will read something like

if( str_cmp == paralysis )
return (whatever the bitvec is)

and do that for each of the strings. A ditry hack, but if it doesn't help, it might help ya figure it out. Have to set it up where it would point to the if func to read the bitvec, but thats the best I can figure

(me helping him is kinda humorous, lol)