Welcome, Guest. Please login or register.
Did you miss your activation email?
May 02, 2024, 09:45:28 am *

Login with username, password and session length
Pages: [1]
Print
Author Topic: Portal click macro  (Read 5250 times)
grim2594
Newbie
*
Posts: 4


View Profile
« on: June 20, 2016, 06:25:55 pm »

As requested... Here is a simple macro that will click across the screen, in the attempt to enter a portal.

To use:

1) Copy the macro text.
2) Create a new text document.
3) Name it ClickPortal.inc
4) In the main macro, that you want to use it in, have the include tag at the top: #include ClickPortal.inc
5) Wherever you want the macro to run, simply use: /call ClickPortal

Optional) If you want the main script to know if you clicked the portal or not, you can use /varset variableName ${Macro.Return}        || Then /if (${variableName }) { }

Optional) If you want to just run this as a macro, and not include it in another macro, just change the file extension from .inc to .mac and then rename Sub ClickPortal to Sub Main

Here is the code:

Code:
#event PClicked "#*#You got it open#*#"

Sub Event_PClicked
/varset clickedPortal 1
/delay 1s
/return

Sub ClickPortal
/declare attempt bool false
/declare pixelX int -500

/if (!${Defined[clickedPortal]}) {
/declare clickedPortal bool outer false
}
/varset clickedPortal 0

/echo Attempting to click the portal...

:DoClicks
/doevents
/if (!${clickedPortal}) {
/if (!${attempt}) {
/varset attempt 1
/click left center
/delay 1s
/goto :DoClicks
} else /if (${pixelX}<500 && !${clickedPortal}) {
/click left ${pixelX} -10
/varcalc pixelX ${pixelX}+10
/delay 0.2s ${clickedPortal}
/goto :DoClicks
} else / if (!${clickedPortal}) {
/echo Could not click the portal...
/return 0
}
}
/return 1
« Last Edit: June 20, 2016, 06:43:28 pm by grim2594 » Logged
cyantheblue
Newbie
*
Posts: 22


View Profile
« Reply #1 on: June 20, 2016, 06:48:17 pm »

thanks so much for posting this it works great for 6a/6b mirror (sure would work for aungish dragon door also) alot nicer then alt tabing all 12 boxxes threw
Logged
Pages: [1]
Print
Jump to:  

Recent

Stats

Members
  • Total Members: 6124
  • Latest: Havicck
Stats
  • Total Posts: 64988
  • Total Topics: 5053
  • Online Today: 153
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 1
Guests: 135
Total: 136
TinyPortal v1.0 beta 4 © Bloc