ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Coragin on October 11, 2009, 07:15:34 AM

Title: IS this findcolor and pick sub correct?
Post by: Coragin on October 11, 2009, 07:15:34 AM
Heres what I got, which one is more correct?

Code: [Select]
set %ashboards TLK 1191
Sub getash
  finditem %ashboards C_ , %resource
  for #findindex 1 #findcnt
    exevent drag #findid 100
  exevent dropc %backpack
  wait 30
return

or is this one correct?

Code: [Select]
set %ashboards TLK
Sub getash
  finditem %ashboards C_ , %resource
  #Findcol 1191
  for #findindex 1 #findcnt
    exevent drag #findid 100
  exevent dropc %backpack
  wait 30
return

Or finally...

Code: [Select]
set %ashboards TLK
Sub getash
  finditem %ashboards && #Findcol 1191 C_ , %resource
  for #findindex 1 #findcnt
    exevent drag #findid 100
  exevent dropc %backpack
  wait 30
return

Ugh, comfusing lol.
Title: Re: IS this findcolor and pick sub correct?
Post by: Masscre on October 11, 2009, 07:22:54 AM
I am no expert but I would say go with number 1.  Number 2 will not work because of the sentence structure and I am thinking number 3 want either but i am not sure.
Title: Re: IS this findcolor and pick sub correct?
Post by: Coragin on October 11, 2009, 07:35:30 AM
ok thanks, i will keep it with 1 for now, im done for now, neeed to lay down, damn flu!
Title: Re: IS this findcolor and pick sub correct?
Post by: Endless Night on October 11, 2009, 08:21:17 AM
ALL ARE INCORRECT

But number 1 is the easiest to mod to be correct.. see below

Code: [Select]
set %boards TLK
set %AshColor 1191

Sub getash
  finditem %boards C_ , %resource
  for #findindex 1 #findcnt
    {
     IF  #Findcol = %AshColor
       {
       exevent drag #findid 100
       exevent dropc %backpack
       wait 30
       }
   }
return
Title: Re: IS this findcolor and pick sub correct?
Post by: Coragin on October 11, 2009, 08:40:55 AM
Thanks EN, now all I have to do is figure out how to get all the gump buttons.  This is hard for me cause none of the x/y coordinates in other scripts match with the coordinates that show in easyuo or scriptuo.

But I am learning a lot.  But all them x/y are always off by 25 or more....:(
Title: Re: IS this findcolor and pick sub correct?
Post by: Scrripty on October 11, 2009, 09:36:40 AM
Thanks EN, now all I have to do is figure out how to get all the gump buttons.  This is hard for me cause none of the x/y coordinates in other scripts match with the coordinates that show in easyuo or scriptuo.

But I am learning a lot.  But all them x/y are always off by 25 or more....:(

I don't really know what you are looking at, but a lot of the gump locations you are going to find in scripts aren't going to match exact positions on the screen.  There's ways to click a gump no matter where it pops up on your screen, and you're probly looking at that.  Not exact locations.
Title: Re: IS this findcolor and pick sub correct?
Post by: Endless Night on October 11, 2009, 12:54:29 PM
Open the gump you want to find the postion of then run this code below.

Code: [Select]
contpos 0 0
halt

Now look at the cursor x/y values when you move the cursor over a button.  That will be the gump offsets.

in your code you would
Code: [Select]
set !clickx #conposx + %XoffsetCalcedabove
set !clicky #conposy + %yoffsetCalcedabove

click !clickx !clicky
Title: Re: IS this findcolor and pick sub correct?
Post by: NObama on October 21, 2009, 03:41:00 PM
EN just taught me that trick.  Works like a charm.

 :)