Official ScriptUO EasyUO Scripts > Script Debug
Drop Shoes Sub cannot get to drop ALL Shoes.
Dan123The123Man:
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
--- Code: ---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
--- End code ---
Crisis:
The ground tile is most likely blocked after the first pair. Maybe try set it to drop them in a corpse or trash can?
The Ghost:
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
--- Quote ---
finditem xxxxx C_ , #backpackid
for #findindex 1 #findcnt
{
do something
}
--- End quote ---
Endless Night:
--- Quote from: The Ghost on February 29, 2020, 08:06:39 AM ---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
--- Quote ---
finditem xxxxx C_ , #backpackid
for #findindex 1 #findcnt
{
do something
}
--- End quote ---
--- End quote ---
That is some excellent advice right thier.
Endless Night:
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
Navigation
[0] Message Index
[#] Next page
Go to full version