Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config = {
- [0] = { msg="+Fist", efex=38},
- [1] = { msg="+Mace", efex=26},
- [2] = { msg="+Swrd", efex=24},
- [3] = { msg="+Axe", efex=25},
- [4] = { msg="+Dist", efex=2},
- [5] = { msg="+Def", efex=11},
- [6] = { msg="+Fish", efex=12},
- [7] = { msg="+ML", efex=35},
- [8] = { msg="+LvL", efex=37} }
- --getAccountIdByName(name)
- local p = getPlayerPosition(cid)
- local name = getCreatureName(cid)
- local positions = {
- [1] = { pos= {x=p.x+1,y=p.y,z=p.z}, delay = 100, delay2 = 900},
- [2] = { pos= {x=p.x+1,y=p.y+1,z=p.z}, delay = 200, delay2 = 980},
- [3] = { pos= {x=p.x,y=p.y+1,z=p.z}, delay = 300, delay2 = 1060},
- [4] = { pos= {x=p.x-1,y=p.y+1,z=p.z}, delay = 400, delay2 = 1140},
- [5] = { pos= {x=p.x-1,y=p.y,z=p.z}, delay = 500, delay2 = 1220},
- [6] = { pos= {x=p.x-1,y=p.y-1,z=p.z}, delay = 600, delay2 = 1300},
- [7] = { pos= {x=p.x,y=p.y-1,z=p.z}, delay = 700, delay2 = 1380},
- [8] = { pos= {x=p.x+1,y=p.y-1,z=p.z}, delay = 800, delay2 = 1460} }
- function onAdvance(cid, skill, oldlevel, newlevel)
- if skill == SKILL_LEVEL and oldlevel < 20 and newlevel >= 20 then
- doPlayerAddItem(cid, 2160, 2, true)
- doSendMagicEffect(p, 12)
- doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. "! You have reached 20 and rewarded with 2 crystal coins. Enjoy hunting!", 19)
- elseif skill == SKILL_LEVEL and oldlevel < 50 and newlevel >= 50 then
- doPlayerAddItem(cid, 2160, 5, true)
- doSendMagicEffect(getCreaturePosition(cid), 12)
- doCreatureSay(cid, "Congratulations " .. getCreatureName(cid) .. "! You have reached level 50 and rewarded with 5 crystal coins. Enjoy hunting!", 19)
- elseif skill == SKILL__LEVEL and oldlevel < 300 and newlevel >= 300 then
- doBroadcastMessage(getCreatureName(cid) .." has reached level 300! Congratulations!", MESSAGE_EVENT_ADVANCE)
- for i = 1, 8 do addEvent(doSendDistanceShoot, positions[i].delay, positions[i].pos, p, 35) end
- doSendMagicEffect(p,12)
- addEvent(doSendMagicEffect, 900, p, 49)
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement