Page 1 of 1

Question: Using Simple Repair Hammer

Posted: Thu Oct 20, 2011 2:14 am
by ctrlaltdelete
Is there a way to use a Simple Repair hammer on your main hand weapon (or off hand / bow) when the durability reaches a certain value?

It is not always conveniate to head back to a repair guy when I'm far out.

Thanks

Re: Question: Using Simple Repair Hammer

Posted: Thu Oct 20, 2011 3:14 am
by rock5
When main hand durability is below 'a certain value'

Code: Select all

if 80 > inventory:getMainHandDurability() then
Use the Simple Repair hammer.

Code: Select all

inventory:useItem("Simple Repair Hammer")
On the main hand weapon (thats a left click so like picking up)

Code: Select all

RoMScript("PickupEquipmentItem(15);"); -- I think in the game, main hand is 15.
You probably want to make sure you have hammers first or you could end up disarming yourself.

So

Code: Select all

if 80 > inventory:getMainHandDurability() then
    if inventory:itemTotalCount("Simple Repair Hammer") > 0 then
        inventory:useItem("Simple Repair Hammer")
        yrest(1000)
        RoMScript("PickupEquipmentItem(15);"); -- I think in the game, main hand is 15
    else
        -- Maybe here you could head back for repairs seeing as you are out of hammers
    end
end
Then just put it somewhere to execute regularly like the OnLeaveCombat section.

This is untested so watch it the first time to make sure it works.

Re: Question: Using Simple Repair Hammer

Posted: Thu Oct 20, 2011 3:34 am
by lisa
hmm question looks very familiar, search for "repair hammer" got this
or another thread is here