Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """MORE GENERIC VERSION - ATTRIBUTE CREATION DOESN'T WORK"""
- # Check if the skillset is not already learned and if not, create it.
- if not char.attributes.get(skillset):
- #Check for general skill points required to learn.
- if not gsp >= sp_cost:
- char.msg('You do not have enough general skill points to learn this skillset.')
- return
- if skillset:
- char.db.skillset = {'total_sp': sp_cost, 'total_ranks': 0}
- """WORKING VERSION"""
- # Check if the skillset is not already learned and if not, create it.
- if not char.attributes.get(skillset):
- #Check for general skill points required to learn.
- if not gsp >= sp_cost:
- char.msg('You do not have enough general skill points to learn this skillset.')
- return
- if skillset == 'staves':
- char.db.staves = {'total_sp': sp_cost, 'total_ranks': 0}
Add Comment
Please, Sign In to add comment