Register forum user name Search FAQ

Gammon Forum

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 ➜ Request for help with making a command. SmaugFUSS1.9

Request for help with making a command. SmaugFUSS1.9

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


Posted by SirRoughknight   (19 posts)  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.
Top

Posted by David Haley   USA  (3,881 posts)  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
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.


12,099 views.

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

Go to topic:           Search the forum


[Go to top] top

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