Official ScriptUO EasyUO Scripts > Scripting Tutorials

Ok, total script noob here

(1/2) > >>

mmoore5325:
I am trying to make a basic script.  Something simple that will learn me some basics but also do something functional.  I am trying to make a script that will organize gold checks/commodity deeds in that nice little fashion where they overlap each other and line up perfectly in a row.  This is my very first script.  I would appreciate any help someone could give me.
Here is what I have, and please, don't laugh.

gosub selectbag
gosub selectbag2
gosub movedeed

sub selectbag
    display ok Click ok and select bag
    set #targcurs 1
    while #targcurs = 1
          wait 2
    set %bag #ltargetid
    set #ltargetid %bag
    event macro 17
   
Return

sub selectbag2
   
 display ok Click ok and select bag to you want to put deeds in
    set #targcurs 1
    while #targcurs = 1
          wait 2
    set %bag2 #lobjectid
    set #ltargetid %bag2
    event macro 17

Return

sub movedeed
   
    findItem EWH C_, %bag

And thats all I got.  I know event macro 17 is last object.  I do not know how to make it open the bag that is targeted.  If someone could let me know how, after they select the bag, to have the bag open, I would appreciate it.  Then if someone could refer to me an example of a click and drag to x,y after I have opened the targeted bag, I would appreciate it.  I think contpos puts the gump in a spot of my choosing, then I could click and drag the deeds to the first coordinate, then coordinate +1, or something.  Am I on the right tracK?  Anything helps.  I'm totally new at this but really want to start making my own super secret 1337 scripts that I can brag about and release versions that are just a tease of what my full version,  But for now I will be happy organizing checks.

The Ghost:
Here a sub that double click an item is you pack.


--- Code: ---set %item XXX : insert ID of what you want to open or use.
sub DC_Item
   finditem %item C_ , #backpackid
    if #findcnt > 0
  {
    set #lobjectid #findid
    event macro 17
 }
 return
--- End code ---

Endless Night:
you are welcome to use any of my code snippets in this thread http://www.scriptuo.com/index.php?topic=2454.0

Of use to you might be: ENs MoveToContainor: http://www.scriptuo.com/index.php?topic=2454.msg71092#msg71092

mmoore5325:

--- Code: ---sub movedeed
   
    findItem EWH C_, %bag

--- End code ---

Would that work to find the check deed in the %bag that I set?

The Ghost:
You forget a space after
yes should work.


--- Code: ---sub movedeed
    findItem EWH C_ , %bag

--- End code ---

You can event do that.  Will look into a bag and move amount into another bag.

--- Code: ---sub Getboard
set %packy %box
finditem TLK C_ , %packy
exevent drag #findid  150
exevent dropc %turnbag
wait 30
return
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version