ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: roadrunner on May 29, 2013, 06:33:08 PM

Title: enchanted apple sub
Post by: roadrunner on May 29, 2013, 06:33:08 PM
ok, i'm trying to make a short sub for finding enchanted apple in main pack & eating 1. after reading as close to what i want in tutorials, other scripts, etc., i came up w/ these. any advice on how to "fix" them would be appreciated.
Code: [Select]
;=====enchanted apple sub======
findItem CBS C_ , #backpackId
if #findcnt > 0
set #lobjectID %enchantedApple
event macro 17
return
===============================

and this is the second, so whichever would be better, easier to make work, faster
Code: [Select]
;==========enchanted apple sub=====
    findItem CBS C_ , #backpackId
if #FINDCNT > 0
        {
click #findx #findy d
        } 
    return
;==================================
Title: Re: enchanted apple sub
Post by: manwinc on May 29, 2013, 06:52:25 PM
Sub Enchanted_Apple
Finditem CBS C_ , #backpackid
if #Findcnt > 0
{
set #lobjectid #Findid
Event macro 17 0
wait 20
}
Return
Title: Re: enchanted apple sub
Post by: roadrunner on May 29, 2013, 07:00:00 PM
thank you Manwinc !! at least i was sorta in ballpark. i'll fiddle with it more tomorrow. :D
Title: Re: enchanted apple sub
Post by: dxrom on May 30, 2013, 01:11:55 AM
You may consider creating a separate appleTimer for this so it doesn't put your entire script into a pause.