LDoN info

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

dravidiankayne
Chicken Little
Posts: 61
Joined: Mon Mar 29, 2004 3:14 pm

LDoN info

Post by dravidiankayne » Tue Jul 06, 2004 9:06 pm

Okay, there's a few things I'd like to know about LDoN info

1) The little blue mark on your compass that points to your LDoN spot....is there a way to track that in MQ2 so I can make an autorun macro to get me to the destination?

2) The adventure recruiting window: Is there a way to know what text has been put in there, so I can write a macro to keep trying to get a collection adventure, etc. I saw this question asked on another post, but nobody responded to it, so I'll ask it again.

And I think that's all the questions I have right this second.....if I think of more I'll edit my post.

Thanks.

addicted2eq
orc pawn
orc pawn
Posts: 27
Joined: Wed Jun 02, 2004 12:17 pm

Post by addicted2eq » Wed Jul 07, 2004 10:13 am

Great Idea - its a pain to sit there 10-15 minutes sometimes trying for a specific adventure type.

The auto run part should be easy - All the camps are at specific locations. Once you know the name of the dungeon you need to goto - you could use advpath ... to get you there.

dravidiankayne
Chicken Little
Posts: 61
Joined: Mon Mar 29, 2004 3:14 pm

Post by dravidiankayne » Thu Jul 08, 2004 4:44 pm

Okay I've found this:

<code> ${Window[AdventureRequestWnd].Child[AdvRqst_NPCText].Text} </code>

This will return what text is in that box. If you run this while not in an adventure it return "You are not currently assigned to an adventure". If you run this when you have requested an adventure it returns " "......how odd....nothing.

Any help would be nice.

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Thu Jul 08, 2004 9:36 pm

it's [code] [/code]

;)

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Fri Jul 09, 2004 3:07 am

Okay, I got a couple questions that seem relevant. Please post if you know the exact answers.

1) What is the exact lockout time between missions? (It seems to be 40 - 45 minutes, but what is it exactly?)
2) What is the exact time between requesting adventures? (It seems to be around 30 min, but again does anyone know what it is exactly?)
3) Did you ever find the exact window element David?

Im thinking this could be a very nice macro...

-Check for a global Adventure Timer and a local Request Timer. If either exist, wait until they are up.
-Request an Adventure & Set the local Request Timer
-If its an adventure type you want: accept, set the global Adventure Timer, and exit.
-If not: decline, set the local Request timer, and loop.

Maybe add code to target the correct Adventure Recruiter depending on which zone you are in, and move closer if necessary.

dravidiankayne
Chicken Little
Posts: 61
Joined: Mon Mar 29, 2004 3:14 pm

Post by dravidiankayne » Fri Jul 09, 2004 5:34 am

Okay, the time between requesting adventures is 60 seconds. I'm not sure if I'm thinking the same thing you are, but I'm thinking about the time it takes between you clicking on 'Request Adventure', clicking 'Decline' because you didnt' want that one, and reclicking 'Request Adventure'. That's the one that's 60 seconds.

and yes:

Code: Select all

 ${Window[AdventureRequestWnd].Child[AdvRqst_NPCText].Text} 
this is the exact spot for the text in the request adventure window. However it comes up blank if you type this. I think this is because the text is longer than the max allowed by MQ2. This could probably be fixed by a programmer looking into the code and just changing a single value.

and since the only type of adventure's I'd accept are Collection or Slaughter, I'd probably think of doing something like this:

Code: Select all

:Loop
/target ADVENTURERECRUITER
/click right target
/delay 1s
/notify AdventureRequestWnd AdvRqst_RequestButton leftmouseup
/delay 2s
/declare nTemp int local 0
/for nTemp 0 to 100
     /if ( ${Window[AdventureRequestWnd].Child[AdvRqst_NPCText].Text.Find[${nTemp}]} ) {
        /notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
        /endmacro
    }
/next nTemp
/notify AdventureRequestWnd AdvRqst_DeclineButton leftmouseup
/delay 600
/goto :Loop
What this will do is open the request window, click request. Then it will search the text for a string in the number range of 0-99 (or 100....not sure if it's included, but doesn't matter since highest slaughter is around 60), since only Slaughters and Collections have numbers in their text. If it finds one of those numbers it clicks the accept button and ends the macro, otherwise it clicks decline, waits 60 seconds, and tries again.

In essence this code should work perfectly, HOWEVER, since the text seems to be too long and a blank is returned it won't work. If anyone knows where the variable is that needs changing to fix this, or if it's another problem, please post it.

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Fri Jul 09, 2004 6:11 am

Okay I took a stab at this last night. It doesnt seem to be working because of the problem you pointed out about the NPCText, but use anything you want.

Code: Select all

| LDON.mac: Macro to Request LDON Adventures of the Risk/Type desired as soon as they are available.
| usage:    /mac LDON [Normal|High] [Collect|Slay|Kill|Save|Any]
| Defaults: /mac LDON [Normal] [Collect|Slay]
| Examples: /mac LDON Normal Any - would accept any Normal Risk mission.
|           /mac LDON High Collect|Slay - would accept the first High Risk Collect or Slay (Slaughter) mission.
| Note:     types can be defined in any order, without spaces.  Risk must be set if type is to be given.

#define ReqTime 600
#define AdvTime 24000

Sub Main
   /declare Risk string outer Normal
   /if (${Param0.Equal[High]} || ${Param0.Equal[Hard]}) /varset Risk High

   /declare TakeCollect int outer 1
   /declare TakeSlay int outer 1
   /declare TakeKill int outer 0
   /declare TakeSave int outer 0
   /declare TextCollect string outer "Search Phrase Goes Here"
   /declare TextSlay string outer "Search Phrase Goes Here"
   /declare TextKill string outer "Search Phrase Goes Here"
   /declare TextSave string outer "Search Phrase Goes Here"
   /declare AdvText string outer


   /if (${Defined[Param1]}) {
      /if (${Param1.Find[Collect]} || ${Param1.Find[Any]}) {
         /varset TakeCollect 1
      } else {
         /varset TakeCollect 0
      }
      /if (${Param1.Find[Slay]} || ${Param1.Find[Slaughter]} || ${Param1.Find[Any]}) {
         /varset TakeSlay 1
      } else {
         /varset TakeSlay 0
      }
      /if (${Param1.Find[Kill]} || ${Param1.Find[Any]}) {
         /varset TakeKill 1
      } else {
         /varset TakeKill 0
      }
      /if (${Param1.Find[Save]} || ${Param1.Find[Rescue]} || ${Param1.Find[Any]}) {
         /varset TakeSave 1
      } else {
         /varset TakeSave 0
      }
   }

   /if (${Group}<3) {
      /echo You must be in a group of 3 or more to Adventure.  Exiting 8(
      /endmacro
   }
   /if (!${Me.GroupLeader}) {
      /echo You must be the leader of your group to Request Adventures. Exiting 8(
      /endmacro
   }

   /call TargetRecruiter
   /call MoveToMob 15
   /call RequestAdv
|  /call FaceBlueLine * Optional Code To Add

/endmacro


Sub TargetRecruiter
   /if (${Zone.ShortName.Equal[Sro]}) {
      /target npc Kallei
   } else /if (${Zone.ShortName.Equal[Everfrost]}) {
      /target npc Mannis
   } else /if (${Zone.ShortName.Equal[Butcher]}) {
      /target npc Xyzelauna
   } else /if (${Zone.ShortName.Equal[Ecommons]}) {
      /target npc Periac
   } else /if (${Zone.ShortName.Equal[Nro]}) {
      /target npc Escon
   } else {
      /echo You must run this macro from: North Ro, South Ro, Everfrost, Butcherblock, or East Commons.  Exiting now.
      /endmacro
   }
/return

Sub RequestAdv
   /declare ReqTimer timer local 0
   /if (!${Defined[AdvTimer]}) /declare AdvTimer global 0
   /face fast
   :RequestLoop
   /if (!${AdvTimer} && !${ReqTimer}) {
      /click right target
      /delay 30 ${Window[AdventureRequestWnd].Open}
      /if (${Risk.Equal[High]}) {
         /notify AdventureRequestWnd AdvRqst_RiskCombobox listselect 2
         /delay 10
      }
      /notify AdventureRequestWnd AdvRqst_RequestButton leftmouseup
      /delay 20
      /varset AdvText ${Window[AdventureRequestWnd].Child[AdvRqst_NPCText]}
      /if (${AdvText.Find[${TextCollect}]} && ${TakeCollect}) {
         /notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
         /varset AdvTimer AdvTime
         /return
      } else /if (${AdvText.Find[${TextSlay}]} && ${TakeSlay}) {
         /notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
         /varset AdvTimer AdvTime
         /return
      } else /if (${AdvText.Find[${TextKill}]} && ${TakeKill}) {
         /notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
         /varset AdvTimer AdvTime
         /return
      } else /if (${AdvText.Find[${TextSave}]} && ${TakeSave}) {
         /notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
         /varset AdvTimer AdvTime
         /return
      } else {
         /notify AdventureRequestWnd AdvRqst_DeclineButton leftmouseup
         /varset ReqTimer ReqTime
         /delay 20
         /notify AdventureRequestWnd 0 close
      }
   }
   /delay 10
   /goto :RequestLoop
/return

Sub MoveToMob(int MoveRange)

   /declare RangeFast int local ${Math.Calc[${MoveRange}+4]}
   /declare RangeMax int local ${Math.Calc[${MoveRange}+1]}
   /declare RangeMin int local ${Math.Calc[${MoveRange}-2]}

   /declare MyXLOC int local ${Int[${Me.X}]} 
   /declare MyYLOC int local ${Int[${Me.Y}]} 
   /declare DistanceTimer timer local 10
    
   /doevents 
    
   :MovementLoop 

   /if (${Target.ID}) /face fast

   /if (${Int[${Target.Distance}]}>=${RangeFast}) { 
      /keypress forward hold 
   } else /if (${Int[${Target.Distance}]}>${RangeMax}) { 
      /keypress forward 
   } else /if (${Int[${Target.Distance}]}<${RangeMin}) { 
      /keypress back 
   } 

   /if (!${DistanceTimer}) { 
      /if ((${MyXLOC}==${Int[${Me.X}]})&&(${MyYLOC}==${Int[${Me.Y}]}) && ${Target.Distance}>${MoveRange}) /call HitObstacle 
      /varset MyXLOC ${Int[${Me.X}]} 
      /varset MyYLOC ${Int[${Me.Y}]} 
      /varset DistanceTimer 10 
      /goto :Movementloop 
   } 
   /if (${Int[${Target.Distance}]}>=${RangeMin}) /goto :MovementLoop 

/return 

Sub HitObstacle

   /if (${Corpse.Open}) /notify LootWnd DoneButton leftmouseup

   /echo Obstacle hit, moving around it... 
   /keypress forward 
   /keypress back hold 
   /delay 5 
   /keypress back 
   /if (${Math.Rand[100]}+1>50) { 
     /keypress strafe_right hold 
   } else { 
     /keypress strafe_left hold 
   } 
   /delay 5
   /keypress strafe_right 
   /keypress strafe_left 
   /keypress forward hold

   /delay 1
   /keypress jump

/return
If you know you only want collects and slaughters and want to hardcode it to accept only those 2 types, I would just look for a 20 to 60 in the text (if we can get it working) since collects range 20 to 30 and slaughters range 50 to 60.

Code: Select all

/for nTemp 20 to 60

dravidiankayne
Chicken Little
Posts: 61
Joined: Mon Mar 29, 2004 3:14 pm

Post by dravidiankayne » Fri Jul 09, 2004 10:22 pm

Okay I found where the array size for strings is, it was set at 2048. I think this is plenty large enough, but just in cast I changed mine to 10000, then recompiled. It still shows the same blank when I run the command.

Here's the strangest part. If I run the command without being in an adventure OR without being in the adventure request window, it tells me '[MQ2] You are not currently assigned to an adventure'. Now if I go to the recruiter and click on him/her and try it again, whether before or after I press Request Adventure, I get '[MQ2]' How very odd that it would return something before and not after.

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sat Jul 10, 2004 12:51 am

Must be a different target window for the full text
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

dravidiankayne
Chicken Little
Posts: 61
Joined: Mon Mar 29, 2004 3:14 pm

Post by dravidiankayne » Sat Jul 10, 2004 1:06 am

Alright I'll start trying everything possible....if anyone finds anything before me, post it plz!

EDIT

Alright, after trying for a bit I decided to cheat and search the EQ folder for all instances of 'STMLbox item' and I found every listed STML box in the EQ UI files. After finding them I wrote this little macro below to test every one to see what text was in each one. HOWEVER, after doing this I stlill find myself at step 1, for none of these returned anything I wanted.

Code: Select all

Sub Main
	/declare strWindow string global
	/declare strChild string global

	
	/varset strWindow AAWindow
	/varset strChild AAW_Description
	/call Check
	/varset strWindow AdventureRequestWnd
	/varset strChild AdvRqst_NPCText
	/call Check
	/varset strWindow BazaarWnd
	/varset strChild BZW_BazaarText
	/call Check
	/varset strWindow BugReportWnd
	/varset strChild BUGW_Prompt
	/call Check
	/varset strWindow ChatWindow
	/varset strChild CW_ChatOutput
	/call Check
	/varset strWindow CombatSkillsSelectWindow
	/varset strChild CSSW_SkillDescriptionStmlBox
	/call Check
	/varset strWindow ConfirmationDialog
	/varset strChild CD_TextOutput
	/call Check
	/varset strWindow GMAttentionTextWnd
	/varset strChild GATW_GmTextBox
	/call Check
	/varset strWindow GuildManagementWnd
	/varset strChild GT_MOTDViewer
	/call Check
	/varset strWindow HelpWnd
	/varset strChild HELP_Display
	/call Check
	/varset strWindow ItemDisplay
	/varset strChild IDW_ItemDescription
	/call Check
	/varset strWindow JournalNPCWnd
	/varset strChild CJNPC_Text
	/call Check
	/varset strWindow JournalTextWnd
	/varset strChild CJTXT_Text
	/call Check
	/varset strWindow LeadershipWnd
	/varset strChild LEW_Description
	/call Check
	/varset strWindow NoteWindow
	/varset strChild NW_NoteDisplay
	/call Check
	/varset strWindow RaidWindow
	/varset strChild RAID_MOTDViewer
	/call Check
	/varset strWindow StoryWnd
	/varset strChild STORY_Display
	/call Check
	/varset strWindow SystemInfoWnd
	/varset strChild SystemInfo_TextOutput
	/call Check
	/varset strWindow TextMessageWindow
	/varset strChild TM_Outpu
	/call Check
	/varset strWindow TicketWindow
	/varset strChild TW_KBArticleBox
	/call Check
	/varset strWindow TicketWindow
	/varset strChild TW_NTInstructionsBox
	/call Check
	/varset strWindow TicketWindow
	/varset strChild TW_OTCommentsBox
	/call Check
	/varset strWindow TipWnd
	/varset strChild TIP_Display
	/call Check
	/varset strWindow TributeBenefitsWnd
	/varset strChild TBW_Description
	/call Check
	/varset strWindow TributeMasterWnd
	/varset strChild TMW_Description
	/call Check

	/endmacro

Sub Check
	/if ( !${Window[${strWindow}].Child[${strChild}].Text.Equal[NULL]} ) {
		/echo Window[${strWindow}] - Child[${strChild}]
		/echo ${Window[${strWindow}].Child[${strChild}].Text}
		/echo ======================
	}
	/return
Unless there is some form of window that is not listed in the EQ UI files (which would be odd considering the EQ UI files place every object in the EQ game), I am utterly stumped. I've come to a conclusion that MQ2 just simply isn't yet set up to retreive the text from LDoN adventure requests.

Please correct me if wrong!~

dravidiankayne
Chicken Little
Posts: 61
Joined: Mon Mar 29, 2004 3:14 pm

Post by dravidiankayne » Mon Jul 12, 2004 6:10 pm

I'm stumped