ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: cybercasper on December 13, 2015, 06:48:49 AM
-
This is a work in progress. Maybe I can get a little help. It does what it needs to do but not sure where to put a "if mana = at and I cant figure out how to get it to use another instrument when the previous one is used up.
finditem PRF_LQF_MQF_QRF_OQF C_ , #BACKPACKID ; Searches for instruments in the backpack
if #FINDCNT > 0 { ; If there are objects found
set #LOBJECTID #FINDID ; Set the ID of a found object as #LOBJECTID - Uses item
; event macro 16 0 ; Casts last spell - Need to have cast the mastery first (The command for a particular mastery would be "event macro 15 X". Where X=some number the list of mastery spells is new and not yet in the wiki)
event macro 15 703 ; For Peacemaking "event macro 15 703" triggers Resilience - It looks like the masteries start at 701
; target 5s ; Waits for a target to appear and times out after 5 seconds
; event macro 23 0 ; One way to target self. Targets self not needed for every mastery.
wait 30 ; pauses for 1.5 seconds
event macro 15 703 ; cancels the mastery
wait 20 ; pauses for 1 second
}
else {
display ok You are out of instruments ; Displays a message when out of instruments}
-
Just and FYI this is my first script so I know it probably is horrible
-
To find the instrument it just a finditem
Finditem %flute C_ , #BACKPACKID
Set #lobjectid #findid
event macro 17
-
I cant figure out how to get it to use another instrument when the previous one is used up.
You just have to do a finditem on the ID of the instrument that you had previously. So once it can no longer find that ID you search for a new instrument in pack and set that ID to your instrument
finditem %currentinstrument C_, #backpackid
if #findcnt < 1
{
finditem %instruments C_, #backpackid
set %currentinstrument #findid
set #lobjectid #findid
}