ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Coragin on January 19, 2010, 04:20:59 PM
-
The point of this script is simple...
Find the decorative plants o nthe ground, unlock them and put them in a container.
It goes through it all but when it tries to move them I keep getting the message, you cannot pick that up. And the plant is not locked down. Can someone help me get this going? I have like 300 plants right now to move and they are all on top of each other mixed with ones that arent decorative yet.
;set %MySecureID YMBRKSD ; Setit
Display Ok Select the Resource Container.
set #targcurs 1
while #targcurs = 1
wait 1
set %MySecureID #ltargetID
set #lobjectID #ltargetID
set #nextcposx 200
set #nextcposy 0
event macro 17
wait 10
set %plantTypes OLI_BCF_VWE_BWE_UAF_JWE_IWE_EXE_UWE_ICF_BXE_YVE_CCF_NWE_MWE_DXE_TCF_NXE_BKP_ZJP_MKP_AKP_CKP_OKP_NKP_LKP_TXE_ZBF_AIF_GWE_VWE_WTE_ZBF_BWE_BCF_CCF_SVE_IWE_MWE_YVE_REK_QVE_BFK_WTE_FWE_NXE_CYE_JDF_
Repeat
Finditem %Planttypes G_2
If #findcnt > 0
{
For #findindex 1 #findcnt
{
event property #findid
wait 5 ; wiat for property to be set
if Decorative in #property
{
msg i wish to release this $
gosub waitfortargetcursor
set #ltargetid #findid
event macro 22 0
wait 30
exevent drag #findid
wait 30
exevent drop %Mysecureid
wait 20
}
ignoreitem #findid
}
}
until #FINDcnt = 0
halt
sub WaitForTargetCursor
set %timeout #scnt + 30
Repeat
wait %targetcursorwait
if #scnt > %timeout
return #false
Until #TARGCURS = 1
return #true
-
exevent dropc %Mysecureid
-
yep I got it and it was moving a bit too quick, its working now. thank mwinc.
-
event macro 22 0
wait 30
exevent drag #findid
wait 30
exevent drop %Mysecureid
wait 20
How could it of been moving too quick? lol thats like 4 Second delay for 2 actions.
-
hehe shhh, he's doing great for how long he's been scripting. :)
-
That pause was put in right before I posted it to debug and check the movement. Then I just compared the movement to crafting subs that move things and found out exevent dropc.
-
That pause was put in right before I posted it to debug and check the movement. Then I just compared the movement to crafting subs that move things and found out exevent dropc.
Opps my bad... i guess i forget the 'c' when i wrote it .. sorry cor... but in my defense i did post it was untested code.. and look at the learning experience you got :)
nice addition of bag selection and wait for target... check out the 'Target 3s' command.. has same function as that sub.
-
I be learnin! Soon I b learned enough to make bigger and better!