ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: AreZ on July 25, 2010, 01:25:02 PM
-
-
display OK Choose Bag to ident
set #TargCurs 1
while #TargCurs = 1
wait 1
set %identBag #ltargetid
set #lpc 50000
This part looks OK. But I wonder about the #LPC being so high. For reference, see this link http://wiki.easyuo.com/index.php/Lpc (http://wiki.easyuo.com/index.php/Lpc)
and http://wiki.easyuo.com/index.php/LinesPerCycle (http://wiki.easyuo.com/index.php/LinesPerCycle). the native LPC should be plenty enough for this.
loop:
gosub checkitem
goto loop
sub checkitem
repeat
finditem * C_ , %identBag
wait 5
if #findkind <> -1
{
event property #findid
if Unidentified in #property
{
set #ltargetid #findid
set #ltargetkind 1
event macro 13 3
wait 1s 5
event macro 22
itemignore #ltargetid 2
}
}
until #findkind = -1
return
You have two loops going on. With only one sub, dont really need the tag (loop:).
In your wait , you have two values. In this format, you are saying you want a random wait, no more than 1/4 of a second added to your 1S wait.
Your main concern is the itemignore line. It should be ignoreitem. Second, the numeral 2 puts it in ignore list 2. Not super important, but you dont have a list 1. I suggest having the documentation bookmarked and double checking each command. It's what Twinkle McNugget told ME lol, and I found it to be GREAT advice.
Unless you are super laggy, you could lower the wait for #targcurs time. If your server has a skill wait time, might want to throw that in at the end.
This is a great post on this topic (Paulonius & Twinkle McNugget) http://www.scriptuo.com/index.php?topic=5558.msg47051#msg47051 (http://www.scriptuo.com/index.php?topic=5558.msg47051#msg47051)
-
I rewrote it for you. Not sure this will work, but it should. There's really no reason to ignore the item with this sub... not sure why you are because this way it will scan only all the found items, and identify them and move on without ignoring them. And it will do it to everything in the container... but are you setting the %identBag at the top because the script wont work without that variable set in the top of the script.
set %identBag ; SET THIS TO THE ID OF YOUR BAG
loop:
gosub checkitem
goto loop
sub checkitem
finditem * C_ , %identBag
if #findcnt > 0
{
for #findindex 1 #findcnt
{
event property #findid
if Unidentified in #property
{
set #ltargetid #findid
set #ltargetkind 1
event macro 13 3
target 5s
event macro 22
wait 20
ignoreitem #findid
}
}
}
return
-
I KNEW the for loop was coming! ;D
-
thaks both of you :)
Testing it right now but i have a little explanation for the Ignoreitem thingie.
I had the problem that he over and over took the same item to identifie it and second of it was that i also loot regs and money and scrolls
i want just to ignore all that stuff in the next lvl of the script.
but for all this and the hints i thank you *bows*
Post Merge: July 26, 2010, 03:04:41 AM
ok tested it and works now i will go for your tipp now with that ignoreitem now so i maybe can avoid the script hanging !