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
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?
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?