3alola1
I don't have time
Hello guys I'm having somehow a problem with the droprate in my server.
In tfs 1.5 the randomloot drop is not show most of the items that the monster can drop somehow it shows only 3 or 4 maximum of the items that it can drop.
In the hellgrave datapack you can see for example the droprate is 2x and it is working fine as i want
same as the old tfs 0.4 drops items count.
While in my tfs 1.5 the same drop rate is kinda rare to find a loot inside the corpse
.Also keep in mind I'm using the same:
orshabaal.xml in both server
same global function function getLootRandom()
Same eventcallback for drops
In tfs 1.5 the randomloot drop is not show most of the items that the monster can drop somehow it shows only 3 or 4 maximum of the items that it can drop.
In the hellgrave datapack you can see for example the droprate is 2x and it is working fine as i want
same as the old tfs 0.4 drops items count.While in my tfs 1.5 the same drop rate is kinda rare to find a loot inside the corpse
.Also keep in mind I'm using the same:orshabaal.xml in both server
same global function function getLootRandom()
Same eventcallback for drops
LUA:
local ec = EventCallback
ec.onDropLoot = function(self, 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()
if player and player:isPremium() then
for i = 1, #monsterLoot do
local default = monsterLoot[i].chance
if default < 100000 then
monsterLoot[i].chance = default * 1.1
end
end
end
for i = 1, #monsterLoot do
local item = corpse:createLootItem(monsterLoot[i], self:getName())
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) --9 is the channel ID, yours might be different
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
ec:register()
