- Joined
- Dec 26, 2013
- Messages
- 1,635
- Solutions
- 11
- Reaction score
- 878
First off lets give credit where credit is due!
I found the code to start this with from http://otland.net/threads/points-system.200268/
and so credits go to @Ninja @MadMOOK and unnamed being from blacktibia....
What this system is used for is more perks from leveling, and thus more customization. Everytime a player levels they gain X amount of skill points (configurable of course), and they can use these skill points to purchase either, HP MP or SKILLS.
UPDATE: This is now a modalwindow system. Hasn't been fully tested, would love some feedback. It is updated to 1.1. This system differs from Zbizu's system in the fact that it was intended to be configured for different vocations, more modalwindows, and more options for gaining 1, or 2 or 5 of a skill at a time. His system is still all around better in terms of coding. I recommend his system, however if you prefer this one it is here. My true recommendation is to learn from both and see what you can make for yourself Enjoy!
Now for the code
/creaturescripts/scripts/skillpoints.lua
http://pastebin.com/h6Bf8HVQ
/creaturescripts/scripts/login.lua
/creaturescripts/creaturescripts.xml
/talkactions/scripts/skillpoints.lua
AND FINALLY /talkactions/talkactions.xml
I found the code to start this with from http://otland.net/threads/points-system.200268/
and so credits go to @Ninja @MadMOOK and unnamed being from blacktibia....
What this system is used for is more perks from leveling, and thus more customization. Everytime a player levels they gain X amount of skill points (configurable of course), and they can use these skill points to purchase either, HP MP or SKILLS.
UPDATE: This is now a modalwindow system. Hasn't been fully tested, would love some feedback. It is updated to 1.1. This system differs from Zbizu's system in the fact that it was intended to be configured for different vocations, more modalwindows, and more options for gaining 1, or 2 or 5 of a skill at a time. His system is still all around better in terms of coding. I recommend his system, however if you prefer this one it is here. My true recommendation is to learn from both and see what you can make for yourself Enjoy!
Now for the code
/creaturescripts/scripts/skillpoints.lua
http://pastebin.com/h6Bf8HVQ
/creaturescripts/scripts/login.lua
Code:
player:registerEvent("SkillPointSystem")
Code:
<event type="modalwindow" name="PointWindow" script="skillpoints.lua"/>
<event type="advance" name="SkillPointSystem" script="skillpoints.lua"/>
/talkactions/scripts/skillpoints.lua
Code:
function onSay(player, words, param)
local SKILL_POINTS = 45200
local Point = ModalWindow(1, "Skill Points", "You have skill " ..player:getStorageValue(SKILL_POINTS).. " points make your choice:\n\n Skill Required Points Increase Amount")
Point:addChoice(1, "1. Health 1 2")
Point:addChoice(2, "2. Mana")
Point:addChoice(3, "3. Magic Level")
Point:addChoice(4, "4. Sword")
Point:addChoice(5, "5. Axe")
Point:addChoice(6, "6. Club")
Point:addChoice(7, "7. Shielding")
Point:addChoice(8, "8. Distance")
Point:addButton(1, 'Gain 1')
Point:addButton(2, 'Gain 2')
Point:addButton(3, 'Gain 5')
Point:addButton(4, 'Cancel')
player:registerEvent("PointWindow")
Point:sendToPlayer(player)
return false
end
AND FINALLY /talkactions/talkactions.xml
Code:
<talkaction words="!points" separator=" " script="skillpoints.lua"/>
Last edited: