Can anybody help me out?
Items that boost talents
Moderator: Moderator
-
Susramanian
- Spiderkin
- Posts: 454
- Joined: Sat May 15, 2010 3:09 am
Items that boost talents
I'd like to make an item that increases the user's level in some talent by X while worn. I can't find any models in the existing files, which is the only way I know how to 'code' 
Can anybody help me out?
Can anybody help me out?
-
Shoob
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
Re: Items that boost talents
try putting
into the wielder function of the object.
not sure if it works or not, just replace the T_FEATHER_WIND with the talent (still need the T_ in front though) and the 1 with however much you want to increase it by and the 5 will mostly be the same (training talents will be 10 though).
the only reason why you wouldnt make it a math.min would be for monsters who can have higher talent levels than the player.
Code: Select all
talents.T_FEATHER_WIND = math.min((talents.T_FEATHER_WIND or 0) + 1, 5)not sure if it works or not, just replace the T_FEATHER_WIND with the talent (still need the T_ in front though) and the 1 with however much you want to increase it by and the 5 will mostly be the same (training talents will be 10 though).
the only reason why you wouldnt make it a math.min would be for monsters who can have higher talent levels than the player.
Oliphant am I, and I never lie.
-
Susramanian
- Spiderkin
- Posts: 454
- Joined: Sat May 15, 2010 3:09 am
Re: Items that boost talents
Thanks a lot, Shoob!