local mounts = {35,50,15,25}
local outfitsmale = {725, 633, 610}
local outfitsfemale = {746, 620, 759}
function onKill(player, target)
local monster = target:getName():lower()
local mount = mounts[math.random(#mounts)]
if target:isPlayer() or not monster or target:getMaster() then
return true
end
if monster == 'terrorsleep' then -- monsterName
if not player:hasMount(mount) then
player:addMount(mount)
end
local outfitmale = outfitsmale[math.random(#outfitsmale)]
local outfitfemale = outfitsfemale[math.random(#outfitsfemale)]
if(player:getSex(cid) == 1) then
if not player:hasOutfit(outfitmale) then
player:addOutfit(outfitmale)
player:addOutfitAddon(outfitmale)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, 'you already own this outfit')
end
elseif(player:getSex(cid) == 0) then
if not player:hasOutfit(outfitfemale) then
player:addOutfit(outfitfemale)
player:addOutfitAddon(outfitfemale)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, 'you already own this outfit')
end
end
else
player:sendTextMessage(MESSAGE_INFO_DESCR, 'You already own the mount you were going to be awarded with')
player:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end