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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Request for help with making a command. SmaugFUSS1.9
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Request for help with making a command. SmaugFUSS1.9

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


Posted by SirRoughknight   (19 posts)  [Biography] bio
Date Thu 28 Jan 2010 12:20 AM (UTC)

Amended on Thu 28 Jan 2010 12:23 AM (UTC) by SirRoughknight

Message
I'm looking to add in a "temper" command, as in do_temper.

What I want it to do is check what class the character is, then check if they have/are wielding a weapon of a certain vnum (each class can "forge" a lowbie weapon designed for that class).

If they are, I want the player to be able to "temper" stats to the weapon if they are in a certain roomvnum (a forge).

I envision the command working like: "temper sword strength"
and if the above conditions are met, would check the players practices, if they have enough, it would take the amount set from the player and upgrade the statistic of the item by one. To... say a maximum of 3 per stat (str/dex/con/int/wis/cha/lck). And maybe a hr/dr too.

I'll try to come up with something code wise, right now its more of an idea I would like some guidance with. I don't think it is beyond my skill to code. I guess I was just hoping someone might be able to show me an example of something like it, or give me some pointers/reference of code to look at to get me started.

The "forge" command to invoke the class weapon is done, it was pretty easy. I looked at the code for supplication, and yeah.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Thu 28 Jan 2010 04:59 AM (UTC)
Message
Which part of the code is giving you trouble?

Checking that they're in a certain room, or have a certain vnum object, should be fairly straightforward. (Especially if the room is identified by a vnum and not a flag.)

To add the bonuses, you might have to use an effect structure of some sort. Might want to look at enchant weapon spells for that.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.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.


3,257 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 FutureQuest]