• 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!

Attempt to call method 'getSkullStype'

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
error.png

Code:
function onKill(player, target, lastHit)
    if player:isPlayer() == true then
        if player:getStorageValue(factionStorage) == target:getStorageValue(factionStorage) then
            if target:getSkullType() >= 3 then
                player:setStorageValue(honorStorage, player:getStorageValue(honorStorage)-5)
                if player:getStorageValue(honorStorage) <= 499 then
                    player:doSetSkullType(4)
                end
            elseif target:getSkullType() == 0 then
                player:setStorageValue(honorStorage, player:getStorageValue(honorStorage)-10)
                if player:getStorageValue(honorStorage) <= 499 then
                    player:doSetSkullType(4)
                end
            else
                return true
            end
        else
            if target:getLevel() > player:getLevel() then
                player:setStorageValue(honorStorage, player:getStorageValue(honorStorage)+2)
                if player:getStorageValue(honorStorage) >= 500 then
                    player:doSetSkullType(0)
                end
            elseif target:getLevel() <= player:getLevel() then
                player:setStorageValue(honorStorage, player:getStorageValue(honorStorage)+1)
                if player:getStorageValue(honorStorage) >= 500 then
                    player:doSetSkullType(0)
                end
            end
        end
    end
    return true
end
 
Back
Top