Author Topic: Gump changes, I'm a newbie!  (Read 5329 times)

0 Members and 1 Guest are viewing this topic.

Offline Twisted1851Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Activity:
    0%
  • Reputation Power: 1
  • Twisted1851 has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Gump changes, I'm a newbie!
« on: September 26, 2011, 12:50:54 PM »
0
Ok so I don't know if this is the appropriate place to ask this, but I couldn't really find anywhere better.... In general it would be beneficial to me to know how to find the 6 digit identifier for button gumps in crafting? Or any in game gump really. The specific problem I am having is this: (This is inscription crafting gump, trying to craft spellbooks)

Code: [Select]
gosub click_offset 25 270 ; Clicks Other
wait 15
while #contname <> generic_gump
    wait 15
gosub click_offset 235 150 ; Clicks Spellbook
while %hide = #true && h notin #charstatus
  gosub hide
return

The 235 150 is where im having my trouble, that isn't the button for spellbooks anymore apparently. And I haven't the slightest idea how to figure out the buttons, or how they are determined... Any help would be great!

Post Merge: September 26, 2011, 01:14:35 PM
scrub this whole thing im retarded and figured it out....like really retarded =/
« Last Edit: September 26, 2011, 01:14:35 PM by Twisted1851 »

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Gump changes, I'm a newbie!
« Reply #1 on: September 27, 2011, 06:22:32 AM »
0
Open the Gump and go were u see the Gump for clicking.
Open Easyuo and and use following Code on a Blank Site:
Quote
contpos 0 0
then check my Picture :


The #CursorposX and #CursorposY showing you where your Cursor now is.
With using Contpos 0 0 you move the Gump to the 0\0 Axies and can get the raw position. Later in a good Code your Sub doing #contposx + %x so when your Gump moving it can be calculated. By using Contpos 0 0 you have from Gump start and the script can now go were is 0\0 axies of gump and than the Position from there. Hope it helps you..
Crome

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13304
  • Activity:
    0.6%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Gump changes, I'm a newbie!
« Reply #2 on: September 27, 2011, 06:37:07 AM »
0
My offset click generator makes finding these values very easy.

http://www.scriptuo.com/index.php?topic=505.0;highlight=offset
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Gump changes, I'm a newbie!
« Reply #3 on: September 27, 2011, 11:16:33 AM »
0
My offset click generator makes finding these values very easy.

http://www.scriptuo.com/index.php?topic=505.0;highlight=offset
Not Bad:)
But to learn how to check and what it mean, i thought showing an example by hand would help more;)

Offline Twisted1851Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Activity:
    0%
  • Reputation Power: 1
  • Twisted1851 has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Gump changes, I'm a newbie!
« Reply #4 on: September 27, 2011, 02:55:55 PM »
0
thanks guys! I figured out the positioning, although i would be interested to learn more about how the #contposx + %x works exactly...

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 822
  • Activity:
    0.2%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: Gump changes, I'm a newbie!
« Reply #5 on: September 27, 2011, 03:43:08 PM »
0
thanks guys! I figured out the positioning, although i would be interested to learn more about how the #contposx + %x works exactly...
Well, #contposx and #contposy are the x,y coordinates of where the gump starts for EasyUO... Since gumps can be dragged to different places of the screen, people use that "#contposx + %x" thing to prevent clicking wrong places, in case the gump isn't in the same position as you thought it would be.

For instance, you can open a craft gump and take a look at it's coordinates at easyuo. Let's say they are: #contposx = 20 and #contposy = 20

Let's say you have to click a button on that gump that's 30 pixels to the right, and 90 down, from where the gump "starts".

We could do it like this:

Code: [Select]
set %clickx #contposx + 30
set %clicky #contposy + 90
click %clickx %clicky

This will set the var %clickx to 20 (#contposx) + 30 = 50 and the var %clicky to 20 (#contposy) + 90 = 110.

Now when you use "click %clickx %clicky" it will click the coordinates (50,110). If the gump was in a different position on the screen, the value here would be adjusted to that.

That's the beauty of TM's offset click generator, it will give you that relative position for the gump automatically.

Hope this was clear enough to understand...

cheers

neo
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline Twisted1851Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Activity:
    0%
  • Reputation Power: 1
  • Twisted1851 has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Gump changes, I'm a newbie!
« Reply #6 on: September 27, 2011, 06:01:43 PM »
0
seems like it...so does that offset work where ever the gump is on screen? it seems most the crafting scripts will work anywhere on screen with the gump, is that set the way you described? or is there a method to find the button relative to itself?

Offline seeriusly

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: Gump changes, I'm a newbie!
« Reply #7 on: September 27, 2011, 07:18:10 PM »
0
thanks guys! I figured out the positioning, although i would be interested to learn more about how the #contposx + %x works exactly...

I think you are looking at cromes post, and below the picture where it says,
Quote
Later in a good Code your Sub doing #contposx + %x

Might there be some confusion as to what the %x means to you Twisted?  
It threw me for a loop for a second also...  but being a hack like myself, I think the ( %x ) in his explanation just means a number.  

Correct me if I'm wrong though here scripter gods... but the #contposx and #contposy always equal 0 0 relative to the button... wherever the gump is on the screen...  

Therefore... if the #contposx = 30  and the #contposy = 30, then  you are just adding 30 to each number where the button is if the #contposx & #contposy were 0.

now going back to your original post...
Code: [Select]
gosub click_offset 25 270 ; Clicks Other
wait 15
...
...
...
return

you could write the first line like this:

Code: [Select]
set %clickx #contposx + 25
set %clicky #contposy + 270
click %clickx %clicky


there are hundreds of these types of things, when asking for help you think %x means code that you don't know, when really you are just over thinking it, and programmers just use that for example cause they know what they are talking about and we don't. lol...

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 822
  • Activity:
    0.2%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: Gump changes, I'm a newbie!
« Reply #8 on: September 27, 2011, 07:38:19 PM »
0
seems like it...so does that offset work where ever the gump is on screen? it seems most the crafting scripts will work anywhere on screen with the gump, is that set the way you described? or is there a method to find the button relative to itself?
The method I described does exactly that, the gump can be anywhere on the screen... The button will always be at the same position, relative to where the gump "starts", so using #contposx/y will get that coordinate on the screen for you, and get it right every time...
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline Twisted1851Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Activity:
    0%
  • Reputation Power: 1
  • Twisted1851 has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Gump changes, I'm a newbie!
« Reply #9 on: September 27, 2011, 08:26:24 PM »
0
thanks guys! I figured out the positioning, although i would be interested to learn more about how the #contposx + %x works exactly...

I think you are looking at cromes post, and below the picture where it says,
Quote
Later in a good Code your Sub doing #contposx + %x

Might there be some confusion as to what the %x means to you Twisted?  
It threw me for a loop for a second also...  but being a hack like myself, I think the ( %x ) in his explanation just means a number.  

Correct me if I'm wrong though here scripter gods... but the #contposx and #contposy always equal 0 0 relative to the button... wherever the gump is on the screen...  

Therefore... if the #contposx = 30  and the #contposy = 30, then  you are just adding 30 to each number where the button is if the #contposx & #contposy were 0.

now going back to your original post...
Code: [Select]
gosub click_offset 25 270 ; Clicks Other
wait 15
...
...
...
return

you could write the first line like this:

Code: [Select]
set %clickx #contposx + 25
set %clicky #contposy + 270
click %clickx %clicky


there are hundreds of these types of things, when asking for help you think %x means code that you don't know, when really you are just over thinking it, and programmers just use that for example cause they know what they are talking about and we don't. lol...
Thank you sir, that makes sense. You're right, just over thinking. ++

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Gump changes, I'm a newbie!
« Reply #10 on: September 27, 2011, 08:33:26 PM »
0
Quote
Therefore... if the #contposx = 30  and the #contposy = 30, then  you are just adding 30 to each number where the button is if the #contposx & #contposy were 0.
Thats not Correct. #contposx and #contposy are the positions of 0\0 axis of your On Top Gump. So you can say: Your gump is 50\50 and you need to click 20\20 inside gump, #contposx + 20 are 70, so it would find. When u enter only 70 and the Gump going 70 70, then you will click on the 0\0 axis and not inside the gump.
using contpos 0 0 you switch your gump on the 0\0 axis of screen and when u move your mouse as example to 40 it means 40 of the gump from 0\0 Axis of Gump,too.
So if you move your gump now to 72 and then using #contposx +40 mean you going on Gump 0\0 axis +40 again.
%x is a Variable. I just used this as a spaceholder to show "Hey you need this and a variable" its no matter if you do:
Quote
set %x 30
set %Contpx #contposx + %x

or

Quote
set %Contpx #contposx + 30

I hope it helped a little bit..

Crome

Offline seeriusly

  • Full Member
  • ***
  • Posts: 219
  • Activity:
    0%
  • Reputation Power: 6
  • seeriusly has no influence.
  • Gender: Male
  • Respect: +40
  • Referrals: 0
    • View Profile
Re: Gump changes, I'm a newbie!
« Reply #11 on: September 27, 2011, 09:20:57 PM »
0
Sorry I misworded.

Therefore... if the gump is at #contposx: 30  and #contposy: 30 on your screen, then  you are just adding 30 to each coordinate where the button is within the gump.

That's what i meant to say.  And here I was trying to write in plain non-scripted human code that makes sense.
 :P

[/fail]

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 822
  • Activity:
    0.2%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: Gump changes, I'm a newbie!
« Reply #12 on: September 27, 2011, 10:03:19 PM »
0
Sorry I misworded.

Therefore... if the gump is at #contposx: 30  and #contposy: 30 on your screen, then  you are just adding 30 to each coordinate where the button is within the gump.

That's what i meant to say.  And here I was trying to write in plain non-scripted human code that makes sense.
 :P

[/fail]

That's exactly it hehe
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Tags: