ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Dan123The123Man on February 29, 2020, 06:07:51 AM
-
Can anyone help me figure out why this sub is not dropping all the boots/sandals that are in the backpack to the ground, instead it just drops one to the ground then it returns to the next gosub which is recalling out? Id like for it to drop all of them if #findkind = 1 keep dropping them until #findkind = 0 or -1
set %shoes QVI_PVI_CYI_CWI_NVI_TVI_ZVI_AWI_OVI_XVH
sub dropboots
set %looper10 0
sandals:
finditem %shoes C , #backpackid
if #findkind = -1
{
return
}
if %looper10 > 9
{
return
}
set %item2 #findid
namespace push
namespace local RT
set !radius 2
set !randx #RANDOM % !radius + 1
set !randy #RANDOM % !radius + 1
if #RANDOM > 500
set !randx !randx * -1
if #RANDOM > 500
set !randy !randy * -1
set !randx !randx + #CHARPOSX
set !randy !randy + #CHARPOSY
set #LTARGETX !randx
set #LTARGETY !randy
set #LTARGETZ #CHARPOSZ
;set #LTARGETKIND 2
;event pathfind !randx !randy
wait 30
;set #lobjectid %bag
exevent drag %item2
wait 20
exevent dropg !randx !randy #charposz
namespace pop
;exevent drag %item2 #findstack
;wait 20
;exevent dropc %trassh
;wait 15
set %looper10 %looper10 + 1
goto sandals:
until #findkind = -1 || ( #scnt > %safety_timer )
set %overweight #FALSE
return
-
The ground tile is most likely blocked after the first pair. Maybe try set it to drop them in a corpse or trash can?
-
Go get a goat, feed him the shoe, this way you have no mess around you.
And if you required to drop more them one items, you need to loop.
Those little syntax are usu full sometime
finditem xxxxx C_ , #backpackid
for #findindex 1 #findcnt
{
do something
}
-
Go get a goat, feed him the shoe, this way you have no mess around you.
And if you required to drop more them one items, you need to loop.
Those little syntax are usu full sometime
finditem xxxxx C_ , #backpackid
for #findindex 1 #findcnt
{
do something
}
That is some excellent advice right thier.
-
You could also try my old drag drop to ground sub It tries every spot around you.
http://www.scriptuo.com/index.php?topic=2454.msg33436#msg33436
-
got it fixed ty
-
got it fixed ty
show us the end result so others can learn from it.