Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local amuletos = {
- [8] = 2170,
- [9] = 2171,
- [10] = 2172,
- [11] = 2173,
- [12] = 2174,
- [13] = 2175,
- }
- function onLogin(cid)
- if getPlayerLastLoginSaved(cid) < 1 then
- doPlayerAddItem(cid, amuletos[getPlayerLevel(cid)])
- end
- local amuleto = amuletos[getPlayerLevel(cid)]
- if amuleto and getPlayerItemCount(cid, amuleto) > 0 then
- registerCreatureEvent(cid, "AmuletoChange")
- end
- return true
- end
- function onAdvance(cid, skill, oldlevel, newlevel)
- if skill == 8 then
- local amuleto = amuletos[oldlevel]
- if getPlayerItemCount(cid, amuleto) > 0 and amuletos[newlevel] then
- doPlayerRemoveItem(cid, amuleto)
- doPlayerAddItem(cid, amuletos[newlevel], 1, false, CONST_SLOT_NECKLACE)
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment