[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  sset RIS flags

sset RIS flags

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Txzeenath   USA  (54 posts)  [Biography] 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)
[Go to top] top

Posted by Txzeenath   USA  (54 posts)  [Biography] 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)
[Go to top] top

Posted by Dralnu   USA  (277 posts)  [Biography] 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)
[Go to top] 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.


10,785 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]