ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: The Ghost on October 01, 2014, 08:53:01 AM
-
I know that this work if I hard code the book ID
set %book XXXXXXXXX ; runobook to recall home
while #true
{
onHotKey f alt
gosub recallhome
}
sub recallhome
; set #LPC 1000
set %runebookID %book ; book to recall home
finditem %runebookID C_ , %backpackid
set #ltargetID %runebookID
set #ltargetkind 1
wait 40
event macro 15 31 ; 31 Recall Spell 210 Sj
wait 1s
target
event macro 22 0 ; Last target
wait 20
; set #LPC 10
Return
I'm trying to detect the book so I don't required to change book ID so all my toon can use the same build.
Since it not working, I guest I'm not using the property correctely.
finditem ZBN C_ , #backpackid
if #findcnt > 0
wait 10
if home in #property
set %homebook #findid
while #true
{
onHotKey f alt
gosub recallhome
}
sub recallhome
set %book %homebook
; set #LPC 1000
set %runebookID %book ; book to recall home
finditem %runebookID C_ , %backpackid
set #ltargetID %runebookID
set #ltargetkind 1
wait 40
event macro 15 31 ; 31 Recall Spell 210 Sj
wait 1s
target
event macro 22 0 ; Last target
wait 20
; set #LPC 10
Return
-
Finditem ZBN C_ , #backpackid
if #Findcnt > 0
{
For #Findindex 1 #Findcnt
{
Event Property #Findid
if Home in #property
set %Book #Findid
}
}
-
Got it to work this way too. Thx MWinc
finditem ZBN C_ , #backpackid
for %BookSearch 1 #FindCnt
{
set #Findindex %BookSearch
event property #findid
if Home in #property
set %homebook #findid
}
-
Back for one ore.
I'm doing the trader quest and trying to make my life easier to read chest. that will be good for any other quest info. Right now I can target the chest on my own and read info from the side bar. Using the display give me a box that pause me. Will like to remove that box at one point. Right now I'm trying to get the script to find and target the chest in my pack on his own. I fail that part. Any info on how to fix it will be nice.
sub ReadCreate
; event SysMessage Target your Crate
set #targcurs 1
while #targcurs = 1
wait
set %crate #ltargetid
event property %crate ; read info hat was targeted
; EVENT EXMSG #FINDID 3 33 #property
; display #property
; event sysmessage #property
; wait 2s
return
Here what I have so far. Still in progress.
Set %npc VUQUI
Set %sim VFARH
set %chest UMF_VMF_ABG_WMF_TMF_KIF_HIF_IFF
while #true
{
onHotKey 2 ctrl
{
gosub Trader
gosub ReadCreate
}
onHotKey 3 ctrl
gosub sim
}
sub Trader
wait 1s
finditem %npc G
exevent Popup #findid
wait 20
click 40 35
wait 1s
set %clickX #contposx + 25
set %clickY #contposy + 400
click %clickX %clickY
return
sub ReadCreate
; event SysMessage Target your Crate
set #targcurs 1
while #targcurs = 1
wait
set %crate #ltargetid
event property %crate ; read info hat was targeted
; EVENT EXMSG #FINDID 3 33 #property
; display #property
; event sysmessage #property
; wait 2s
return
sub sim
finditem %sim G
exevent Popup #findid
wait 20
click 40 35 ;
wait 1s
finditem %chest C_ , #backpackid
set #ltargetID #findid
set #ltargetkind 1 ; 1= Object 2= Ground 3= Resource (tree)
; set %chest #findid
wait 0
target 3s
event macro 22 0 ; Last targe
wait 20
return
-
Finditem * C_ , #backpackid
For #Findindex 1 #Findcnt
{
Event Property #Findid
if NO-TRADE in #Property
{
set %Box #Findid
set %Box_Property #Property
Break
}
}