View difference between Paste ID: xAYNuRHY and 0KxuWrSc
SHOW: | | - or go back to the newest paste.
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-
    for _, V in pairs(_EXP_AREA) do
7+
 
8-
        if isPlayer(cid) and isMonster(target) then
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-
             doPlayerAddExperience(cid, count)
13+
14-
             addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+' .. count, math.random(50, 60))
14+
15-
          break
15+
       end
16
17-
        end
17+
       doPlayerAddExperience(cid, count)
18
       addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+' .. count, math.random(50, 60))
19-
    return true
19+
20
21
   return true
22
end