Official ScriptUO EasyUO Scripts > Script Debug
Need a little help on this. I am a rookie!
Cush:
Hey that is the one I helped you test out! Glad to see aids are on there now. :-)
Cush:
OK I have not had a chance to get all your suggestions added lol ran out of bolts so building those now for more testing. This is where I am at so far. Had the just in case backpack drop in and there but took it out so I could trouble shoot some wait times. Will add that and the part for the floor items next.
--- Code: ---;==================================
; Script Name: Bolt's -> Bandages
; Purpose: transfers Bolts to normal Bandages
;==================================
display ok Target your resource container:
set #targcurs 1
repeat
wait 1
until #targcurs = 0
set %secure #ltargetid
;set %secure HEROXRD ; set here the id of your resource container
;Items Vars
set %scissors KAG
set %cloth CUI
Set %bolt ZZF
Set %Bandage ZLF
; Wait Timer feel free to adjust if you have timing related Error Msg.
Set %DelayEvent 20 ; Waittime for Event Macro Function
Set %DelayDrag 15 ; Waittime before Object Movement
Set %DelayDrop 10 ; Waittime after Object Movement
Set %Delay 5 ; Waittime
finditem %scissors C_ , #backpackid
if #findkind = -1
halt
set %scissors #findid
finditem %secure
while #findkind = -1
{
event macro 1 0 bank
wait %DelayEvent
finditem %secure
}
if #contid <> %secure
{
set #lobjectid %secure
event macro 17 0
while #contid <> %secure
{
wait %Delay
}
wait %DelayEvent
}
finditem %bolt C_ , %secure
while #findkind <> -1
{
set %dragamount #maxweight - #weight
set %dragamount %dragamount / 5
set %dragamount %dragamount - 1
if #findstack < %dragamount
set %dragamount #findstack
if %dragamount <> 0
{
exevent drag #findid %dragamount
wait %DelayDrag
exevent dropc #backpackid
wait %DelayDrop
}
finditem %bolt C_ , #backpackid
if #findkind <> -1
{
for #findindex 1 #findcnt
{
set #lobjectid %scissors
event macro 17 0
target 20
set #ltargetid #findid
set #ltargetkind 1
event macro 22 0
wait %DelayEvent
}
}
finditem %cloth C_ , #backpackid
if #findkind <> -1
{
for #findindex 1 #findcnt
{
set #lobjectid %scissors
event macro 17 0
target 20
set #ltargetid #findid
set #ltargetkind 1
event macro 22 0
wait %DelayEvent
}
}
gosub dragcleanbandage
finditem %cloth C_ , %secure
}
gosub dragcleanbandage
halt
sub dragcleanbandage
finditem %Bandage C_ , #backpackid
while #findkind <> -1
{
exevent drag #findid #findstack
wait %DelayDrag
exevent dropc %secure
wait %DelayDrop
finditem %Bandage C_ , #backpackid
}
return
--- End code ---
Cush:
Hi @Gaderain,
I was able to fool around with this a bit more.
Interesting development is now when the cloth is cut the bandages dropped to the ground. They are the same weight as each other so you would think they should replace each other. I added your part to pick the bandages off the ground and that is working fine. Seems like the script could go a little faster as well.
I am not clear on exactly where to add the open backpack line you mentioned above.
--- Code: ---;==================================
; Script Name: Bolts -> Bandages
; Purpose: transfers Bolts to normal Bandages
;==================================
display ok Target your resource container:
set #targcurs 1
repeat
wait 1
until #targcurs = 0
set %secure #ltargetid
;set %secure HEROXRD ; set here the id of your resource container
;Items Vars
set %scissors KAG
set %cloth CUI
Set %bolt ZZF
Set %Bandage ZLF
; Wait Timer feel free to adjust if you have timing related Error Msg.
Set %DelayEvent 20 ; Waittime for Event Macro Function
Set %DelayDrag 15 ; Waittime before Object Movement
Set %DelayDrop 10 ; Waittime after Object Movement
Set %Delay 5 ; Waittime
finditem %scissors C_ , #backpackid
if #findkind = -1
halt
set %scissors #findid
finditem %secure
while #findkind = -1
{
event macro 1 0 bank
wait %DelayEvent
finditem %secure
}
if #contid <> %secure
{
set #lobjectid %secure
event macro 17 0
while #contid <> %secure
{
wait %Delay
}
wait %DelayEvent
}
finditem %bolt C_ , %secure
while #findkind <> -1
{
set %dragamount #maxweight - #weight
set %dragamount %dragamount / 5
set %dragamount %dragamount - 1
if #findstack < %dragamount
set %dragamount #findstack
if %dragamount <> 0
{
exevent drag #findid %dragamount
wait %DelayDrag
exevent dropc #backpackid
wait %DelayDrop
}
finditem %bolt C_ , #backpackid
if #findkind <> -1
{
for #findindex 1 #findcnt
{
set #lobjectid %scissors
event macro 17 0
target 20
set #ltargetid #findid
set #ltargetkind 1
event macro 22 0
wait %DelayEvent
}
}
finditem %cloth C_ , #backpackid
if #findkind <> -1
{
for #findindex 1 #findcnt
{
set #lobjectid %scissors
event macro 17 0
target 20
set #ltargetid #findid
set #ltargetkind 1
event macro 22 0
wait %DelayEvent
}
}
finditem %bandage G_2
if #findcnt > 0
{
for #findindex 1 #findcnt
{
exevent drag #findid #findstack
wait %DelayEvent
exevent dropc %secure
wait %DelayEvent
}
}
gosub dragcleanbandage
finditem %Bolt C_ , %secure
}
return
sub dragcleanbandage
finditem %Bandage C_ , #backpackid
while #findkind <> -1
{
exevent drag #findid #findstack
wait %DelayDrag
exevent dropc %secure
wait %DelayDrop
finditem %Bandage C_ , #backpackid
}
return
--- End code ---
Gaderian:
Hi Cush,
I attached a script that would pretty much do what you wanted... other than the weight calculation for how much stuff to pull. No one has downloaded it - so you didn't even look at it.
I addressed the issue where bandages drop to the ground.
Gaderian
Cush:
Hey Gaderian,
Thanks! I totally missed the attachment I was focused on understanding the snippet you posted :-) Thank you I will check it out!
Cush
Navigation
[0] Message Index
[*] Previous page
Go to full version