Auto Loot Rev Script?

jackye

Miembro
LV
24
 
Awards
20
Hola Team me gustaria saber si hay algun sistema de autoloot para mi version 12.64 :)


Si alguien lo tubiera pudiera ayudarme con ello?


Gracias
 
Solución
Hola @marcuz,
En teoría existen los scripts autoloot, desde que el tibia 12x implemento el sistema de click para lootear, para los servidores inferiores que no tenían este sistema.
Incorporar un script de auto loot en el 12x, podría dar problemas.

Puedes probar con este script, ya me dices como te va:
Ponlo en data/scripts/eventcallback/monster/auto_loot.lua,

Código:
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])...

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
Hola @marcuz,
En teoría existen los scripts autoloot, desde que el tibia 12x implemento el sistema de click para lootear, para los servidores inferiores que no tenían este sistema.
Incorporar un script de auto loot en el 12x, podría dar problemas.

Puedes probar con este script, ya me dices como te va:
Ponlo en data/scripts/eventcallback/monster/auto_loot.lua,

Código:
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()
 

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
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 :(
Hola, es la stamina System, no debe de estar configurada en Cada Tile del mapa en las zonas PZ y Training.

Esta posteado el script y como hacerlo en el foro

 

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
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
El 90000, son milisegundos lo que corresponde a 1min30, en este caso augmentas el valor, así de fácil.
 

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
Buenas alex , el script de autoloot tambien funciona con la version 13.16?
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.
 
Arriba