436
Scripting Chat / Re: In Search of Script that cuts Bolts of cloth to bandages
« on: February 24, 2017, 01:31:38 AM »
Here is something that I used to cut lots of bolts into bandages. You may need to adjust some types if the bolts don't match. I used 109 bolts as my amount. I can't remember why right now, but it probably weighs in just under the 550 pack limit. As long as you are not moving, you can fill your back to it's max capacity regardless of your strength.
Basically, I had a secure filled with bolts, nothing in my pack but scissors. It will load from your selected secure as many bolts as the code is hardcoded to allow (109 bolts - you would need to adjust that manually in the script if you want a different amount) and cut these into folded cloth, then the cloth into bandages. The bandages will drop to the floor of the house (left over UO code from when bandages weighed more than the cloth). The script will search the floor next to you for any stacks of bandages to drag and drop back into the secure.
Hopefully you can use this or it is a good starting point if you need to make any adjustments.
Enjoy!
Gaderian
Basically, I had a secure filled with bolts, nothing in my pack but scissors. It will load from your selected secure as many bolts as the code is hardcoded to allow (109 bolts - you would need to adjust that manually in the script if you want a different amount) and cut these into folded cloth, then the cloth into bandages. The bandages will drop to the floor of the house (left over UO code from when bandages weighed more than the cloth). The script will search the floor next to you for any stacks of bandages to drag and drop back into the secure.
Code: [Select]
; cut bandages from secure
set %bolt_type CAG_ZZF
set %cloth_type CKF_CUI
set %bandage_type ZLF
finditem KAG C_ , #backpackid
if #findkind = -1
{
display ok You need scissors in your pack... halting
halt
}
set %scissors_id #findid
display ok Choose Secure
set #targcurs 1
target 5s
while #targcurs <> 0
wait 1
wait 5
set %secure #ltargetid
set #lobjectid %secure
event macro 17 0
wait 20
event macro 22 0
wait 20
set #contposx 0
set #contposy 0
finditem %bolt_type C_ , %secure
if #findkind = -1
{
display ok no bolts found to make bandages - halting
halt
}
while #findcnt > 0
{
if #findstack < 109 ; 46 stays in pack
set %bolt_qty #findstack
else
set %bolt_qty 109 ; 46 stays in pack
exevent drag #findid %bolt_qty
exevent dropc #backpackid
wait 30
finditem %bolt_type C_ , #backpackid
set #ltargetid #findid
set #lobjectid %scissors_id
event macro 17 0
wait 20
event macro 22 0
wait 40
finditem %cloth_type C_ , #backpackid
set #ltargetid #findid
set #lobjectid %scissors_id
event macro 17 0
wait 20
event macro 22 0
wait 40
finditem %bandage_type G_2
if #findcnt < 1
{
display ok bandages not found in back after cut... halting
halt
}
exevent drag #findid #findstack
exevent dropc %secure
wait 30
finditem %bolt_type C_ , %secure
}
Hopefully you can use this or it is a good starting point if you need to make any adjustments.
Enjoy!
Gaderian