viniculum8
Active Member
Could I please get help making this perform correctly?
I am wanting to summon it, click it, click option 2 out of 3, click option 4 out of 5, wait 2 hours, summon it, hail it, accept it. Right now it's not even doing anything past the initial click.
Thanks for any insight.
Code:
#define MOVEFORWARD "num lock"
variable string Gatherer = "Name"
variable int TierSelection = 9
function SendHarvester()
{
echo Summoning Goblin
eq2execute /useability Summon Artisan's Gathering Goblin
wait 50
echo [${Time}] Sending out ${Gatherer}
call MoveToObject ${Actor[${Gatherer}].ID} 2
Actor[${Gatherer}]:DoubleClick
wait 20
call MoveToObject ${Actor[${Gatherer}].ID} 4
Actor[${Gatherer}]:DoubleClick
wait 20
EQ2UIPage[ProxyActor,Conversation].Child[composite,replies].Child[button,${TierSelection}]:LeftClick
wait 20
EQ2UIPage[ProxyActor,Conversation].Child[composite,replies].Child[button,${TierSelection}]:LeftClick
wait 30
}
function GetHarvests()
{
eq2execute /useability Summon Artisan's Gathering Goblin
wait 50
echo Getting Harvests
echo [${Time}] Receiving from ${Gatherer}
call MoveToObject ${Actor[${Gatherer}].ID} 1
Actor[${Gatherer}]:DoubleClick
wait 20
EQ2UIPage[ProxyActor,Conversation].Child[composite,replies].Child[button,1]:LeftClick
wait 20
EQ2UIPage[ProxyActor,Conversation].Child[composite,replies].Child[button,1]:LeftClick
wait 30
}
function main()
{
do
{
call SendHarvester
wait 75000
call GetHarvests
}
while 1
}
function MoveToObject(int TargetID, int Distance)
{
variable bool AutoRunning = FALSE
while ( ${Actor[${TargetID}].Distance} > ${Distance} )
{
Face ${Actor[${TargetID}].X} ${Actor[${TargetID}].Z}
if !${Me.IsMoving}
{
AutoRunning:Set[TRUE]
press MOVEFORWARD
waitframe
}
waitframe
}
if ${AutoRunning} && ${Me.IsMoving}
{
AutoRunning:Set[FALSE]
press MOVEFORWARD
wait 1 !${Me.IsMoving}
}
}
Thanks for any insight.