WOW you are awesome mhaendler !
thank you very much, i updated the VQ function with this and it worked perfectly:
Code:
Func VQ()
CurrentAction("Waiting to really complete load")
rndslp(10000)
CurrentAction("Poping Legionnaire thanks to mhaendler !!")
UseLegionStone()
as i understand the function: to scan all the items one by one in the 4 bags until you find the idem with the code 37810 (previously define with a constant). Once you find it you use it with the fonction UseItem.
that's really good. simple but very effective.
For the lockpicks, i just excluded the 4th bag from the selling function. that wait i can keep idems on by characters and i'm sure they wont be sold.
My next step was to find a way to open chests and pick up loots during the runs. So i spent a bit of time this moring trying to find a solution to open chests during VQ and i found a way to do it.
i'm not a coder so my solution might be kinda trashy to some of you, but i didn't wanted to use whatever pepole post but i wanted to contribute :)
Here is my solution :
i picked up this code from the chest bot and made it complient with the luxon bot ($DeadOnTheRun = 0 vs Not $WeAreDead for exemple) :
Code:
Func DoChest()
If $DeadOnTheRun = 0 then CurrentAction("Going To open This chest")
If $DeadOnTheRun = 0 then GoSignpost(-1)
local $TimeCheck = TimerInit()
If $DeadOnTheRun = 0 then $chest = GetCurrentTarget()
If $DeadOnTheRun = 0 then $oldCoordsX = DllStructGetData($chest, "X")
If $DeadOnTheRun = 0 then $oldCoordsY = DllStructGetData($chest, "Y")
If $DeadOnTheRun = 0 then
Do
rndslp(500)
Until CheckArea($oldCoordsX, $oldCoordsY) Or TimerDiff($TimeCheck) > 90000 Or $DeadOnTheRun = 1
EndIf
If $DeadOnTheRun = 0 then rndslp(1000)
If $DeadOnTheRun = 0 then OpenChest()
If $DeadOnTheRun = 0 then rndslp(1000)
If $DeadOnTheRun = 0 then TargetNearestItem()
If $DeadOnTheRun = 0 then rndslp(500)
If $DeadOnTheRun = 0 then $item = GetCurrentTarget()
If $DeadOnTheRun = 0 then
Do
If $DeadOnTheRun = 0 then rndslp(500)
If $DeadOnTheRun = 0 then PickUpItem($item)
Until DllStructGetData($item, 'AgentID') = 0 Or TimerDiff($TimeCheck) > 90000 or $DeadOnTheRun = 1
EndIf
EndFunc ;==>DoChest
Func LookForChest()
If $DeadOnTheRun = 0 then TargetNearestItem()
If $DeadOnTheRun = 0 then rndslp(500)
If DllStructGetData(GetCurrentTarget(), 'Type') = 512 and $DeadOnTheRun = 0 Then
If $DeadOnTheRun = 0 then DoChest()
If $DeadOnTheRun = 0 then rndslp(500)
EndIf
EndFunc
the i added the fonction LookForChest() before moving to each aggro :
Code:
If $DeadOnTheRun = 0 Then $enemy = "Yeti"
[COLOR="red"]If $DeadOnTheRun = 0 Then LookForChest()[/COLOR]
If $DeadOnTheRun = 0 Then AggroMoveToEx(-17348, -9895, $enemy)
If $DeadOnTheRun = 0 Then $enemy = "Oni and Wallows"
[COLOR="red"]If $DeadOnTheRun = 0 Then LookForChest()[/COLOR]
If $DeadOnTheRun = 0 Then AggroMoveToEx(-14702, -6671, $enemy)
If $DeadOnTheRun = 0 Then $enemy = "Oni and Wallows"
[COLOR="Red"]If $DeadOnTheRun = 0 Then LookForChest()[/COLOR]
If $DeadOnTheRun = 0 Then AggroMoveToEx(-11080, -6126, $enemy, 2000)
This might not be very efficient nor accurate, but it works : the bot oppened a chest after killing Yetis !!! :)
If someone has a better idea or a better way to do this i'm available to test it !