• 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 Need help in WAR ot scripts.

Sorbal

Member
Joined
Jul 23, 2010
Messages
406
Reaction score
11
Location
Poland
Hello, i need some scripts for my war ot. I need this scripts:
1. If player kills characters with this same IP or multi client, he won't get frag reward and exp.
2. If player "I" kill player "II" 10 times in 5 minutes he won't get frag reward + exp.
3. When player with lvl "X" kill the player with lvl 0 - 30% higher he will get bronze goblet, player with lvl 31 - 60% higher - silver goblet, player with lvl 61 - 80% higher - golden goblet.
4. If player kill higher lvl he will get X exp.
I will rep+ if i can, all, who help me. Thanks:$
 
Maybe?
PHP:
function isBetweenRange(value, from, to)
    return from <= value and value <= to
end
 
function onDeath(cid, corpse, deathList)
    if not isPlayer(cid) or not isPlayer(deathList[1]) then
        return true
    end
 
    local killerName = getCreatureName(deathList[1])
    local name = getCreatureName(cid)
    local lvl = getPlayerLevel(cid)
    local loot = isBetweenRange(lvl, 1, 99) and 5807 or isBetweenRange(lvl, 100, 199) and 5806 or lvl > 199 and 5805 or 5807        
    local item = doPlayerAddItem(deathList[1], loot, 1)
    doItemSetAttribute(item, "description", 'This reward is to '.. killerName ..' And give you at '.. getPlayerLevel(deathList[1]) ..' For Killing '.. name ..' at level '.. lvl ..'.')
    return true
end
 
Back
Top