ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Burnhazel88 on October 06, 2017, 01:07:11 PM
-
I'm having an issue with ignoreitem
finditem %item_list c_ #BACKPACKID
while #FINDCNT > 0
{
exevent drag #FINDID
wait 10
exevent dropc %dropbag
wait 10
ignoreitem #FINDID 4
}
%dropbag is inside backpack and open grabs first item from backpack drops in bag the keeps pulling and dropping same item to and from %dropbag.
what am i missing here. other than caffeine in my veins.
-
You can only ignore the item once. If you ignore it twice, you basically unignore it. ;) Plus while you're doing your while statement, and ignoring your items, #findcnt isn't changing, because it only changes when you do a finditem... doing a for #findindex 1 #findcnt might be a better solution to your problem.
-
ok then tried basic goto loop with success but really hate using them .
loop1:
finditem %item_list c_ #BACKPACKID
if #FINDCNT > 0
{
exevent drag #FINDID
wait 10
exevent dropc %dropbag
wait 10
ignoreitem #FINDID 4
goto loop1
}
-
ignoreitem #FINDID 4 : the 4 mean that you are going to execute the next 4 line. Not sure why you have it their. To ignore snake I only do ignoreitem %snake.
-
The problem is you aren't doing another finditem after you ignore the item to find another one.
finditem %item_list c_ #BACKPACKID
while #FINDCNT > 0
{
finditem %item_list c_ #BACKPACKID
exevent drag #FINDID
wait 10
exevent dropc %dropbag
wait 10
ignoreitem #FINDID 4
}
Personally i would be using a repeat though to skip that initial finditem before you enter the while.
Repeat
Finditem %item_list C_ , #Backpackid
if #Findcnt > 0
{
exevent drag #FINDID
wait 10
exevent dropc %dropbag
wait 10
ignoreitem #FINDID 4
}
Until #Findcnt <= 0
-
I love it when Manwinc talk :) So do we need the 4 in their
-
The 4 Specifies the Index for the Ignored items. This is useful later on when you want to use Ignoreitem Reset to clear out your ignoreitem filter.
Ignoreitem #Findid 4
Ignoreitem Reset 4 <- Unignores all items that were ignored using 4.
This is only really necessary when dealing in things in mass quantity like Looting Corpses.
-
And really what you are doing is no different than doing a for command using #Findindex.
finditem %item_list c_ #BACKPACKID
if #Findcnt > 0
{
For #Findindex 1 #Findcnt
{
exevent drag #FINDID
wait 10
exevent dropc %dropbag
wait 10
}
}
-
And really what you are doing is no different than doing a for command using #Findindex.
finditem %item_list c_ #BACKPACKID
if #Findcnt > 0
{
For #Findindex 1 #Findcnt
{
exevent drag #FINDID
wait 10
exevent dropc %dropbag
wait 10
}
Thx that explain alot. I use this type lot of mining and ofter drag sub. I now learn a new way.
-
I somehow tabbed out and it posted too fast, proper number of brackets now :P
-
I see how it is. I give the answer and manw gets the credit. Damn you manw! haha
-
The problem is you aren't doing another finditem after you ignore the item to
Yeah I saw that later on. I think I just had too many hours in front of the screen. Start over later and it all became clear.
Post Merge: October 09, 2017, 08:29:17 AM
I indexed the items cause later in my script I need to grab them id's again for another task