ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Gemviper on February 11, 2017, 12:26:16 PM

Title: finditem * G - just curious
Post by: Gemviper on February 11, 2017, 12:26:16 PM
Just a curiosity, when I'm testing things I often just specify G_2 to keep things simple. The documentation suggests this is supposed to limit a scan to the ground around me, up to two tiles away. In practice, however, I notice that it occasionally picks up things like ZJF(my character's backpack), YC(my right or left hand even if empty) and even IS(my character itself). For testing purposes this is a bit of a pain, though not more than a minor nuisance really.

My question: why is it happening and is there a simple universal way to keep searches on the G and away from players and their gear? Unfortunately this does not happen all the time, or even half the time, but when it does it's usually on the very first item found.

note: I am usually testing within a #findindex, if that matters.

Title: Re: finditem * G - just curious
Post by: superduke on February 13, 2017, 04:56:34 AM
Hi, can't tell as i never use that. I just use #finditem and #findkind when looking for items around me.
Title: Re: finditem * G - just curious
Post by: Tidus on February 14, 2017, 12:15:37 PM
Well it is because you are searching for anything and everything when you use the *.  Your character is on the ground and so it does search yourself, which you always have a backpack on you, I think it even searches your paperdoll.  The best way is to know these items and just use if statements to ignore them as you go through your index.