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

TFS 1.X+ TFS 1.2 How can i change this and add items to creature and not players

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
993
Solutions
5
Reaction score
55
TFS 1.2
Basically this is onKill creaturescript and for some reason it adds the item to a player and not a monster corpse. How can i prevent it and add the item to a creature corpse?
Lua:
for _, boss in ipairs(bosses) do
        if playerLevel >= boss.minLevel and playerLevel <= boss.maxLevel and isInArray(boss.monsters, monsterName) then
            local drop = boss.chances[math.random(1, #boss.chances)]
            if drop and math.random() <= drop.chance then
                local itemCount = drop.count or 1
                player:addItem(drop.itemId, itemCount)
                monsterPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN)
end
 
Back
Top