Quote:
Originally Posted by pittapatta
Couldn't seem to find one, but honestly didn't look that hard out of sheer laziness. Is there a zaishen chest bot out there? I'm so sick of opening that sucker.
|
The general pattern to open a chest is:
- Find the chest
- Go to the chest
- Use the chest (either using ActionInteract() or OpenChest() functions)
In order to find the chest, there are 3 options:
If you know the coordinates of the chest, then the easiest is:
Code:
Do
RndSleep(250)
$Chest = GetNearestSignpostToCoords($x, $y)
Until DllStructGetData($Chest, 'Id') <> 0
If you do not know the coordinates you can use a loop on existing agents and selecting only agents that have a Chest "extratype":
Edit: Extra type for zaischen chest is 9523, added to the below functions
Code:
$AgentArray = GetAgentArraySorted(0x200) ;0x200 is used for static agents
Out ("Looking for chest")
For $i = 0 To UBound($AgentArray) - 1
$lAgent = GetAgentByID($AgentArray[$i][0])
$lExtraType = DllStructGetData($lAgent, 'ExtraType')
If $lExtraType <> 4582 And $lExtraType <> 8141 And $lExtraType <> 8934 And $lExtraType <> 9523 And $lExtraType <> 6 Then ContinueLoop
Next
You can also cycle through agents without GetAgentArraySorted() function:
Code:
For $i = 1 to GetMaxAgents()
$agent = GetAgentById($i)
$distance = GetDistance($agent, -2)
$extratype = DllStructGetData($agent, 'extratype')
If $extratype <> 4582 And $lExtraType <> 8141 And $lExtraType <> 8934 And $lExtraType <> 9523 And $lExtraType <> 6 or $distance > 5000 Then ContinueLoop
Next
In order to open the chest you can either target the newly found chest and then press "spacebar":
Code:
ChangeTarget($chest)
Do
RndSleep(250)
ActionInteract()
Until GetDistance($chest, -2) <150
Note that if you may get blocked on your way to the chest, you should use a movement function to get move you to the chest first (GoToSignPost() or MoveTo() or AggroMoveto() if you might encounter ennemies))
Or you can use GoSignPost + OpenChest()
Code:
GoSignpost($chest)
OpenChest()
Note that this method does not work on dungeon end chest without being close to the chest, however for other chests it will open the chest without you having moved to the chest.
For the Zaischen chest, since it has fixed coordinates it may be easier to just target the chest nearest to coordinates and then use Actioninteract().
Also if Zaischen Chest behaves like end chests, it may also be a bit finicky to use the OpenChest() function using just GoSignPost().
There is also a way that involves using a zaischen key but not sure if headers for that are up-to-date.
Quote:
Originally Posted by Edgrala
I've been testing the froggy bot from @ but sadly, it won't work :/
|
It should work if you replace GWA2 with the latest one. PM me if you face any issues.
I have created a more advanced cleaned up version with full custom salvage and improved wipe management since, but a fixed version should still do the job.