I have added a little description here:
Code:
quest killdrop begin
state start begin
function perc_chance(i)
return math.random() <= (i/100)
end
when kill with not npc.is_pc() begin
--[[
remove the '--' below if you want to drop the items by 1 specific mob
replace 'mobvnum' with the vnum
]]
-- if npc.get_race() == mobvnum then
local items = {--itemvnum, count, chance
{19, 1, 100},
{29, 1, 50},
{39, 1, 1},
{27001, 50, 1}
}
for k,v in pairs(items) do
if killdrop.perc_chance(v[3]) then
game.drop_item_with_ownership(v[1], v[2])
chat("hum..well done!")
end
end
--[[
replace the '--' below if you did it above
]]
--end
end
end
end