goteek.mac
While I was coding this I was pretty nervous about drawing attention to myself. I setup the debugon variable so that it would run through the motions, but not actually "/say" anything. After several hour of testing I finally issued a "/bcaa /mac goteek 40" and I just laughed my arse off as one by one with a delayed start my little minions ran off to get a quest and they all came back. Enjoy!
Please Note: that the variable debugOn is set to True, This macro only runs to Franklin Teek and back if you don't change it to FALSE
Also, the randomDelayedStart is set to 600 which is 0-60 seconds. It worked great for me, you may not like that.
Set returnHome to FALSE if you don't want them to come back
Requirements:
MQ2Nav and Mesh of POK
Description:
This macro will allow you to send your bots to Franklin Teek to get a quest.
It randomizes Franklin's location so you aren't standing on top of him and goto a different location each time.
It has a randomized delay start so you can use EQBC "/bcaa //mac goteek 80" to send your bot army without looking like a swarm
It will only accept valid numbers 20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95
Usage:
/mac goteek level#
Example: /mac goteek 40
Updates:
v1.0 - Works as intended nothing on the TODO list atm.
- - - Updated - - -
I would have been nice if I knew how to clean this up. In C I would just have made an array and used indexof. Not sure how to do that in MQ2 script.
While I was coding this I was pretty nervous about drawing attention to myself. I setup the debugon variable so that it would run through the motions, but not actually "/say" anything. After several hour of testing I finally issued a "/bcaa /mac goteek 40" and I just laughed my arse off as one by one with a delayed start my little minions ran off to get a quest and they all came back. Enjoy!
Please Note: that the variable debugOn is set to True, This macro only runs to Franklin Teek and back if you don't change it to FALSE
Also, the randomDelayedStart is set to 600 which is 0-60 seconds. It worked great for me, you may not like that.
Set returnHome to FALSE if you don't want them to come back
Rich (BB code):
| ----------------------------------------------------------------------------
| Customizable Variables
| ----------------------------------------------------------------------------
/declare debugOn bool outer True
/declare returnHome bool outer True
/declare randomDelayedStart int outer ${Math.Rand[600]}
Requirements:
MQ2Nav and Mesh of POK
Description:
This macro will allow you to send your bots to Franklin Teek to get a quest.
It randomizes Franklin's location so you aren't standing on top of him and goto a different location each time.
It has a randomized delay start so you can use EQBC "/bcaa //mac goteek 80" to send your bot army without looking like a swarm
It will only accept valid numbers 20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95
Usage:
/mac goteek level#
Example: /mac goteek 40
Updates:
v1.0 - Works as intended nothing on the TODO list atm.
Rich (BB code):
| goTeek.mac by Rogue601 v1.0
|
| Simple macro that sends you to Franklin Teek for a Quest Level you provide
|
| Requires MQ2Nav and Mesh
|
|
| Customizable Variables
| randomDelayedStart - Set this to a large number if you are using EQBC to broadcast
| returnHome - Set this to TRUE if you want the bot to comeback after getting Quest.
| debugON - Extra text. PLEASE NOTE: Macro does not "/say Level ##" when debug is on.
| it only does the movements. I did this to not look stupid while I tested :D
| -------------------------------------------------------------------------------------
| Sub Main
| -------------------------------------------------------------------------------------
Sub Main
| COMMENT : Check for POK zone or exit.
/if (!${Zone.ShortName.Equal[PoKnowledge]}) {
/echo "This macro only works in the Plane of Knowledge"
/endmac
}
| ----------------------------------------------------------------------------
| Customizable Variables
| ----------------------------------------------------------------------------
/declare debugOn bool outer True
/declare returnHome bool outer True
/declare randomDelayedStart int outer ${Math.Rand[600]}
| Fixed Variables
/declare myX float outer ${Me.X}
/declare myY float outer ${Me.Y}
/declare myZ float outer ${Me.Z}
/declare targetName string outer "Franklin Teek"
/declare targetID int outer ${NearestSpawn[npc targetable radius 10000 "${targetName}"].ID}
/declare qLevel int outer 0
/declare haveQuest bool outer False
| COMMENT : Randomized Teek Location
/declare navToX float outer ${Math.Calc[${Spawn[${targetID}].X}+${Math.Rand[25]}]}
/declare navToY float outer ${Math.Calc[${Spawn[${targetID}].Y}+${Math.Rand[25]}]}
/declare navToZ float outer ${Spawn[${targetID}].Z}
| ----------------------------------------------------------------------------
| Require Parameters - Param1 = Level, Param2 = Class
| ----------------------------------------------------------------------------
/if (${Macro.Params}==0) {
/echo GOTEEK ERROR!
/echo
/echo Example : /mac goteek 80
/endmac
} else {
/varset myX ${Me.X}
/varset myY ${Me.Y}
/varset qLevel ${Param0}
| COMMENT : To prevent embarassment we will check the level you sent
| to prevent /say Level 12 or /say Level I'm running a macro
/if (${qLevel}==20 || ${qLevel}==25 || ${qLevel}==30 || ${qLevel}==35 || ${qLevel}==40 || ${qLevel}==45 || ${qLevel}==50 || ${qLevel}==55 || ${qLevel}==60 || ${qLevel}==65 || ${qLevel}==70 || ${qLevel}==75 || ${qLevel}==80 || ${qLevel}==85 || ${qLevel}==90 || ${qLevel}==95) {
/if (${debugOn}) /echo DEBUG: Main: qLevel ${qLevel} Accepted
} else {
/echo
/echo Do you really want me to say "Level ${qLevel}" to Franklin Teek?
/echo
/echo Accepted values are:
/echo 20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95
/endmac
}
}
/if (${debugOn}) /echo GoTeek Starting in ${randomDelayedStart}
/nav reload
| ----------------------------------------------------------------------------
| RandonDelayStart - Lets wait here a random time to prevent a swarm
| ----------------------------------------------------------------------------
/if (${randomDelayedStart} > 0) /echo randomStartDelay is active. Waiting ${randomDelayedStart}
/delay ${randomDelayedStart}
:mainloop
/if (${debugOn}) /echo DEBUG: Mainloop: haveQuest : ${haveQuest}, Distance: ${Spawn[${teekID}].Distance}
| ----------------------------------------------------------------------------
| navToTeek - Goto Teek if I don't have a quest
| ----------------------------------------------------------------------------
/if (${Spawn[${targetID}].Distance} > 30 && !${haveQuest}) {
/if (${debugOn}) /echo DEBUG: Mainloop: Call NavToTeek
/call NavToTeek
| ----------------------------------------------------------------------------
| BeginGetQuest - At Teek, Get Quest
| ----------------------------------------------------------------------------
} else /if (!${haveQuest}) {
/if (${debugOn}) /echo DEBUG: Mainloop: Call BeginGetQuest
/call BeginGetQuest
| ----------------------------------------------------------------------------
| ReturnHome - At Teek, Get Quest and gohome
| ----------------------------------------------------------------------------
} else /if (${returnHome}) {
/if (${debugOn}) /echo DEBUG: Mainloop: Nav Home
/squelch /nav locxyz ${myX} ${myY} ${myZ}
/squelch /target clear
/endmac
} else {
/if (${debugOn}) /echo DEBUG: Mainloop: Macro Ending Else
/endmac
}
/delay 10
/goto :mainloop
/if (${debugOn}) /echo DEBUG: Main: Ending Mainloop
:mainend
/return
| -------------------------------------------------------------------------------------
| Sub NavToTeek - Navigate using MQ2Nav
| -------------------------------------------------------------------------------------
Sub NavToTeek
/if (${debugOn}) /echo DEBUG: NavToTeek: Navto: ${navToX} ${navToY} ${navToZ}
/squelch /nav locxyz ${navToX} ${navToY} ${navToZ}
/return
| -------------------------------------------------------------------------------------
| Sub BeginGetQuest - Get Quest and Accept it.
| -------------------------------------------------------------------------------------
Sub BeginGetQuest
/if (${debugOn}) /echo DEBUG: BeginGetQuest: Start
/target ${targetName}
/if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
/delay 10
/if (!${debugOn}) /say Level ${qLevel}
/delay 20
/notify TaskSelectWnd TSEL_AcceptButton leftmouseup
/delay 10
/keypress esc
/varset haveQuest True
}
/return
| -------------------------------------------------------------------------------------
| OnExit - Things it does when you type /endmac
| -------------------------------------------------------------------------------------
:OnExit
/end
- - - Updated - - -
I would have been nice if I knew how to clean this up. In C I would just have made an array and used indexof. Not sure how to do that in MQ2 script.
Rich (BB code):
/if (${qLevel}==20 || ${qLevel}==25 || ${qLevel}==30 || ${qLevel}==35 || ${qLevel}==40 || ${qLevel}==45 || ${qLevel}==50 || ${qLevel}==55 || ${qLevel}==60 || ${qLevel}==65 || ${qLevel}==70 || ${qLevel}==75 || ${qLevel}==80 || ${qLevel}==85 || ${qLevel}==90 || ${qLevel}==95) {