ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: aibandit on May 08, 2010, 11:42:22 AM
-
This is the first time I've attempted scripting sooo call me newb if you want :D
Basically I'm trying to make the quest toggle target my crossbows 10 times and I have no clue if I'm on the right track.
Thanks for your help
set %bow PPO
click 421 316
wait 1s
click 483 487
wait 1s
target
gosub bow
;===============================================
sub bow
repeat
finditem %bow C_ #BACKPACKID
set #lobjectid %bow
event macro 17
Post Merge: May 08, 2010, 02:50:33 PM
Ok so this is what I have now
Initevents
set %bow PPO
exevent Popup #charid
click 68 170
wait 1s
target
{
finditem %bow , C_ #backpackid
set #lobjectid #findid
event macro 17 0
}
It's getting the quest toggle and opening my pack but not clicking any items.
-
Nothing eh =/
-
Try this...
use F7 to step through the code so you can see how it works.
set %bow PPO
gosub items2quest %bow
halt
sub items2quest
finditem %1 C_ , #backpackid
if #findcnt > 0
{
gosub togglequest #true
for %i #findindex #findcnt
{
target
set #ltargetid #findid
set #ltargetkind 1
event macro 22 0
}
gosub togglequest #false
}
return
sub togglequest
if %1
{
exevent popup #charid
wait 20
click 20 130
target
}
else
{
target
key esc
}
return