ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started 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.
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
-
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.
-
dropg has been busted for ages
-
dropg has been busted for ages
Heh I've never even tried to use it. :)
-
Is dropg to drop to the ground? I have forgotten :)
-
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.
-
thanks endless. How would you accomplish that? I assume find kind greater than one, but cannot see a way to increment it.
-
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.
-
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.
:)
-
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
-
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.
-
*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.
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