• 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 Global Loot tfs 1.3

noshirtstan

New Member
Joined
Aug 2, 2020
Messages
68
Reaction score
2
Hey folks,

I'm trying to build a script that will set a global loot function to all creatures in the game. I am also trying to set a custom loot setting for boss monsters.

As for the global loot this is what I have.

Registered in creaturescripts

Lua:
function onKill(cid, target, lastHit)
local item,chance = 26384,100
    if monster:isMonster(target) and chance > math.random(1, 100) then
        player:addItem(item, 1)
        end
        return true
    end

Im pretty sure that I'm missing something, I'm jsut not quite sure what.

As for the custom loot settings for the boss, I'm at a stand still. Basically, I want to set the item to print out with a custom action id and a custom ITEM_ATTRIBUTE_TEXT string, but I can't seem to wrap my head around how to do that.

Any thoughts?
 
Solution
E
look how this script was done and you might have some ideas:
look how this script was done and you might have some ideas:
 
Solution
Back
Top