ScriptUO

Official ScriptUO EasyUO Scripts => Script Snippets => Topic started by: KilroyIsDead on June 16, 2009, 03:35:43 PM

Title: cheesy example of replacing an item where you found it
Post by: KilroyIsDead on June 16, 2009, 03:35:43 PM
Pick something in your back pack and set the !Item variable.

*Note you may see ghosting here, because it happens fairly quickly
Code: [Select]
set !Item BHHWFRD ; This can be anything in your pack

;Open the pack to get the coords of teh pack
event macro 8 7
set !ContX #ContPosX
set !ContY #ContPosY

finditem !Item C_ , #BackPackID
if #FindCNT > 0
{
  set !origX #FindX - #ContPosX ;The find x is a screen coord the subtraction is to account for teh container offset
  set !origY #FindY - #ContPosY

Exevent Drag #findid
wait 10
Exevent Dropc #backpackid  ;drops in a random location in backpack or stacks with existing
wait 10

  event macro 2 0 that thing could be anywhere

Exevent Drag #findid
wait 10
event macro 2 0 !origX !origY
Exevent Dropc #backpackid !origX !origY
wait 10

  event macro 2 0 that thing could be anywhere

}
else
{
  display ok Pick something IN your pack
}


halt
Title: Re: cheesy example of replacing an item where you found it
Post by: Khameleon on June 18, 2009, 06:02:25 PM
oh cool man.. I was looking for this exact script.. I'll keep it handy..
Title: Re: cheesy example of replacing an item where you found it
Post by: KilroyIsDead on June 18, 2009, 06:12:42 PM
I wrote it after you posted in shout a couple days ago