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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Removing spells for mortals

Removing spells for mortals

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


Posted by Rob Harper   (108 posts)  [Biography] bio
Date Sat 28 Jun 2003 12:02 AM (UTC)
Message
hey guys I was wondering if anyone knew how to remove "spells" from the practice list for mortals?
[Go to top] top

Posted by Celestine   (29 posts)  [Biography] bio
Date Reply #1 on Sat 28 Jun 2003 12:24 AM (UTC)
Message
manually, you could go the the classes folder, open up the class file, then delete the line containing the spell.
[Go to top] top

Posted by Rob Harper   (108 posts)  [Biography] bio
Date Reply #2 on Sat 28 Jun 2003 03:15 AM (UTC)
Message
I mean the thing in practice that says "spells" I dont want them to know they exist there.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #3 on Sat 28 Jun 2003 05:51 AM (UTC)
Message
You'd need to edit the display in do_practice or whatever the function name is behind the practice command.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #4 on Sat 28 Jun 2003 07:51 AM (UTC)
Message
If you're trying to remove the capability of casting a particular set of spells, you can just set the level to 56 (or whatever the smallest imm level is.) If you're trying to leave the spells there and behave normally in all regards other than they just can't be seen in a full list in practice, then yes, Meerclar said it right. You'd have to edit the do_practice code to not display spells. It should be fairly straightforward.

I think that you'd do it by adding a check to abort if the skill type is spell. At one point, if I remember correctly, the function loops through all skills, and then displays the list. You'd just have to check if it's a spell... I think there's an entry in the skill data structure that is type or skill_type or something like that. That'll let you know if it's a proper skill or a spell.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #5 on Sat 28 Jun 2003 07:58 AM (UTC)
Message
Sorry for the double post...

I was looking through the code and I found the following:

if ( ch->pcdata->learned[sn] == 0
&& SPELL_FLAG(skill_table[sn], SF_SECRETSKILL)
&& !mob)
{
continue;
}

I don't know if this was stock SMAUG or not (a lot of people worked on this code between me and SMAUG), but if it was... then it seems that if you want to not display a particular spell you just set the secret flag on it. Now of course if you want to not display ALL spells, then you would be better off doing something else, otherwise you'll be setting a few hundred secret flags :P But, if it's just for a few spells in particular, maybe something like that would work...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Rob Harper   (108 posts)  [Biography] bio
Date Reply #6 on Sat 28 Jun 2003 08:18 AM (UTC)
Message
heh...I allready made it so they have no spells...but now I have this empty list where spells should be when I type practice...thats what I want to get rid of..or limit to immortals.
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #7 on Sun 29 Jun 2003 03:16 AM (UTC)
Message
To remove the display entry for the spells heading, you'll need to actually edit the code that sends the display in the do_practice (Im guessing at the name) function that finds and displays what a mortal can learn. Easiest bet would probably be to add an if check for immortals if you don't want to wholesale comment or delete sections of code.

Best guess on where to look is act_comm.c. Failing that, find something reasonably unique to that display that can be used as a grep search if you cant find the function name ingame.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[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.


16,774 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]