Author Topic: Worn item that increases character's intelligence  (Read 221 times)

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9718
Worn item that increases character's intelligence
« on: August 18, 2016, 01:26:45 PM »
Here is an item to wear that will increase the character's intelligence score.

Diadem of Clear Thought: INT +1, +2 if magicUser; save vs spell -2, -4 if magicUser

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

Code: [Select]
\(BEGIN)
name = item_DiademClearThought
[OnReady] = $VAR tgt; $VAR cls; $VAR num; $VAR adj;
-tgt = $IndexOf($CharacterContext());
-cls = $GetBaseclassLevel(tgt, "magicUser")
-$IF (cls ># 0) {num = 2; adj = 4;}
-$ELSE {num = 1; adj = 2;};
-$MODIFY_CHAR_ATTRIBUTE(tgt,"INT",num, "MINUTES", 999999999, "diadem","ITEM Diadem Clear Thought");
-$SkillAdj($TargetContext(),"Save Vs SP","ITEM Diadem Clear Thought","-",adj);
[OnUnReady] = $VAR tgt;
-tgt = $IndexOf($CharacterContext());
-$REMOVE_CHAR_MODIFICATION(tgt,"ITEM Diadem Clear Thought");
-$SkillAdj($CharacterContext(),"PickPockets","ITEM Diadem Clear Thought","D",""));
\(END)

*********************************************************************************
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]
\(BEGIN)
name = Ciclet|INT
id name = Diadem of Clear Thought
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 = HEAD
bundle quantity = 1
Special Ability = item_DiademClearThought
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
\(END)

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.

 

anything