Author Topic: ENs - Subs - Gumps  (Read 9676 times)

0 Members and 1 Guest are viewing this topic.

Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
ENs - Subs - Gumps
« on: November 13, 2019, 03:19:53 PM »
0
ENs - Subs - Gumps
Version 6  Release Date: Sept 2020

============================================

ABOUT
   Index all open gumps, Identify all open gumps, click, move, bring to top, and otherwise manipulate or work with gumps.

Features:
This is part of ENs sub series. These subs are callable and self contained. If you call the EN_SubRegisterAndInitialize function it will register all the subs and such into memory.  Most people wont need this.

Pathing:
All Ens subs and scripts will defaulty be using this directory c:\Easyuo\ENs-Scripts\
Therefor to save on editing if you use a bunch of my scripts i recommend you create the appropriate directory and save the file their so save you from editing the header block of each of my scripts.

Gumps Recognized: 163 Note, not all button locations have been defined in the script yet.

Connection_Lost, MainMenu, Password, ErrorScreen, ShardSelect, CharacterSelection, CharacterCreation, Chat,
YesNo, InteriorDecorator, ReDeedDecoration, WallSafe, SeedBox, OldQuestLog, CheckUltimaStore, HouseMenu,
BankActions, DyeTubColorPick, RuneBook, RunicAtlas, QuestLog, VetRewardSmall, CraftingMenu, VendorMenu, Help,
VetRewardLarge, UltimaStore, TownCrier, BulletinBoard, SoulStone, ArenaStone_Main, ArenaStone_Host,
ArenaStone_Que, ArenaStone_Join, ArenaStone_Results, ArenaStone_Stats, ArenaStone_Rankings, ArenaExitBanner,
HelpStuckPickDestination, WarningViceVirtueBattle, ShardChat, CharStatus, TargetStatus, PaperDoll, Radar,
BuffBar, Container, SpellIcon, IndividualSkill, RacialAbilityBook, AbilityIcon, CombatAbilityBook, Profile,
PartyMembers, SkillList, Options, SpellBook, VendorBuySell, Moongate, PopupMenu, DaviesLocker, LoyaltyRatings
TitlesMenu, BulkOrderBook, ABulkOrder, Purchase, VendorTeleport, HousePlacementToolSmall, HousePlacementToolLarge
RedeemXferToken, PolymorphSelection, CleanupPointExchange, CityStone, CleanUpBritannia, HolidayReward, AuctionSafe
AuctionSafeInfo, HousePlaque, ShipPlacement, ScollsOfTranscendencebook, RecipeBook, VendorSearch, VendorSearching
VendorSearchResults, MapPlotCourse, AlacrityScrollBook, PowerScrollBook, TextEntry, Journal, ThiefDisguiseKit,
GateWarning, CrystalPortalBook, EditText, Book, ActivateItem, GardenBedDeed, VirtueTileDirection,
HarpsichordSongSelection, TextMessageEntry, PersonalAttendant, EngravingTool, undefined, HeritageToken,
PromotionalGiftToken, BankContents, PetTransfer, Guild, 6MonthStatIncrease,
MenuBar, unicode_bark_gump, bark_gump, dumb_gump, new_item_Prop_gump, GameAreaEdgeGump, map_gump, reticle_gump
target_gump, missile_gump, DamageNumbers_Gump

How To Use:
See top of script for callable sub definitions and posts below.
Code: [Select]
; Subs:
;   En_Gump_Index                  <- creates an array Holding Info on all gumps details  (Cycles through the gumps to do this).
;                                      Also sets var %En_Gump_Index Containing names of all gumps found | separator and var %En_Gump_IndexCount
;   EN_Gump_Count                  <- Tells you how many gumps exist.
;   EN_Gump_Identify               <- Identifys A Gump
;   EN_Gump_InitializeDefinitions  <- Initalize Gump Definitions, button locations (auto called from most functions if not already called)
;   EN_Gump_PressButton            <- Press button on open gump, return if successful
;   EN_Gump_PressButtonContinue    <- Press button on open gump  if first var is true, return if successful.
;   EN_gump_WaitFor                <- Waitforgiven gump definition to display, return success failure
;   EN_gump_WaitForContinue        <- Waitforgiven gump definition to display, if first var is true, return if successful.
;   EN_Gump_SetTop                 <- Scan all gumps looking for the Identification of a particular gump when found leave as top gump.
;   EN_Gump_FindAndSetTop          <- Past contname contsize x y - if scans gumps and sets requested to top returns true/falase
;   ENs_EventMacroGumpOpen         <- Uses event macro to open gumps that can be opened this way

; more to come....

Example of Usage:  See next post.

Future Features: tbd.

Feedback:
Feedback both negative and positive are defiantly more than welcomed and encouraged.  Same with feature requests .. no guarantee will make it into the code .. but it might.

Disclaimer/Usage License: -- See Script for full Details.

(C) 2019 All Rights Reserved JosephAJ
Commercial usage requires written permission from the author


NOTE: My scripts or any derivative of them are *not* for use in other players script/s! (Unless they specifically say they are)

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
ENs-Subs-Gumps.txt
« Last Edit: September 06, 2020, 12:53:39 PM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: ENs - Gump Subs
« Reply #1 on: November 13, 2019, 09:08:06 PM »
0
SETUP: How to use ENs Script Library for gump script access
Add below code  near top of your script (prior to call-ing any of the subs).
Code: [Select]
; ------ Setup ENs Scripting Librarys for direct access
set %EN_SubScriptPath C:\EASYUO\EUO , #spc ,  Scripts\ENs-Script , #spc , Library
set %ENs_Subs_Gumps   %EN_SubScriptPath , \ENs-Subs-Gumps.Txt       ; setup path of gump library
; ------ END OF ENs SCRIPT LIBRARY SETUP




Examples of Usage

Example of Finding Questlog gump and refusing quest and closing gump
Code: [Select]
; presuming questlog gump is already opened, and you have run Ens Library setup code above or it will do nothing.
call %ENs_Subs_Gumps  EN_Gump_SetTop                      QuestLog            ; Find quest gump
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result Questlog Refuse     ; If quest gump found click on Refuse button
call %ENs_Subs_Gumps  EN_Gump_WaitForContinue     #Result Questlog 10         ; if successful btn click wait for gump to reappear
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result Questlog Close      ; if gump reappears click on close button

Count number of open Gumps
Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_Count
display ok  Number of gumps open:  #result

Identify The Top Gump
Code: [Select]
call %ENs_Subs_Gumps EN_Gump_Identify          ; Will return not found if cannot identify
display ok  Top Gump Identified as:  #result     

Identify and List all open Gumps
Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_Index
display ok  %En_Gump_IndexCount Gumps Identified as:  %EN_Gump_Index

Logout
Code: [Select]
call %ENs_Subs_Gumps ENs_EventMacroGumpOpen N/A N/A 8 1  paperdoll_gump     ; open paperdoll Gump
call %ENs_Subs_Gumps EN_Gump_WaitFor                     PaperDoll          ; wait for paperdoll to appear
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #Result PaperDoll Logout   ; if paperdoll appeared press logout button
call %ENs_Subs_Gumps EN_Gump_WaitForContinue     #Result YesNo              ; wait for YesNo Gump to appear
call %ENs_Subs_Gumps EN_Gump_PressButtonContinue #result YesNo     Okay     ; if yesno gump appreared click Okay
« Last Edit: November 13, 2019, 10:01:11 PM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline Gaderian

  • Elite
  • *
  • *
  • Posts: 486
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +50
  • Referrals: 3
    • View Profile
Re: ENs - Subs - Gumps
« Reply #2 on: November 14, 2019, 10:03:20 AM »
0
I downloaded and looked through the code, but I have not tried it yet. I had concurrently worked on my own version of these kinds of routines.

What I noticed with my own was that each time I cycled through gumps that the order would reverse. It looks like this code tries to assign an index to each open gump. Does it keep track of that indexing or does it rebuild the indexes each time.

I am curious if it keeps track of the gumps through that index to come back to it later. Or would I need to cycle again to identify the gump I want?

It would be easy for the user to interfere with which gump has focus. This is the complexity I was trying to work out in my system.

Also many gumps have identical information. I was considering an identifier based on a couple pixels to help identify uniquely which gump I have.

Have you considered/solved gump identification and focus yet?

Thanks,
Gaderian
"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: ENs - Subs - Gumps
« Reply #3 on: November 14, 2019, 10:45:32 AM »
0
To Answer  Gaderian questions above:

Q. I downloaded and looked through the code, but I have not tried it yet. I had concurrently worked on my own version of these kinds of routines.

What I noticed with my own was that each time I cycled through gumps that the order would reverse. It looks like this code tries to assign an index to each open gump. Does it keep track of that indexing or does it rebuild the indexes each time.

I am curious if it keeps track of the gumps through that index to come back to it later. Or would I need to cycle again to identify the gump I want?

A. Yes The order of the gumps is constantly changing depending, as each gump is brought to top or opened/closed all the other gumps position in the "Gump Stack" change.    What I do in this code is with the Sub EN_Gump_Index is record all the open gumps and their relevant values, size, name etc etc, at that moment in time.    But this index is not currently used for anything other than cataloging what is open at the time it is run,  any reference index numbers would be useless, if any time has passed or actions taken then  in all probability the gump is no longer in that position in the stack.   To  access a particular gump in my code use the  sub EN_Gump_SetTop  function, which cycles the gump stack looking for a particular gump.



Q. It would be easy for the user to interfere with which gump has focus. This is the complexity I was trying to work out in my system.

A. In my code, as above use use the  sub EN_Gump_SetTop  to set the focus to the gump you want.


Q. Also many gumps have identical information. I was considering an identifier based on a couple pixels to help identify uniquely which gump I have.

A. Yes That is exactly what I plan to do.  For example to Identify the crafting gumps, to a unique kind a pixel scan is required.   Also to differentiate the spell/ability gumps a pixel scan is needed.   I have not yet implemented this parts of the library.  But have partially mapped out the functionality.

These are the detection methods I currently use, all are fully implemented except the 2 pixel scan options,  this is also the order of detection:       UniqueContkind, UniqueGumpName, LoginSizeName, NoLoginSizeName, ContkindPixel, LoginSizeNamePixel

A note on contkind,  Contkinds are learnt by the script as it identify's gumps, it remembers contkinds.  It is thierfor important to have a secondary detection method if gump has uniquecontkind or when possible not to use it at all.



Q. Have you considered/solved gump identification and focus yet?

A. Focus is fully solved.   Identification is solved but not fully implemented.   All button positions are not fully mapped.


On  a side note,  I wrote most these gump subs from 2008-2012, the button and identification code is from that time, I just wrapped it in new code to utilize the possibilities the new "event conttop" command offers.
« Last Edit: November 14, 2019, 10:59:15 AM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs - Subs - Gumps
« Reply #4 on: November 14, 2019, 09:00:02 PM »
0
Thx En's     

I have tested the  call %ENs_Subs_Gumps  EN_Gump_SetTop                      QuestLog            ; Find quest gump
And it work like I charm for my application.     

Thx alot

Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: ENs - Subs - Gumps
« Reply #5 on: November 15, 2019, 09:25:13 AM »
0
Thx En's     

I have tested the  call %ENs_Subs_Gumps  EN_Gump_SetTop                      QuestLog            ; Find quest gump
And it work like I charm for my application.     

Thx alot

Did you try:
Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_SetTop        QuestLog             ; Find quest gump
call %ENs_Subs_Gumps  EN_Gump_PressButton   Questlog  Accept     ; Accept the quest.
« Last Edit: November 15, 2019, 09:31:08 AM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: ENs - Subs - Gumps
« Reply #6 on: November 15, 2019, 09:57:49 AM »
0
Or Ghost if you don't want the complexity of  CALLing  subs,  go ahead and slot the below sub right into your code.  It will perform the same function without all the bells and whistles.  And it is actually faster, so I may change some of the other code.. ummm

Code: [Select]
gosub  EN_Gump_FindAndSetTop  generic_gump 507 496     ; quest log  - contname sizex sizey
if #result
   display ok found the gump and set it to top.
if ! #result
   display ok  Boohoo didnt find the gump... wtf back to the drawing board.
halt


sub EN_Gump_FindAndSetTop  ; Contname contsizex contsizey
  set !ENGumpLPC #LPC
  set #lpc 1000
  set !GumpCount 0
  Repeat
    set !thiscontposx  #Contposx
    set !thiscontposy  #Contposy
    set !thiscontsizex #Contsizex
    set !thiscontsizey #Contsizey
    set !thiscontkind  #Contkind
    set !thiscontname  #Contname
    set !thiscontid    #Contid
    set !thisconttype  #Conttype
    set !thisconthp    #Conthp
    event conttop !GumpCount
    set !GumpTheSame  ( !thiscontposx  = #Contposx && !thiscontposy = #Contposy && !thiscontsizex = #Contsizex && !thiscontsizey = #Contsizey && !thiscontkind = #Contkind && !thiscontname = #Contname && !thiscontid = #Contid && !thisconttype = #Conttype && !thisconthp = #Conthp ) && !GumpCount <> 0
    set !GumpCount !GumpCount + 1
   until ( #contname = %1 && #Contsizex = %2 && #Contsizey = %3 ) || !GumpTheSame ; || !GumpCount = 100
  set #lpc !ENGumpLPC
return  ( #contname = %1 && #Contsizex = %2 && #Contsizey = %3 )   ; result = did we find it


« Last Edit: November 15, 2019, 10:05:06 AM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: ENs - Subs - Gumps
« Reply #7 on: November 15, 2019, 12:56:52 PM »
0
Version 3

- Some code corrections and speedup of some functions
- Addition of new sub: EN_Gump_FindAndSetTop   (a sub that can be used without the library code)
- New gump detections VendorBuySell, Moongate, PopupMenu
   (note popup menu detects context menu popups this not 100% complete as they come in tons of sizes)


Some new example code... open moongate and then...
Code: [Select]
; ------ Setup ENs Scripting Librarys for direct access
set %EN_SubScriptPath C:\EASYUO\EUO , #spc ,  Scripts\ENs-Script , #spc , Library
set %ENs_Subs_Gumps   %EN_SubScriptPath , \ENs-Subs-Gumps.Txt       ; setup path of gump library
; ------ END OF ENs SCRIPT LIBRARY SETUP

call %ENs_Subs_Gumps  EN_Gump_SetTop                      MoonGate            ; Find Moongate Gump
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Trammel
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Felucca
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Ilshenar
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Malas
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Tokuno
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate TerMur

call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Tokuno
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Malas
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Ilshenar
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Felucca
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate Trammel

call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City1
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City2
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City3
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City4
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City5
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City6
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City7
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City8
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City9

call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City9
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City8
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City7
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City6
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City5
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City4
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City3
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City2
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result MoonGate City1
« Last Edit: November 15, 2019, 12:59:25 PM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs - Subs - Gumps
« Reply #8 on: November 15, 2019, 03:16:26 PM »
0
Did you try:
Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_SetTop        QuestLog             ; Find quest gump
call %ENs_Subs_Gumps  EN_Gump_PressButton   Questlog  Accept     ; Accept the quest.
[/quote]

Yes I try it  and it work .  , instead of use my offset click now I can just call your sub


Question
Now to remove my two offset click to claim the quest

How to you accept the turn in quest.  I have two gump  one to continue and one to accept the reward.
I try
 call %ENs_Subs_Gumps  EN_Gump_PressButton   Questlog  Accept  Accept   ( No luck )

I try
 call %ENs_Subs_Gumps  EN_Gump_PressButton   Questlog  Accept
 call %ENs_Subs_Gumps  EN_Gump_PressButton   Questlog  Accept   ( Not luck)

I try
 call %ENs_Subs_Gumps  EN_Gump_PressButtoncontinue   Questlog  Accept ( no luck)


Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: ENs - Subs - Gumps
« Reply #9 on: November 15, 2019, 04:37:06 PM »
0
Well you are pressing two different buttons.  CONTINUE then ACCEPT.   The button names are the same as on the gump for the most part look at the subs script and look at the button definitions to find exact names.   Right now you cannot daisy chain button presses on a single line although maybe a potential addition, and you must wait to reload gumps that close after pressing button and reopen like the quest gump even if its a split second.

Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_SetTop                      QuestLog            ; Find quest gump
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result Questlog Continue   ; If quest gump found click on Refuse button
call %ENs_Subs_Gumps  EN_Gump_WaitForContinue     #Result Questlog 10         ; if successful btn click wait for gump to reappear
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result Questlog Accept     ; if gump reappears click on Accept button

The difference between the _PressButton and _PressButtonContinue subs is the the _PressButtonContinue sub takes as its first parameter a Var with Value of True Or False, if the value is false the sub does nothing.    So the above code example is the same as this code below but much shorter

Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_SetTop                      QuestLog            ; Find quest gump
if #result = #true
   call %ENs_Subs_Gumps  EN_Gump_PressButton Questlog Continue   ; If quest gump found click on Refuse button
if #result = #true
  call %ENs_Subs_Gumps  EN_Gump_WaitFor Questlog 10         ; if successful btn click wait for gump to reappear
if #result = #true
  call %ENs_Subs_Gumps  EN_Gump_PressButton Questlog Accept     ; if gump reappears click on Accept button


« Last Edit: November 15, 2019, 04:42:36 PM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs - Subs - Gumps
« Reply #10 on: November 15, 2019, 05:40:39 PM »
0
So  I have this working ATM

Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_SetTop  QuestLog  ; Find quest gump
 gosub Waitingformygump contname generic_gump contize %SummarySize 50
 gosub offsetclick 130 460
Wait 20
 gosub offsetclick 130 460
wait 20
return

I replace  with this  and it not working

Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_SetTop                      QuestLog            ; Find quest gump
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result Questlog Continue   ; If quest gump found click on Refuse button
call %ENs_Subs_Gumps  EN_Gump_WaitForContinue     #Result Questlog 10         ; if successful btn click wait for gump to reappear
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result Questlog Accept     ; if gump reappears click on Accept button
Return
it is click accept window  but  not the accept window.

Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: ENs - Subs - Gumps
« Reply #11 on: November 15, 2019, 06:31:34 PM »
0
So  I have this working ATM

Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_SetTop  QuestLog  ; Find quest gump
 gosub Waitingformygump contname generic_gump contize %SummarySize 50
 gosub offsetclick 130 460
Wait 20
 gosub offsetclick 130 460
wait 20
return

Looking at your above code you click in position 130 460 twice...   looking at my button definitions  that equals Accept button
    Gosub EN_Gump_DefineButtons QuestLog                 Accept 130 461 Continue 318 438 Refuse 346 463 Previous 170 441 Close 352 465

So try below:  (Note you must wait for gump to reload after each button press, probably why your first attempt 2 posts back failed, it clicked too fast...)
Code: [Select]
call %ENs_Subs_Gumps  EN_Gump_SetTop                      QuestLog            ; Find quest gump
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result Questlog Accept
call %ENs_Subs_Gumps  EN_Gump_WaitForContinue     #Result Questlog       
call %ENs_Subs_Gumps  EN_Gump_PressButtonContinue #Result Questlog Accept   
wait 20  ; because you have it in your code above :)
Return
« Last Edit: November 15, 2019, 06:37:01 PM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs - Subs - Gumps
« Reply #12 on: November 15, 2019, 06:45:09 PM »
0
Damm me,     I  was changing the wrong call and arriving to the wrong conclusion.   


With that small mod it cycle the reward porperly.

Thx again

Offline Endless NightTopic starter

  • Global Moderator
  • *
  • *****
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: ENs - Subs - Gumps
« Reply #13 on: November 18, 2019, 05:15:51 PM »
0
Version 4

Additional gumps recognized : DaviesLocker, LoyaltyRatings,  TitlesMenu, BulkOrderBook, ABulkOrder, Purchase, VendorTeleport, HousePlacementToolSmall, HousePlacementToolLarge,  RedeemXferToken, PolymorphSelection, CleanupPointExchange, CityStone, CleanUpBritannia, HolidayReward, AuctionSafe, AuctionSafeInfo, HousePlaque, ShipPlacement, ScollsOfTranscendencebook, RecipeBook, VendorSearch, VendorSearching, VendorSearchResults, MapPlotCourse, AlacrityScrollBook, PowerScrollBook, TextEntry, Journal, ThiefDisguiseKit, undefined

Gumps Identified: 134
« Last Edit: November 19, 2019, 08:55:59 AM by Endless Night »
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: ENs - Subs - Gumps
« Reply #14 on: November 22, 2019, 10:34:40 AM »
0
 I test/trial the gate traveling.   
The moongate option work find.   Once I move to the Char gate, I notice  that when we travel in Fel we havea gate warning popup.  So I follow your logic and add this to Ver4.

Gate warning size
Quote
gosub EN_GUMP_Define        CityStone                  #true    420 120  generic_gump             LoginSizeName
    gosub EN_GUMP_Define        GateWarning                #true    420 280  generic_gump             LoginSizeName   ;<------------------  New
    gosub EN_GUMP_Define        HouseMenu                  #true    420 440  generic_gump             LoginSizeName



The okay click
Code: [Select]
Gosub EN_Gump_DefineButtons Moongate                   RoyalCity  210 44 ValleyOfEodon 210 69

    Gosub EN_Gump_DefineButtons gatewarning                Okay 25 260 Cancel 255 260  ; <----------------

    Gosub EN_Gump_DefineButtons CleanupPointExchange       Deposit 30 118 Withdraw 30 138



The okay work fine but the cancel dont't seen to work
That where I'm ATM

Tags: