Author Topic: Script modification  (Read 655 times)

0 Members and 1 Guest are viewing this topic.

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1535
  • Activity:
    3.6%
  • Reputation Power: 19
  • The Ghost is working their way up.The Ghost is working their way up.The Ghost is working their way up.
  • Respect: +12
  • Referrals: 0
    • View Profile
Script modification
« on: March 25, 2017, 04:38:56 PM »
+3
We have new scripter that want to modifier script but don't have the basic knowledge.    Here a tool that i use to find information on gump or screen location.
The picture below show the visual information that are in plain sight but ppl are missing.

using those two line of code will make the last window. items  move to the top left screen at location 0 0.   
Code: [Select]
contpos 0 0
halt
From their you can find the Xy of the option you wish to utilize. 

using the tinker tool location
so if you see this tool option is located at 30 127.  in the script find the closest match for those number.   You might find 30 130  that mean that you found the tool option.  Now go can modified the number to the appropriated shard location.


Their is no magic, just patient.


There are 4 attachment(s) in this post. You must register and post an acceptable introduction to download
UO number bar.JPG
tinker make last OSI.JPG
tinker next page OSI.JPG
tinker toolO SI.JPG
« Last Edit: March 25, 2017, 04:51:16 PM by The Ghost »

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1535
  • Activity:
    3.6%
  • Reputation Power: 19
  • The Ghost is working their way up.The Ghost is working their way up.The Ghost is working their way up.
  • Respect: +12
  • Referrals: 0
    • View Profile
Re: Script modification
« Reply #1 on: March 28, 2017, 04:04:06 PM »
+1
Now that I know how to find the location X Y . how do I use it.   You have a few way to use those number.    I like to use this simple sub that can be call to click at a location I required.   

Here a few option that you can use to click the location you wish.

Code: [Select]
;===========  offset click sub =======
;  gosub TG_offsetclick 65 40
; gosub TG_offsetclick 30 40 f dmc
sub TG_offsetclick
; %1 #CursorX
; %2 #CursorY
; %3 %4 %5 click command  (d,dmc, f,g etc:
  set !clickx ( #contposx + %1 )
  set !clicky ( #contposy + %2 )
  click !clickx !clicky %3 %4 %5
return
;=============  end sub =======

Or you can also do it that way
Code: [Select]
set !x #contposx + 130
set !y #contposy + 400
Click !x !y
wait 20

I also see  it use 
Code: [Select]
click 130 400 f dmc

Offline cybercasper

  • Full Member
  • ***
  • Posts: 206
  • Activity:
    0%
  • Reputation Power: 3
  • cybercasper has no influence.
  • Respect: +1
  • Referrals: 1
    • View Profile
Re: Script modification
« Reply #2 on: March 29, 2017, 06:12:07 PM »
0
looking at your offset subs ok question is 1 how do you get ur offset clicks in first sub 2 in the second one how do you know that x and y should be set to that and 3 when u double click a tool it doesnt always put it in the contpos 0 0 automatically so when doing a script with menus would you put that in the script or like how i have seen other scripts it will just double click the tool and then go to work no matter where the menu is located. that is the type i would like to work with just incase i move it on accident and that way it isnt away having to move it to contpos 0 0

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1535
  • Activity:
    3.6%
  • Reputation Power: 19
  • The Ghost is working their way up.The Ghost is working their way up.The Ghost is working their way up.
  • Respect: +12
  • Referrals: 0
    • View Profile
Re: Script modification
« Reply #3 on: March 30, 2017, 01:58:24 AM »
0
Let said you want to auto accept the trade window.

you will location the X & y and find that  it 65 40 . Now if you look on the side bar of easyUO you will see that #contname have change. so with those two piece of info you can make this.   Those two line will scan and if the condition is met it will click at that location. 

Code: [Select]
if #CONTNAME = trade_gump
      gosub TG_offsetclick 65 40

Offline cybercasper

  • Full Member
  • ***
  • Posts: 206
  • Activity:
    0%
  • Reputation Power: 3
  • cybercasper has no influence.
  • Respect: +1
  • Referrals: 1
    • View Profile
Re: Script modification
« Reply #4 on: March 31, 2017, 07:00:39 AM »
0
so with that being said it seems like every script has a different offset for the same thing and all work pretty much. like you using a tinker tool compaired to a blacksmith tool i would assume would be the same offset since both would open in the same place from what i have seen. but one script for tinker and one for blacksmith the offset is different.

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1535
  • Activity:
    3.6%
  • Reputation Power: 19
  • The Ghost is working their way up.The Ghost is working their way up.The Ghost is working their way up.
  • Respect: +12
  • Referrals: 0
    • View Profile
Re: Script modification
« Reply #5 on: March 31, 2017, 07:09:16 AM »
0
I show one way to use it,   Now your curiosity should kick in.  Open a script that use tinker menu and see the number and trying to match them.    5% of scripter comment what the line does.     As you build snippet and play with it you will see all those come together.   I have just provide  some info so ppl can try to understand how the flow f a crafting sub work.   

Offline cybercasper

  • Full Member
  • ***
  • Posts: 206
  • Activity:
    0%
  • Reputation Power: 3
  • cybercasper has no influence.
  • Respect: +1
  • Referrals: 1
    • View Profile
Re: Script modification
« Reply #6 on: March 31, 2017, 07:17:56 AM »
0
:) yes it has kicked in i will def be trying to see what happens will go back to the trustly wiki page :)

Tags: