How to automatically click an item in a RewardWindow that offers choices?

mistahmikey

Active Member
Been banging my head against this most of the day. Using the following function:

Code:
function DumpLabels(string startElement)
{
	variable int childIndex
	variable int childCount

	childIndex:Set[0]
	childCount:Set[${${startElement}.NumChildren}]

	echo "${startElement}" - Type: ${${startElement}.Type}, Label: ${${startElement}.Label}

	while ${childIndex:Inc} <= ${childCount}
	{
		variable string elementType

		elementType:Set[${${startElement}.ChildType[${childIndex}]}]

		variable string nextElement

		nextElement:Set["${startElement}.Child[${elementType},${childIndex}]"]

		call DumpLabels "${nextElement}"
	}
}
and calling it as follows:

call DumpLabels "EQ2UIPage[Journals,JournalsQuest].Child[Page,TabPages]"

the following output is produced:

Code:
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack] - Type: Page, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,1] - Type: Page, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,2] - Type: Text, Label: Collection Reward!
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,3] - Type: Text, Label: [DEVL]You have been offered the quest
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,4] - Type: Text, Label: Description
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Composite,5] - Type: Composite, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,6] - Type: Text, Label: Reward
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,7] - Type: Text, Label: Experience
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,8] - Type: Text, Label: Unlocked Kitchen
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,9] - Type: Page, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Scrollbar,10] - Type: NULL, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,11] - Type: Page, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,12] - Type: Text, Label:
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,13] - Type: Text, Label: The Freeport Militia +20
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Text,14] - Type: Text, Label: Select one of the following
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Scrollbar,15] - Type: NULL, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16] - Type: Page, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1] - Type: Page, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Icon,1] - Type: Icon, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Text,2] - Type: Text, Label: Missing item name
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Image,3] - Type: NULL, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Icon,4] - Type: Icon, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Icon,5] - Type: Icon, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Text,6] - Type: Text, Label: Missing item name
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Text,7] - Type: Text, Label: Missing item name
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Image,8] - Type: NULL, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1].Child[Image,9] - Type: NULL, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Button,17] - Type: Button, Label: Accept Quest
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Button,18] - Type: Button, Label: Decline
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Button,19] - Type: Button, Label: Select
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,20] - Type: Page, Label: NULL
RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,21] - Type: Page, Label: NULL
Problem is, there does not appear to be any widget I can "click" to make the choice. I figured the choices are probably associated with the "Icon" types under RewardWindow.ToEQ2UIPage.Child[Page,RewardPack].Child[Page,16].Child[Page,1]. I was hoping I might be able to use the LeftClick method on them (in the xml file they have an attribute TreatAsButton="true"), but no soap - crasheroo.

So has anyone been able to successfully program the choice selection?
 

Amadeus

The Maestro
Staff member
The EQ2UIPage TLO doesn't work for windows that are of a particular type (primarily the ones that have specific datatypes like rewardwindow, choicewindow, replydialog, etc.)

Code:
[/FONT]November 26, 2006 -- By Amadeus
[ISXEQ2-20061121c.exe]
* Added a new TLO:
  ~ RewardWindow   (returns an 'eq2uipage' datatype object representing any reward
                    window that might be open.  The xml file for this object is 
                    eq2ui_popup_rewardpack.xml)
    (NOTE:  If ${RewardPack} is NULL, then you do not have a pending quest reward.)
    (NOTE:  Using any other button besides "Receive", when you have a reward item
            waiting, is not advised.)
[B]    (NOTE:  At the moment, this supports only receiving rewards when there are no[/B]
[B]            "choice" to be made.  That may be added in the future.
[/B]
Since Nov 2006 no one has ever come up with a reason for there to be a choice here, nor has it ever been requested. I played the game hard for years and never saw a reason to add any additional features either. And, with all of the fancy shit that Ogrebot does, not one has requested it there either.

So, what exactly are you wanting to do that you need this for? Is it really worth all this work and energy?


Honestly, if I were doing ISXEQ2 from scratch right now, I'm sure all of the UI stuff would make a lot more sense and probably work a lot better (because I know more now than I did in 2006.) But, right now I'm not really keen on revamping it for a game as old (and near to being replaced by EQ3) as this one. If a lot of folks really clamored for a feature, or if I could see the widespread usage for it, I would consider it. But, if it's just for a very specific purpose that really isn't something that would be widely used, then I'm thinking it's not worth the long hours it would take to do it.
 

Amadeus

The Maestro
Staff member
By the way, if you want to see an extension with the UI interaction done well, come visit isxAion and play a better MMO: Aion. isxAion already has just about everything that ISXEQ2 has ..lol. It's just missing some of the fluffy stuff like vendor interaction, crafting, etc. But, more of the combat stuff is in and working well.
 

mistahmikey

Active Member
I want to automate buying collections from the broker and turn them into the Collection NPC as they are completed, so I want to be able to dismiss all types of Reward windows that result so they don't pile up (not sure if there is a limit on this like there is with Examine windows). I have most of this working, but am currently stymied by 1) the ExamineItemWindow problem I have described elsewhere and 2) not being able to dismiss a Reward window with selections. The latter is not a show stopper, but the former is.

None of this is critical, its just something I thought would be fun to do and useful as hell to auto-level toons up to about 20 or so. I am trying to get into more sophisticated scripting, and this project presented a number of challenges that I have enjoyed solving. I am quite ignorant on EQ2 UI development and the available widget structure, so its slow going for me in that arena. Just hoping to jump-start my learning process by leveraging the experience-base this forum provides, since my time to spend on these projects is limited (as is yours and many others).

So, if my requests for features or information are something you (or others) can provide, sweet. If not, I will just shelve this project and move on to other things.

Thanks :)
 
Top Bottom