ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: baldielocks on May 26, 2010, 07:43:10 PM

Title: Dropg tutorial help
Post by: baldielocks on May 26, 2010, 07:43:10 PM
Been working a very tiny script, and reading the wiki. I am having a problem with exevent dropg. I looked at other scripts that use this command, and cannot figure out what i am doing wrong. I can get it to drag #findid and #findstack, but it sticks on cursor. Using dropc to debug.

Code: [Select]
Finditem EEG C_ , #backpackid ; hides in pack
exevent Drag #findid #findstack
wait 10
exevent Dropg #charposx #charposy #charposz ;put on ground from easyuo wiki
wait 10
exevent Dropc C_ ; clears cursor as debug
halt
Title: Re: Dropg tutorial help
Post by: Scrripty on May 26, 2010, 07:47:07 PM
baldie there's some issues with the exevent dropc commands atm.  Not sure if dropg is affected or not...  CEO over at EUO is looking into it I believe.
Title: Re: Dropg tutorial help
Post by: _C2_ on May 26, 2010, 08:15:38 PM
dropg has been busted for ages
Title: Re: Dropg tutorial help
Post by: Scrripty on May 26, 2010, 08:43:58 PM
dropg has been busted for ages

Heh I've never even tried to use it. :)
Title: Re: Dropg tutorial help
Post by: Masscre on May 27, 2010, 05:37:32 AM
Is dropg to drop to the ground?  I have forgotten :)
Title: Re: Dropg tutorial help
Post by: Endless Night on May 27, 2010, 05:43:11 AM
dropg  works (ignoring any recent patch issues).... The problem is you cannot drop under your feet on OSI.  The example on EUO only works on freeshards.

You must drop on a possition other than charpox/y   ie +1

2nd problem you will encounter is that you dont know the z axis at any spot other than your feet you also dont know if any of the surrounding are squares terrian features such as walls etc

In my scripts i have gotten arround this by looping though  x-1 y-1 to x+1 y+1 attempting to drop as long as the item keeps rebounding to pack.
Title: Re: Dropg tutorial help
Post by: baldielocks on May 27, 2010, 03:11:51 PM
thanks endless. How would you accomplish that? I assume find kind greater than one, but cannot see a way to increment it.
Title: Re: Dropg tutorial help
Post by: TrailMyx on May 27, 2010, 03:22:00 PM
The dropg method from the EUO wiki DOES work on RunUO shards so it makes it really easy to drop things at your feet.  OSI is a different story.
Title: Re: Dropg tutorial help
Post by: NObama on June 08, 2010, 08:13:57 PM
dropg has been working.  Just remember: You can't stack items higher than 15 on the ground.  If you stay in one place, that can be an issue.

 :)
Title: Re: Dropg tutorial help
Post by: Paulonius on June 09, 2010, 06:25:07 AM
Take a look at this script that I use to drop blackrock.  Since blackrock doesn't ever go away, you don't have to use lockdowns to store it.  I used the attached script to create the mess in the picture.  The script is buggy and needs some refinement, but it works on DropG.

-P
Title: Re: Dropg tutorial help
Post by: NObama on June 09, 2010, 08:59:55 AM
I like to put my blackrock in a box, then hatchet it.  Much neater.

Just don't accidentally hit your old Armageddon spell macro when you're nearby.  Ouchy.
Title: Re: Dropg tutorial help
Post by: baldielocks on June 11, 2010, 08:32:43 PM
*EDIT* most problems resolved, see debug request thread
Okay, got most of my subs working for this. Object is to drop leather in a single stack on ground. If no current stack on ground, create new stack. At 58 K (15 in script for testing), it will cut leather and drop in pack. Once I get that smooth, will put in a BOS sub to send to bank.

Problem right now, the last sub cut_hides wont stop running. I have been putting in some if #finditem < 0 checks, but it is not helping. Could I get some guidance please?
A semi- problem is that it is grabbing leather from corpses and putting it on ground. I like this, but I think it might interefer with looters.
*script inspired by tm_logstoboards and S7's cut large leather stack (http://www.easyuo.com/forum/viewtopic.php?p=148691#148691)
main code source is EUO wiki.
Code: [Select]
mainloop
finditem EEG_ C_
{
 if #FindKind > 0
    gosub scan_hides_onground
 if #FindKind < 0
    goto mainloop
    }

;start subs
;-------------------------------

Sub scan_hides_onground
finditem EEG_ G_
   {
   if #findstack > 14
      gosub cut_hides
   if #findkind > 0
      gosub Drop_hides_in_stack
   if #findkind < 0
      gosub Drop_hides_new_pile
      }

;-------------------------------

Sub Drop_hides_in_stack
findid EEG_ G_
         if #findkind < 0
            gosub Drop_hides_new_pile
wait 5
ExEvent Drag #findid #findstack
wait 10
ExEvent Dropc !Hides_on_ground !number_on_ground

;-------------------------------

Sub Drop_hides_new_pile
Set %Xpos ( #CharposX - 1 )
Set %Ypos ( #CharPosY - 1 )
finditem EEG_ C_
if #FINDkind > 0
wait3
ExEvent Drag #findid #findstack
wait 10
ExEvent Dropg %Xpos %Ypos
wait 10

;-------------------------------
Sub cut_hides
Finditem KAG_
         if #findkind < 0
            halt
Set %scissors #FINDID
finditem EEG_ G_
         if #findkind < 0
            go mainloop
set !Hides_on_ground #findID
set !number_on_ground #findstack
Set #lobjectID %scissors
Set #ltargetID !Hides_on_ground
event macro 17 0
      target 5s
      wait 15
      exevent drag !Hides_on_ground !number_on_ground
      wait 15
      event macro 22 0
      wait 15
      exevent dropc #BACKPACKID
      wait 10
go mainloop