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()
local monsterLoot = mType:getLoot()
for i = 1, #monsterLoot do
local item = corpse:createLootItem(monsterLoot[i])...
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()
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 autolootContainer = Game.createItem(1987, 1)
local items = corpse:getItems()
local item_weight = 0
local item_slots = 0
for _, item in ipairs(items) do
if (player:getAutoLootItem(item.itemid)) then
item_weight = item_weight + item:getWeight()
item_slots = item_slots + 1
end
end
local bp = player:getSlotItem(CONST_SLOT_BACKPACK)
if bp and bp:getEmptySlots(true) < item_slots then
player:sendCancelMessage("Autoloot: No space in backpack!")
elseif player:getFreeCapacity() < (item_weight) then
player:sendCancelMessage("Autoloot: Not enough cap!")
else
for _, item in ipairs(items) do
if (player:getAutoLootItem(item.itemid)) then
item:moveTo(autolootContainer)
end
end
end
local text = ("Loot of %s: %s"):format(mType:getNameDescription(), corpse:getContentDescription())
if (autolootContainer:getSize() > 0) then
text = text .. ' and ' .. autolootContainer:getContentDescription() .. ' that was auto looted'
local autolootItems = autolootContainer:getItems()
for _, item in ipairs(autolootItems) do
item:moveTo(player)
end
end
autolootContainer:remove()
text = text .. '.'
local party = player:getParty()
if party then
party:broadcastPartyLoot(text)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, text)
end
end
end
ec:register()
Hola, es la stamina System, no debe de estar configurada en Cada Tile del mapa en las zonas PZ y Training.Hola Alex
para no crear otro post sabes por que en mi servidor cuando estan en zona de pz y zona de training no sube la stamina?
Tengo ese problema
El 90000, son milisegundos lo que corresponde a 1min30, en este caso augmentas el valor, así de fácil.ese lo intente utilizar pero a cada momento sube la stamina hay manera de configurarla? para que suba cada ciertos minutos le quise cambiar pero no funcionaba lo hace cada minuto
Hola ,Buenas alex , el script de autoloot tambien funciona con la version 13.16?
Ok gracias lo voy a probar.Hola ,
Mm debería de funcionar la mayoría de funciones están en esa versión , ahora canary si ha cambiado alguna no lo sé habría que ver que possibles errores aparecen y adaptar el script.
Hellgrave Exodus
[10.98] TFS 1.4 - Otcv8 Servidor Custom [Systems, Wings, Aura, Jobs, Dungeons, Tiers, etc]Click Aqui para ver mas.
Endless Server 13.11 Real map