Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = {
- -- [storage], level, points
- [15512] = {50000, 2},
- [15513] = {100000, 2},
- [15514] = {150000, 2},
- [15515] = {200000, 2},
- [15516] = {250000, 2},
- [15517] = {300000, 2},
- [15518] = {350000, 2},
- [15519] = {400000, 2},
- [15520] = {450000, 2},
- [15521] = {500000, 1},
- [15522] = {550000, 1},
- [15523] = {550000, 1},
- [15524] = {600000, 1},
- [15525] = {650000, 1},
- [15526] = {700000, 1},
- [15527] = {750000, 1},
- [15528] = {800000, 1},
- [15529] = {850000, 1},
- [15530] = {900000, 1},
- [15531] = {950000, 1},
- [15532] = {1000000, 1},
- [15533] = {1050000, 1},
- [15534] = {1100000, 1},
- [15535] = {1150000, 1},
- [15536] = {1200000, 1},
- [15537] = {1250000, 1},
- [15538] = {1300000, 1},
- [15539] = {1350000, 1},
- [15540] = {1400000, 1}
- }
- local points = 4595 -- storage for all talent points
- function onAdvance(cid, skill, oldLevel, newLevel)
- if skill == SKILL__LEVEL then
- for storage, v in pairs(t) do
- if newLevel >= v[1] and getPlayerStorageValue(cid, storage) < 1 then
- setPlayerStorageValue(cid, storage, 1)
- setPlayerStorageValue(cid, points, v[2] + getPlayerStorageValue(cid, points))
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "CONGRATULATIONS! You've reached level " .. v[1] .. " and GAINED " .. v[2] .. " talent points you can spend at talent npc.")
- break
- end
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement