• 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 Interactive party OT (bonus exp)

danbsten

New Member
Joined
Aug 3, 2015
Messages
53
Reaction score
1
I wanted a way to benefit those who are hunting in a group, to make my server is up more interactive.

It would for each party member in the experiment were increased by 100% for all, reaching up to 500% (five or more people in the party)

Can anyone do it?

I use 0.4 rev3777
 
try this
Code:
    function onKill(cid, target, damage, flags)
        local xp = getMonsterInfo(getCreatureName(target)).experience
        if xp == nil or xp == 0 then
            return false
        end
        if getPlayerParty(cid) then
            local count = #getPartyMembers(cid) - 1
            doPlayerAddExperience(cid, xp * (count <= 5) and count or 5)
        end
        return true
    end

I try now, only if u are in a party:
[Imgur](https://i.imgur.com/e0VBGBr.png)
 
That is soo strange...

try that, lets see what values xp & count have
Code:
    function onKill(cid, target, damage, flags)
        local xp = getMonsterInfo(getCreatureName(target)).experience
        if xp == nil or xp == 0 then
            return false
        end
        if getPlayerParty(cid) then
            local count = #getPartyMembers(cid) - 1
            print(xp, count)
            doPlayerAddExperience(cid, xp * (count <= 5) and count or 5)
        end
        return true
    end
 
Back
Top