<loot>
<item id="2148" countmax="40" chance="100000"/><!-- gold coin -->
<item id="5883" chance="1000"/><!-- ape fur -->
<item id="1987" chance="100000"><!-- bag -->
<inside>
<item id="2676" countmax="11" chance="5000"/><!-- banana -->
<item id="2200" chance="2000"/><!-- protection amulet -->
<item id="2209" chance="3857"/><!-- club ring -->
<item id="2166" chance="1529"/><!-- power ring -->
<item id="2463" chance="1667"/><!-- plate armor -->
<item id="7618" chance="1467"/><!-- health potion -->
</inside>
</item>
</loot>
Code:<loot> <item id="2148" countmax="40" chance="100000"/><!-- gold coin --> <item id="5883" chance="1000"/><!-- ape fur --> <item id="1987" chance="100000"><!-- bag --> <inside> <item id="2676" countmax="11" chance="5000"/><!-- banana --> <item id="2200" chance="2000"/><!-- protection amulet --> <item id="2209" chance="3857"/><!-- club ring --> <item id="2166" chance="1529"/><!-- power ring --> <item id="2463" chance="1667"/><!-- plate armor --> <item id="7618" chance="1467"/><!-- health potion --> </inside> </item> </loot>
This is from Kongra, you can change to whatever you want.
Just add <loot> and that is it.
I think he is talking about a thing like the color of magic world change, during a certin time some monsters drop a letter.
Would be a big waste of time to add & remove that when the event starts / ends. Have no ide if there is any, but would like to know aswell.
Maybe @Mark could tell us / if its on the todo list.
I figured a way, just give the person an itemIsent that what I said?
Except the certin time of a year, like a addMonsterDrop(item) function?
local config = {
["dragon"] = {2160, 1},
["dragon lord"] = {2195, 1}
}
function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
local monster = Monster(cid)
local target = config[monster:getName():lower()]
if not target then
return true
end
Container(corpse):addItem(target[1], target[2])
return true
end
Code:local config = { ["dragon"] = {2160, 1}, ["dragon lord"] = {2195, 1} } function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) local monster = Monster(cid) local target = config[monster:getName():lower()] if not target then return true end Container(corpse):addItem(target[1], target[2]) return true end
Don't forget to register the event.
what about adding a chance (from 0 to 100) to each creature?![]()
local config = {
["dragon"] = {chance = 10, itemid = 2160, count = 1},
["dragon lord"] = {chance = 3, itemid = 2195, count = 1}
}
function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
local monster = Monster(cid)
local targetName = config[monster:getName():lower()]
if not targetName then
return true
end
local rand = math.random(100)
if rand <= targetName["chance"] then
Container(corpse):addItem(targetName["itemid"], targetName["count"])
end
end