Xedoxo
Member
- Joined
- Oct 24, 2010
- Messages
- 113
- Reaction score
- 13
Hi, example:
dragon.xml:
Drop:
Loot x1. How to fix it?
Also here monster.lua
Sometimes i have errors in console:
dragon.xml:
XML:
</attacks>
<defenses armor="30" defense="30">
<defense name="healing" interval="2000" chance="15" min="40" max="70">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
<immunity fire="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="GROOAAARRR" yell="1"/>
<voice sentence="FCHHHHH" yell="1"/>
</voices>
<loot>
<item id="2148" countmax="70" chance="147500"/><!-- gold coin -->
<item id="2148" countmax="45" chance="137500"/><!-- gold coin -->
<item id="2672" countmax="3" chance="65500"/><!-- dragon ham -->
<item id="2509" chance="15000"/><!-- steel shield -->
<item id="2455" chance="10000"/><!-- crossbow -->
<item id="2397" chance="4000"/><!-- longsword -->
<item id="2457" chance="3000"/><!-- steel helmet -->
<item id="2647" chance="2000"/><!-- plate legs -->
<item id="2413" chance="1950"/><!-- broadsword -->
<item id="2387" chance="960"/><!-- double axe -->
<item id="2187" chance="1005"/><!-- wand of inferno -->
<item id="5920" chance="1000"/><!-- green dragon scale -->
<item id="2434" chance="560"/><!-- dragon hammer -->
<item id="5877" chance="1005"/><!-- green dragon leather -->
<item id="2145" chance="380"/><!-- small diamond -->
<item id="2516" chance="320"/><!-- dragon shield -->
<item id="2409" chance="420"/><!-- serpent sword -->
<item id="7430" chance="110"/><!-- dragonbone staff -->
<item id="2177" chance="120"/><!-- life crystal -->
<item id="2546" countmax="10" chance="8060"/><!-- burst arrow -->
</loot>
</monster>
Drop:
Code:
13:13 Loot of a dragon: 2 gold coins
13:13 Loot of a dragon: a crossbow, a steel shield, dragon ham, 2 gold coins
13:13 Loot of a dragon: dragon ham, 2 gold coins
13:13 Loot of a dragon: a burst arrow, a green dragon leather, a dragon hammer, a green dragon scale, a wand of inferno, a double axe, a broadsword, plate legs, a steel helmet, a longsword, a crossbow, a steel shield, dragon ham, 2 gold coins
13:13 Loot of a dragon: a steel shield, dragon ham, 2 gold coins
13:13 Loot of a dragon: 2 gold coins
13:13 Loot of a dragon: 2 gold coins
13:13 Loot of a dragon: a crossbow, a steel shield, dragon ham, 2 gold coins
13:13 Loot of a dragon: dragon ham, 2 gold coins
13:13 Loot of a dragon: 2 gold coins
13:13 Loot of a dragon: a burst arrow, a crossbow, a steel shield, dragon ham, 2 gold coins
13:13 Loot of a dragon: a burst arrow, a crossbow, a steel shield, dragon ham, 2 gold coins
13:13 Loot of a dragon: dragon ham, 2 gold coins
13:13 Loot of a dragon: 2 gold coins
13:13 Loot of a dragon: dragon ham, 2 gold coins
Loot x1. How to fix it?
Post automatically merged:
Also here monster.lua
Code:
function Monster:onDropLoot(corpse)
if configManager.getNumber(configKeys.RATE_LOOT) == 0 then
return
end
local player = Player(corpse:getCorpseOwner())
local mType = self:getType()
if not player or player:getStamina() > 840 then
local monsterLoot = mType:getLoot()
for i = 1, #monsterLoot do
local item = corpse:createLootItem(monsterLoot[i])
if not item then
print('[Warning] DropLoot:', 'Could not add loot item to corpse.')
end
end
if player then
local text = ("Loot of %s: %s"):format(mType:getNameDescription(), corpse:getContentDescription())
local party = player:getParty()
if party then
party:broadcastPartyLoot(text)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, text)
player:sendChannelMessage("", text, TALKTYPE_CHANNEL_O, 9)
end
end
else
local text = ("Loot of %s: nothing (due to low stamina)"):format(mType:getNameDescription())
local party = player:getParty()
if party then
party:broadcastPartyLoot(text)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, text)
end
end
end
Sometimes i have errors in console:
Code:
DropLoot:', 'Could not add loot item to corpse.')
Last edited: