Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ sset RIS flags
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Txzeenath
USA (54 posts) Bio
|
| Date
| Fri 29 Apr 2005 12:20 PM (UTC) Amended on Wed 04 May 2005 11:10 AM (UTC) by Txzeenath
|
| 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 |
|
| Posted by
| Txzeenath
USA (54 posts) Bio
|
| Date
| Reply #1 on Wed 04 May 2005 10:49 AM (UTC) |
| Message
| Hmm seems this got scrolled off the list... sooo...
*bump* |
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 |
|
| Posted by
| Dralnu
USA (277 posts) Bio
|
| Date
| Reply #2 on Tue 24 May 2005 05:52 PM (UTC) |
| Message
| 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) | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
15,195 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top