Posted by
| Txzeenath
USA (54 posts) bio
|
Message
| 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.
|
Darkness comes along thy path, searching, wanting, calling wrath,
shadows awaken, release the light, one and only.. here to fight,
challenge the darkness, the shadows they call, hunting the living,
more and all. Roaring thunder, full of hate, a single bound, seals
your fate.
-Txzeenath
telnet://divineright.org:8088
Alumuble Arda -
*Player owned shops, clans, and housing
*Multiclass & Stat training
*Random mob name generation implemented and Overland mapping.
*Realistic equipment statistics
*Interactive enviroment(weather/sectors)
*Weapon sheaths(scabbards), Throwing weapons
*Automatic crash recovery, saving, and reporting without disconnecting
*Fully customizeable color, Automapper, "Smart" mobiles, Hiscore tables, and more!
Currently running AGE v1.9.6(Originated and modified from Smaug 1.4a) | top |
|