ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: UOMaddog on September 22, 2011, 05:51:38 PM
-
So I had a curious question. If I have a open bag with 100 items in it and I do finditem * C with it, it will find 100 items and they will all be in the #findindex from 1 through 100. Now, if I run the same finditem again, will every item be "found" in the exact same order or does it vary randomly???
-
why not just test it out?
menu Clear
menu Window Title TEST
menu Window Color BtnFace
menu Window Size 422 563
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font BGColor Window
menu List Create EUOListBox1 0 0 209 573
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu List Create EUOListBox2 212 0 209 573
menu Show 421 270
finditem * C_ , #backpackid
for #findindex 1 #findcnt
{
menu List Add EUOListBox1 #findid
}
finditem * C_ , #backpackid
for #findindex 1 #findcnt
{
menu List Add EUOListBox2 #findid
}
halt
Seems exactly the same.
-
i believe they are indexed in item id order... so if you swapped one item out the index would change.
-
i believe they are indexed in item id order... so if you swapped one item out the index would change.
You mean like alphabetical order by their id?
(Sorry I couldn't test this, I was at work and just had a thought and was curious of the answer. Also, even with a few tests, I wasn't sure if it was guaranteed every time)
-
Well, I gave it a few tests here...
- Item: Mortar And Pestle ID: TOOCKUD Type: RQF kind: 0 col: 0 rep: 255
- Item: Mortar And Pestle ID: NOOCKUD Type: RQF kind: 0 col: 0 rep: 255
- Item: Runebook ID: EBEQAUD Type: ZBN kind: 0 col: 2124 rep: 208
- Item: Mysticism Spellbook ID: LJQSWTD Type: RJR kind: 0 col: 0 rep: 0
- Item: Book Of Chivalry ID: TJVSMTD Type: YXM kind: 0 col: 0 rep: 0
- Item: Runebook ID: LRNHGTD Type: ZBN kind: 0 col: 1121 rep: 196
- Item: Runebook ID: CMFEGTD Type: ZBN kind: 0 col: 1121 rep: 192
- Item: Endless Decanter Of Water ID: UNNDATD Type: VBM kind: 0 col: 1150 rep: 255
- Item: Bulk Order Book ID: JOTQYSD Type: DYM kind: 0 col: 0 rep: 68
- Item: 20 Spiders' Silk ID: KDEHTSD Type: RZF kind: 0 col: 0 rep: 255
- Item: Bag ID: QDEHTSD Type: CKF kind: 0 col: 0 rep: 176
- Item: Recall Rune ID: GRDHTSD Type: QWL kind: 0 col: 0 rep: 255
- Item: Recall Rune ID: WQDHTSD Type: QWL kind: 0 col: 0 rep: 255
- Item: Recall Rune ID: NQDHTSD Type: QWL kind: 0 col: 0 rep: 255
- Item: Recall Rune ID: OQDHTSD Type: QWL kind: 0 col: 0 rep: 255
- Item: Tinker's Tools ID: BCDDYRD Type: JTL kind: 0 col: 0 rep: 255
- Item: Scribe's Pen ID: YEGPJRD Type: PBG kind: 0 col: 0 rep: 255
- Item: Bulk Order Book ID: IHGPJRD Type: DYM kind: 0 col: 0 rep: 0
- Item: 8283 Gold Coin ID: RVWOVQD Type: POF kind: 0 col: 0 rep: 255
- Item: An Interior Decorator ID: PDDDPPD Type: BXF kind: 0 col: 0 rep: 255
- Item: Runebook ID: PUODOPD Type: ZBN kind: 0 col: 1121 rep: 0
- Item: Runebook ID: LQLIGPD Type: ZBN kind: 0 col: 2219 rep: 184
- Item: Runebook ID: IJMNBND Type: ZBN kind: 0 col: 2126 rep: 200
At first glance, I figured they were indexed by #findid, in inverse alphabetical order, if you read the id from right to left.
Then I found some exceptions.
Then I ran it for G_15 and found no logic behind the order whatsoever...
So, I really can't see a pattern here... If anyone can, please enlighten me! :)
neo
-
In the order moved with the first identified item being the last one moved.
Maybe lol...
I'm pretty sure I played with this for like 10 minutes before. If you have 20 bandages in your pack unstacked, and move them one at a time into a container, then do a find for bandage, they will show up with the last one moved being the first one found.
I got bored with it and never revisited it, until this very post :P
-
In the order moved with the first identified item being the last one moved.
Maybe lol...
I'm pretty sure I played with this for like 10 minutes before. If you have 20 bandages in your pack unstacked, and move them one at a time into a container, then do a find for bandage, they will show up with the last one moved being the first one found.
I got bored with it and never revisited it, until this very post :P
You are right!
I had these tests some years ago,too and it seems like the order comes up as the Datastream goes to client.
Example:
ID 1 -10 are in Bag a
now you Scan Bag a and getting an Index with an Order 1-10
then you move 2,3,7,5,4,1,6,8,9,10 in this queue to Bag b
doing Scanitems will give you exactly this Order!
-
Yeah! What do I win?
-
Yeah! What do I win?
A Hacksimus Extremus title ;) :D ;D
-
Yeah! What do I win?
I will Honor you until my end of life as the Administrator of this Site and praise your insane knowlegde about Easyuo ;D
-
Yeah! What do I win?
I will Honor you until my end of life as the Administrator of this Site and praise your insane knowlegde about Easyuo ;D
I'll take it!
-
The question is....how is it useful? Perhaps for scanning your bag for drops, if scanjournal isn't an option?
-
The question is....how is it useful? Perhaps for scanning your bag for drops, if scanjournal isn't an option?
When u scan a Container or Ground, and want change the queue start from last not from first. So you have the option to say with your code how you want to use it. The Main Author asked for the ordering