Request for help with making a command. SmaugFUSS1.9

Posted by SirRoughknight on Thu 28 Jan 2010 12:20 AM — 2 posts, 15,458 views.

#0
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.
Amended on Thu 28 Jan 2010 12:23 AM by SirRoughknight
USA #1
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.