Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function playerAddExp(cid, exp)
- if not isCreature(cid) then return true end
- if isInPartyAndSharedExperience(cid) then
- local partyPlayers = getPartyMembers(getPlayerParty(cid))
- local partyExp = math.ceil(exp / #partyPlayers)
- for i = 1, #partyPlayers do
- if isPlayer(partyPlayers[i]) then
- if getPlayerLevel(cid) <= 50 then
- doPlayerAddExp(partyPlayers[i], partyExp * 150)
- doSendAnimatedText(getThingPos(partyPlayers[i]), partyExp * 150, 215)
- elseif getPlayerLevel(partyPlayers[i]) >= 51 and getPlayerLevel(partyPlayers[i]) <= 100 then
- doPlayerAddExp(partyPlayers[i], partyExp * 120)
- doSendAnimatedText(getThingPos(partyPlayers[i]), partyExp * 100, 215)
- elseif getPlayerLevel(partyPlayers[i]) >= 101 and getPlayerLevel(partyPlayers[i]) <= 150 then
- doPlayerAddExp(partyPlayers[i], partyExp * 100)
- doSendAnimatedText(getThingPos(partyPlayers[i]), partyExp * 100, 215)
- elseif getPlayerLevel(partyPlayers[i]) >= 151 and getPlayerLevel(partyPlayers[i]) <= 200 then
- doPlayerAddExp(partyPlayers[i], partyExp * 80)
- doSendAnimatedText(getThingPos(partyPlayers[i]), partyExp * 80, 215)
- elseif getPlayerLevel(partyPlayers[i]) >= 201 and getPlayerLevel(partyPlayers[i]) <= 250 then
- doPlayerAddExp(partyPlayers[i], partyExp * 50)
- doSendAnimatedText(getThingPos(partyPlayers[i]), partyExp * 50, 215)
- elseif getPlayerLevel(partyPlayers[i]) >= 251 and getPlayerLevel(partyPlayers[i]) <= 300 then
- doPlayerAddExp(partyPlayers[i], partyExp * 30)
- doSendAnimatedText(getThingPos(partyPlayers[i]), partyExp * 30, 215)
- elseif getPlayerLevel(partyPlayers[i]) >= 351 then
- doPlayerAddExp(partyPlayers[i], partyExp * 10)
- doSendAnimatedText(getThingPos(partyPlayers[i]), partyExp * 10, 215)
- return true end
- doPlayerAddExp(partyPlayers[i], partyExp * 30)
- doSendAnimatedText(getThingPos(partyPlayers[i]), partyExp * 30, 215)
- end
- end
- return true
- end
- if getPlayerLevel(cid) <= 50 then
- doPlayerAddExp(cid, exp * 150)
- doSendAnimatedText(getThingPos(cid), exp * 150, 215)
- elseif getPlayerLevel(cid) >= 51 and getPlayerLevel(cid) <= 100 then
- doPlayerAddExp(cid, exp * 120)
- doSendAnimatedText(getThingPos(cid), exp * 100, 215)
- elseif getPlayerLevel(cid) >= 101 and getPlayerLevel(cid) <= 150 then
- doPlayerAddExp(cid, exp * 100)
- doSendAnimatedText(getThingPos(cid), exp * 100, 215)
- elseif getPlayerLevel(cid) >= 151 and getPlayerLevel(cid) <= 200 then
- doPlayerAddExp(cid, exp * 80)
- doSendAnimatedText(getThingPos(cid), exp * 80, 215)
- elseif getPlayerLevel(cid) >= 201 and getPlayerLevel(cid) <= 250 then
- doPlayerAddExp(cid, exp * 50)
- doSendAnimatedText(getThingPos(cid), exp * 50, 215)
- elseif getPlayerLevel(cid) >= 251 and getPlayerLevel(cid) <= 300 then
- doPlayerAddExp(cid, exp * 30)
- doSendAnimatedText(getThingPos(cid), exp * 30, 215)
- elseif getPlayerLevel(cid) >= 351 then
- doPlayerAddExp(cid, exp * 10)
- doSendAnimatedText(getThingPos(cid), exp * 10, 215)
- return true end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement