• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Formula Exp script

lostenhoz

New Member
Joined
Aug 31, 2020
Messages
29
Reaction score
0
Hello, this script give exp for kill player, but it is giving a lot of exp
is possible change exp gain to "X" * Player level target?

Lua:
function onKill(cid, target, lastHit)

  if(isPlayer(cid) and isPlayer(target)) then
    if getPlayerIp(cid) ~= getPlayerIp(target) then
      doPlayerAddExperience(cid, (getPlayerExperience(target))) --  formula here
      else
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You will not receive anything for killing players of the same IP.")
    end
  end

return true
end
 
Lua:
local expGainMultiplier = 1000

function onKill(cid, target, lastHit)

  if(isPlayer(cid) and isPlayer(target)) then
    if getPlayerIp(cid) ~= getPlayerIp(target) then
      doPlayerAddExperience(cid, (getPlayerExperience(target) / 1000) * expGainMultiplier) --  formula here
      else
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You will not receive anything for killing players of the same IP.")
    end
  end

return true
end

change only expGainMultiplier
 
Back
Top