Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onKill(cid, target, lastHit)
- local _EXP_AREA = {
- {from = {x = x, y = y, z = z}, to = {x = x, y = y, z = z}, extra = 50},
- {from = {x = x, y = y, z = z}, to = {x = x, y = y, z = z}, extra = 25},
- }
- for _, V in pairs(_EXP_AREA) do
- if isPlayer(cid) and isMonster(target) then
- if isInArea(getThingPos(cid), V.from, V.to) then
- local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
- local percent = V.extra * exp
- local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience * percent / 100)))
- doPlayerAddExperience(cid, count)
- addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+' .. count, math.random(50, 60))
- break
- end
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment