Skymagnum

Untitled

Apr 28th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onKill(cid, target, lastHit)
  2.  
  3. local _EXP_AREA = {
  4.     {from = {x = x, y = y, z = z}, to = {x = x, y = y, z = z}, extra = 50},
  5.     {from = {x = x, y = y, z = z}, to = {x = x, y = y, z = z}, extra = 25},
  6. }
  7.  
  8.     if isPlayer(cid) and isMonster(target) then
  9.        for _, V in pairs(_EXP_AREA) do
  10.           if isInArea(getThingPos(cid), V.from, V.to) then
  11.              local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
  12.              local percent = V.extra * exp
  13.              local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience * percent / 100)))
  14.           end
  15.        end
  16.  
  17.        doPlayerAddExperience(cid, count)
  18.        addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+' .. count, math.random(50, 60))
  19.     end
  20.  
  21.    return true
  22. end
Advertisement
Add Comment
Please, Sign In to add comment