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.
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.