For builders to discuss and ask building questions.
-
Lathander
- Staff
- Posts: 3629
- Joined: Tue Jul 15, 2003 9:30 pm
- Location: The Eastern Sky
Post
by Lathander » Thu Oct 06, 2011 9:55 pm
Obviously, we don’t want to allow objects to grant players skills they would not otherwise have, especially those that are out-of-class. But I’d like to be able to have object grant a bonus to an existing skill. Will something like this work? If so, what is the correct syntax?
Code: Select all
>wear_prog 100~
if skillname($n) > 1
mposet $o APPLY_SKILLNAME 1 [color=#0000BF][I assume this doesn’t set skill level to 1, but increases it by 1][/color]
endif
~
>remove_prog 100~
mposet $o rmaffect 2 [color=#0000BF][For example purposes, this object already has +1 DAMROLL as an affect][/color]
~
|
Also, does the remove program kick in if the player dies and all equipment moves to inventory?
Lathander,
Commander of Creativity
-
Athon
- Sword Grand Master
- Posts: 615
- Joined: Sat Jun 05, 2004 6:16 am
- Location: Tantras
Post
by Athon » Fri Oct 07, 2011 1:09 am
From what I can gather, the APPLY flag will not work in a prog; it can only work under its proper section when you design an object:
ITEM_TYPE_ARMOR
FLAG_MAGIC
CAN_WEAR_TAKE|CAN_WEAR_HEAD
QUALITY_SUPERIOR MATERIAL_CLOTH COND_PERFECT SIZE_MEDIUM
0 0 LAYER_ARMOR ARMOR_TYPE_CLOTH 0 0
A APPLY_STEAL 1
A APPLY_PICK 1
Perhaps a new flag of "B APPLY_PICK" could be applied to only those with knowledge of the skill?
~Vanguardier Athon, High Priest of Torm~
~Moranall, Fighter of Waterdeep~
-
Harroghty
- Staff
- Posts: 9695
- Joined: Tue Jul 27, 2004 5:38 pm
Post
by Harroghty » Fri Oct 07, 2011 1:10 am
See this lesson:
http://www.forgottenkingdoms.org/builders/olesson6.php
It does not work by program, but instead by virtue of using the item itself.
The correct code would look a lot like the armor apply I demonstrated in your other thread:
A
APPLY_MOUNT 5
(This would add 5 to the mount skill while the item was used.)
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
-
Lathander
- Staff
- Posts: 3629
- Joined: Tue Jul 15, 2003 9:30 pm
- Location: The Eastern Sky
Post
by Lathander » Fri Oct 07, 2011 7:20 pm
I wanted to add APPLY_SLICE 1 to add 1 level of slice skill while using an object. I pointed out to Marty that APPLY_SLICE didn't exist and asked if he could add it. That's when he told me we shouldn't use APPLY_SKILLNAME because it allowed players to use that skill via item even if they did not currently have the skill. Hence, my trying to get it to oset the APPLY on the item in a program and delete it when the item was removed.
It seems like you're saying I can use APPLY_SNEAK or APPLY_HIDE or any other existing APPLY in the way I originally intended. Sooo, now I'm confused. Does code currently support that use or does it grant the wearer access to skills he wouldn't otherwise have?
Lathander,
Commander of Creativity