My problem with this is even though I do make and use the runic thorns, I don't use the bow for combat. For that I use my +12 T10 Fury of the Defender of the Jungle

I'd either have to swap equipment to use it or figure out how to equip the Catapult then re-equip my Fury. Out of curiosity, does this make one stack and equip it then make a 2nd stack to be in your bags so you don't run out in the middle of a boss fight? I'll play around with the code to see if I can figure out how to swap the bows, make arrows then swap back. I'll post something if I figure it out. If you don't see any response saying I succeeded by the time you read this, I've either knocked myself unconscious out of frustration or blown up my computer
UPDATE
Ok, I messed with the code and have it working the way I want. It equips the rune bow, makes the arrows then switches back to my Fury although I needed to change your item:use to inventory:useitem for it to work properly.
Code: Select all
<onLoad>
if 999 > inventory:itemTotalCount("Runic Thorn") then
inventory:useItem(212183) -- Use Rune War Bow
yrest(1000)
RoMScript("UseEquipmentItem(10);")
yrest(1000)
inventory:useItem(212615) -- Use Fury of the Defender of the Jungle
yrest(1000)
inventory:useItem(212185)
end
</onLoad>
<onLeaveCombat>
if 999 > inventory:itemTotalCount("Runic Thorn") then
inventory:useItem(212183) -- Use Rune War Bow
yrest(1000)
RoMScript("UseEquipmentItem(10);")
yrest(1000)
inventory:useItem(212615) -- Use Fury of the Defender of the Jungle
yrest(1000)
end
</onLeaveCombat>
I tried making these into functions but kept getting errors. Since I have no clue what I'm doing with that I wasn't too surprised. I tried several changes but I couldn't get it to work. Kept getting "end expected near", added some ends to where it thought it was needed, when the errors stopped the functions just didn't do anything at all.
Thank you very much for this code. Now I don't have to make 6+ stacks of arrows for overnight/at work farming.