BUG na script do ot client (repor a soft boot)


Patata

Recommended Posts

Esta acontecendo esse bug na script de repor a soft, o que está fazendo o ot client cair.

Se alguém conseguir atualizar ele. 

Quando a soft não está disponivel, seja por ter acabado ou não esta cheia na bp o client está dando um ping violento e acaba caindo.

 

--[[ script de dropar potions

id das potions = {285 = Normal,284 = Great,283 = Strong  }

]]

 

cycleEvent( function() 

if g_game.isOnline() then

local id = '284'

local player = g_game.getLocalPlayer()

local mypos = player:getPosition()

local flask = player:getItem(id)

 

if flask == nil then

return

elseif flask:getCount() > 0 then

g_game.move(flask, mypos, flask:getCount())

end

end

end, 1000/2) 

Link to comment
Share on other sites

--[[ Script de Auto Soft Boots
id da soft boots = 6529
id da soft boots(sendo usada) = 3549
id da worn soft boots = 6530
slot da boots = InventorySlotFeet
]]
cycleEvent( function()
    if g_game.isOnline() then
        local player = g_game.getLocalPlayer()
        local slot = InventorySlotFeet
        local back = InventorySlotBack
        local bootsSlot = player:getInventoryItem(slot)
        local soft = player:getItem('6529')
        local botaPos = {['x'] = 65535, ['y'] = slot, ['z'] = 0}
        local backPos = {['x'] = 65535, ['y'] = back, ['z'] = 0}

            if bootsSlot == nil then
                g_game.move(soft, botaPos, soft:getCount())
            elseif bootsSlot:getId() == 6530 then
                g_game.move(bootsSlot, backPos, bootsSlot:getCount())
            elseif bootsSlot:getId() == 3549 then
                return
            end
            
    end
end, 5000) 

Link to comment
Share on other sites

O maximo que posso fazer com a script é isso. Não vi nada na script que faça o otc cair

cycleEvent( function()
    if g_game.isOnline() then
        local player = g_game.getLocalPlayer()
        local slot = InventorySlotFeet
        local back = InventorySlotBack
        local bootsSlot = player:getInventoryItem(slot)
        local soft = player:getItem(6529)
        local botaPos = {['x'] = 65535, ['y'] = slot, ['z'] = 0}
        local backPos = {['x'] = 65535, ['y'] = back, ['z'] = 0}

        if bootsSlot == nil then
            if soft then
                g_game.move(soft, botaPos, soft:getCount())
            end
        else
            if bootsSlot:getId() ~= 3549 and soft ~= nil then
            	g_game.move(soft, botaPos, soft:getCount())
            end
        end   
    end
end, 5000) 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...