Author Topic: ITem ID Script  (Read 17252 times)

0 Members and 1 Guest are viewing this topic.

Offline AreZTopic starter

  • Newbie
  • *
  • Posts: 4
  • Activity:
    0%
  • Reputation Power: 0
  • AreZ has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
ITem ID Script
« on: July 25, 2010, 01:25:02 PM »
0

Offline baldielocks

  • Sr. Member
  • *
  • Posts: 301
  • Activity:
    0%
  • Reputation Power: 4
  • baldielocks has no influence.
  • Gender: Male
  • Respect: +11
  • Referrals: 5
    • View Profile
Re: ITem ID Script
« Reply #1 on: July 25, 2010, 03:23:05 PM »
0
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
and 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


« Last Edit: July 25, 2010, 03:26:24 PM by baldielocks »

Scrripty

  • Guest
Re: ITem ID Script
« Reply #2 on: July 25, 2010, 05:17:31 PM »
0
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.

Code: [Select]
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

Offline baldielocks

  • Sr. Member
  • *
  • Posts: 301
  • Activity:
    0%
  • Reputation Power: 4
  • baldielocks has no influence.
  • Gender: Male
  • Respect: +11
  • Referrals: 5
    • View Profile
Re: ITem ID Script
« Reply #3 on: July 25, 2010, 05:52:24 PM »
0
I KNEW the for loop was coming! ;D

Offline AreZTopic starter

  • Newbie
  • *
  • Posts: 4
  • Activity:
    0%
  • Reputation Power: 0
  • AreZ has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: ITem ID Script
« Reply #4 on: July 26, 2010, 01:49:32 AM »
0
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 !
« Last Edit: July 26, 2010, 03:04:41 AM by AreZ »

Tags: