ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: The Ghost on June 27, 2013, 08:25:32 PM
-
I have run into little problem because I uses the wrong variable sometime. I'm trying to understand why. I have read the tutorial and start cleaning and rebuild my old script.
1) finditem %itemA C_ , #BACKPACKID ( this work every time)
2) finditem %itemA C_ , %BACKPACKID ( this one to so good)
This work great for casting spell
checkHP:
if #hits < 120
{
wait 20
event macro 15 28 ; greather heal
target 3s
event macro 23 0
goto checkPH
}
this doesn't work
sub recallhome
set %runebookID %book ; book to recall home
finditem %runebookID C_ , %backpackid
set #ltargetID %runebookID
set #ltargetkind 1
wait 2s
event macro 15 31 ; Recall Spell
target 1s
event macro 22 0 ; Last target
wait 5s
Return
But if I do this, it work perfectly to recall of a book.
sub recallhome
set %runebookID %book ; book to recall home
finditem %runebookID C_ , %backpackid
set #ltargetID %runebookID
set #ltargetkind 1
wait 2s
event macro 15 31 ; Recall Spell
wait 1s
target
event macro 22 0 ; Last target
wait 5s
Return
So what the difference between those target wait.
and is this proper coding
sub unloadmainpack
repeat
finditem %leather C_ , #backpackid
IF #findkind <> -1
{
exevent drag #findid #findstack
exevent dropc %secure
wait %lwait ; 1s wait
}
until #findkind = -1
Return
Thx
-
#BACKPACKID is a system variable setup from EasyUO, but %BACKPACKID is a user variable that YOU must initialize. Why are you using #BACKPACKID?
-
sub recallhome
set %runebookID %book ; book to recall home
finditem %runebookID C_ , %backpackid ;<<<<<
set #ltargetID %runebookID ;<<<<<<
set #ltargetkind 1
wait 2s
event macro 15 31 ; Recall Spell
target 1s
event macro 22 0 ; Last target
wait 5s
Return
You are using finditem but not using the info it creates.
sub recallhome
set %runebookID %book ; book to recall home
finditem %runebookID C_ , #backpackid
set #ltargetID #findid
set #ltargetkind 1
wait 2s
event macro 15 31 ; Recall Spell
target 1s
event macro 22 0 ; Last target
wait 5s
Return
Try that instead.
-
target {timeout}
Description
The target command waits for a target cursor to appear. If no timeout is given, the default timeout is 2 seconds.
-
#BACKPACKID is a system variable setup from EasyUO, but %BACKPACKID is a user variable that YOU must initialize. Why are you using #BACKPACKID?
Every time I have to search my backpack I use it.
i.e. finditem HTD_UDF C_ , #backpackid ; Look for SOS