Author Topic: Worn item that increases character's dexterity  (Read 283 times)

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9968
Worn item that increases character's dexterity
« on: August 18, 2016, 01:30:46 PM »
This item increases the wearer's dexterity. It also happens to be from the Dungeon Master's Guide, so goes right with DC and will be added to the databases in a future release.

Quote from: Dungeon Master's Guide
Gauntlets of Dexterity: A pair of these gloves appears to be nothing more
than light leother handwear of the everyday sort. Naturally, they radiate
magic if sa detected. They size themselves magically to fit any hand, from
that of a huge human to that of a small halfling, when drawn on. A pair of
gauntlets of dexterity increase overall dexterity by 4 points if at 6 or less,
by 2 points if ot 7-13, ond by 1 point if dexterity is 14 or higher. Furthermore,
wearing these gloves enables non-thief characters to pick pockets or
open locks as if he or she were a 4th level thief; if worn by a thief they
increase these abilities by adding 10% to the normal percentage chance
for the character‘s level.

The following code needs to be added to your specialAbilities.txt for the item to work correctly.

Code: [Select]
name = item_GAuntletsDexterity
[OnReady] = $VAR tgt; $VAR dex; $VAR num;
-tgt = $IndexOf($CharacterContext());
-dex = $GET_CHAR_LIMITED_DEX(tgt);
-$IF (dex >=# 1) {num = 4;};
-$IF (dex >=# 7) {num = 2;};
-$IF (dex >=# 14) {num = 1;};
-$MODIFY_CHAR_ATTRIBUTE(tgt,"DEX",num, "MINUTES", 999999999, "gauntlets","ITEM Gauntlets Dexterity");
-$IF ($SkillAdj($CharacterContext(),"PickPockets","","F","")) ># 0)
- {$SkillAdj($CharacterContext(),"PickPockets","ITEM Gauntlets Dexterity","%","110"));}
-$ELSE {$SkillAdj($CharacterContext(),"PickPockets","ITEM Gauntlets Dexterity","+","45"));};
[OnUnReady] = $VAR tgt;
-tgt = $IndexOf($CharacterContext());
-$REMOVE_CHAR_MODIFICATION(tgt,"ITEM Gauntlets Dexterity");
-$SkillAdj($CharacterContext(),"PickPockets","ITEM Gauntlets Dexterity","D",""));

This record needs to be added to your items.txt file. It requires the above SA to work correctly, but otherwise can fit into any design.

Code: [Select]
name = Gauntlets|DEX
id name = Gauntlets of Dexterity
launch sound = none
hit sound = none
miss sound = none
missile sprite = none
hit sprite = none
ROF per round = 1.000000
combat range = 1
cost = 3000
hands to carry = 0
baseclass = assassin
baseclass = cleric
baseclass = druid
baseclass = fighter
baseclass = magicUser
baseclass = paladin
baseclass = ranger
baseclass = thief
small/medium damage dice = 1D6 + 0
large damage dice = 1D6 + 0
AC base = 0
AC bonus = 0
attack bonus = 0
experience = 0
encumbrance = 10
cursed = no
non lethal = no
readied location = HANDS
bundle quantity = 1
Special Ability = item_GAuntletsDexterity
weapon type = not weapon
ammo type =
usable = no
not magical = no
scribtable = no
can drop = yes
CanHalveJoin = no
number of charges = 0
Examine Event ID = 0
Examine Label = EXAMINE
recharge rate = never
spell effect = none

Please feel free to use this as-is or as an exemplar for your own items. In the SA, the adjustment value is whatever you set the variable 'num' to equal.