• 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 Kill boss reward mount

adrenyslopez

Member
Joined
Dec 22, 2015
Messages
201
Reaction score
15
Hello, good night, can someone help me to change this scripts that do not give you an addon but a mount?

Mount ID : 175



Lua:
local outfits = {
    [PLAYERSEX_MALE]   = 1270,
    [PLAYERSEX_FEMALE] = 1271
}

local cEvent = CreatureEvent("killPaleWormOutfit")

function cEvent.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
    for cid, _ in pairs(creature:getDamageMap()) do
        local creature = Player(cid)
        if creature and creature:isPlayer() then
            local outfit = outfits[creature:getSex()]
            if not creature:hasOutfit(outfit) then
                creature:addOutfit(outfit)
                creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received Poltergeist outfit.")
            end
        end
    end
    return true
end

cEvent:register()
 
Back
Top