ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: talkmill on August 18, 2008, 05:56:12 AM

Title: Moving items
Post by: talkmill on August 18, 2008, 05:56:12 AM
When using a simple script like:

exevent drag %item
wait %wait1
exevent dropc #BACKPACKID
wait %wait2

You can get ghost items (what i understand it's depending on lag with combination to the values of %wait1 and %wait2). Is there any good way to see if you have gotten a ghost item and how do you counter it?

The only solution I can think of right now is to search the original place of the item to see if it's still there. Then try to move it again or maybe reopen the container.

Anyone have a good solution to this?
Title: Re: Moving items
Post by: TrailMyx on August 18, 2008, 09:09:26 AM
There's a few ways to keep the ghosting items issue to a minimum.  First is to allow sufficient time between your drags'n'drops.  In your example, we've found that %wait1 should be 10 and %wait2 should be 20.  It's a bit slow, but I guarantee you'll have less ghosting issues and more stable scripts.  Plus with those delays, you will crash the client WAAAAY less.

But even this wasn't enough for the heartwood quester that requires being able to run 24/7.  So the best solution for the ghosting issue is to open whatever container you will be dragging from first.  This takes a bit of time, but it basically solves the ghosting issue. Since we introduced pack/bag opening before dragging, I haven't ever seen the quester die from a ghosted item.

TM
Title: Re: Moving items
Post by: 12TimesOver on August 18, 2008, 12:58:48 PM
Has anybody seen any bug tracking or bug response from Devs on this issue? This isn't just a scripting issue, it impacts general gameplay just as much and can be a huge pain in the ass. I can't tell you how many times I've run into this when trying to move things in and out of the bank or even using trade windows. I don't frequent any other UO sites besides this one, WinUO, and UOGuyz (other than my guild site) so I just have no idea if there is even a status on this issue.

XII
Title: Re: Moving items
Post by: TrailMyx on August 18, 2008, 01:07:10 PM
Do you run into the ghosting issue under normal gameplay(i.e. no easyuo)? I guess I've never had this happen to me without easyuo....
Title: Re: Moving items
Post by: 12TimesOver on August 18, 2008, 01:11:35 PM
Oh yeah, it happens all of the time - although maybe it's a slightly different problem. Drives me nuts TBH, I've had to get in the habit of opening packs after recalling before moving stuff. I can't tell you how many times I've thought I moved a bunch of stuff in or out of a container only to find that the client never actually kept up (opened the bag again and I never moved it) which I think is part of the same issue.

XII
Title: Re: Moving items
Post by: TrailMyx on August 18, 2008, 01:20:56 PM
Oh yeah, it happens all of the time - although maybe it's a slightly different problem. Drives me nuts TBH, I've had to get in the habit of opening packs after recalling before moving stuff. I can't tell you how many times I've thought I moved a bunch of stuff in or out of a container only to find that the client never actually kept up (opened the bag again and I never moved it) which I think is part of the same issue.

XII

Then that's a good observation.  In my website prowling, I haven't ever heard of the whiners talking about ghosted items.  I too am curious if this problem is being tracked somewhere officially.

But that right there is troubling because it seems like some of the most legacy problems have been around nearly since the beginning of UO.  And these days, I have the least amount of faith in this dev team than any other one in UO history.

But it's pretty clear from the actions of the past year that UO is in a state of sustaining development.  Even the "new" systems introduced are utilizing existing technology.  Look at the new plant system; they couldn't even get new artwork designed for it.  Sounds like there's some good intentions in their building, but just no warm bodies to do the work mostly due to nearly zero budgeted money.

How's that for off-topic!!  BoooYaaaah!!!
Title: Re: Moving items
Post by: 12TimesOver on August 18, 2008, 02:38:14 PM
LOL, yeah don't want to derail but I had to reply...

...word...

K, back to the regularly scheduled program.
Title: Re: Moving items
Post by: Bullmoose on August 19, 2008, 03:28:43 AM
his only happens to me when useing Easyuo. Never in straight game play
Title: Re: Moving items
Post by: 12TimesOver on August 19, 2008, 06:07:55 AM
Anyone but me play with 80+ ping regularly? It is possible, if not likely, that this could be part of the issue. I don't think I've noted it as much when I play east coast shards but it's gotten ridiculous when I play Euro shards.

XII
Title: Re: Moving items
Post by: TrailMyx on August 19, 2008, 07:46:47 AM
I've always tried to play close to the server.  I just got lucky originally when I chose Napa Valley.  I tried a European shard once, but when it was so damn laggy I couldn't move, I decided to opt out of that and stay domestic.

But I'm sure that a laggy connection can only add to the general strangeness...
Title: Re: Moving items
Post by: talkmill on August 19, 2008, 10:47:03 AM
My laptop is sometime getting really slow (some heating problem i think). That also makes the ghost items appear much more often, which also is a sign of it being lag based.

You said opening the container helps, do you mean the source container containing the item you wish to transfer? When doing that i still get the ghost item when my connection/computer lags. Guess I'll have to put in some "ghost detection" (a ghostbuster sub :D) or fix my computer ;)
Title: Re: Moving items
Post by: TrailMyx on August 19, 2008, 11:34:56 AM
lol, just as long as you get Sigourney Weaver back when she was HOT to be in your ghostbuster group, then I say GO FOR IT~!!!

But what I'm talking about is opening the pack from which you are moving.  That does a refresh on items that may have ghosted to prevent accidentally grabbing an incorrect item.
Title: Re: Moving items
Post by: talkmill on August 21, 2008, 07:18:02 AM
Ahh yeah, that works. But that can be a pain sometimes. Say for example you have a bod book in your backpack, you wish to remove a bod from the book, then move it somewhere, then remove next etc. Then it will take quite some time reopening the backpack say 100 times for unloading the book. The thing i guess you can do in that case is scan the target container to see if the move was successfull and scan the source container for the same item, if it's still there just ignore it.
Title: Re: Moving items
Post by: TrailMyx on August 21, 2008, 08:17:04 AM
Ahh yeah, that works. But that can be a pain sometimes. Say for example you have a bod book in your backpack, you wish to remove a bod from the book, then move it somewhere, then remove next etc. Then it will take quite some time reopening the backpack say 100 times for unloading the book. The thing i guess you can do in that case is scan the target container to see if the move was successfull and scan the source container for the same item, if it's still there just ignore it.

Yes, there's different games you can play.  Honestly, I only open the source pack once, then do all my moves without opening it again until I have to reference the source again.  Typically, the ghosting happens after an exevent drag/drop so as long as you get through that command successfully, you can continue to move all your items and assume the move was correct for each item.  But anytime you want to search that container again for items to be moved, you should probably open it.  You can get down to just a few open   containers and doesn't take much longer.
 
Title: Re: Moving items
Post by: talkmill on August 21, 2008, 08:28:07 AM
Ahh ok, so doing something like this would work:
(maybe add some other checks for if the move worked if needed if the move starts missbehaving)

Code: [Select]
nextBod:
gosub removeOneBodFromBook

finditem EYM C_ , #BACKPACKID
exevent drag #FINDID
wait 10
exevent dropc %target
wait 20
ignoreitem #FINDID
if %bodsinbook <> 0
  goto nextBod

(adding an ignoreitem so the moved bod wont disturb the next one removed?)

Title: Re: Moving items
Post by: TrailMyx on August 21, 2008, 09:14:37 AM
Ya, as long as you don't have to refer to it again, you can leave it ignored.  Just remember that you will have to reset your ignore list at some time.  It's always annoying to forget this and then you wonder why you can't find anything...  lol, I do it all the time... :)
Title: Re: Moving items
Post by: talkmill on August 21, 2008, 09:59:08 AM
Yeah thats true.

If you are just moving to another container you could check the target container for the item to see if the move was successfull, if you move to a bood book or a stack or something you should be able to check if the number of bods/in stack increased. Seems like to much work and special cases to be needed though.
Title: Re: Moving items
Post by: TrailMyx on August 21, 2008, 10:09:57 AM
No that's a good idea.  There's been a couple scripts I've written where I wanted ULTRA reliability, so I have done exactly as you suggest.  Works good and really doesn't take much more time.
Title: Re: Moving items
Post by: Cstalker on August 24, 2008, 04:58:31 PM
I havent seen ghosting in a long time. I use to get it when I put the wait between the exevent drag and evevent dropc command. I talk with Snicker7 a lot and it was him that got me off of useing that exta wait. Ever since then all has been ok. I run at a avarage 90 ping and do bods non stop and run a leather farming script at the same time and dont have any ghosting issues.
Title: Re: Moving items
Post by: TrailMyx on August 24, 2008, 05:04:22 PM
got me off of useing that exta wait.

How do you normally do your exevent stuff then?  I'm interested in your findings.  I'm wondering if there's different ways to handle it for where your target container/object might be.  For the quester, the only way to handle it was to wait a tad more because we were dragging out of a pack instead of dropping into a pack.  Would be nice to determine the parameters and the best methods.

We had to come up with something that's reliable for the quester because literally 100s of people are using that one and I personally didn't want to be handing constant, "Your script sucks" messages.  lol.
Title: Re: Moving items
Post by: Cstalker on August 25, 2008, 08:12:06 PM
The main question is are you playing on the pay shards or a runuo shard? I have heard that EA has added in event delays and that may be a problem. This is my typcial code for loot searching

Code: [Select]
;---------------------------------
; %1 pack to search
; %2 pack to move to
;---------------------------------
sub search_bag
  Finditem * C_ , %1
  If #findkind = 0
  {
    For %moveloop 1 #findcnt
    {
      Finditem %loot C_ , %1
      If #findkind = 0
      {
        exevent drag #findid #findstack
        exevent dropc %2
        WAIT %MSwait
        set %attempt %attempt + 1
        If %attempt > 3
        {
          for %S 1 10
          {
            Sound
            Event sysmessage The packie is full
          }
        }
      }
    }
  }
  set %attempt 0
return

On runuo there is no delay when picking up an item and droping it. There is a delay after words and normaly i can get away with a wait 9. When i do scripts for guildies i have to up that to 12 to 15 most of the time. Guess i am just blessed with a good connection. :)

I gave up on EA for all their anti scripting attempts. Its nice being to script with full support of the staff :)

Title: Re: Moving items
Post by: TrailMyx on August 26, 2008, 12:18:19 AM
Ah yes, there is that.  Unfortunately, all my scripts are made to first work on EA/OSI.  If they happen to work on a free shard, then marvy.