TraderRequest Function

08/13/2020 10:13 masbeyatis35#1
Hi,
I'm trying to improve some bots atm but i can't figure this function out.

It doesnt do anything, character just stands near the rare-trader but doesn't do anything :

I tested with that :

TraderRequest(930)
TraderBuy()

Any tips ?

Thx ! :)
08/14/2020 12:07 smiley232#2
I just checked it with my gwa2, after talking to the rare mats trader I used
Code:
If TraderRequest(930) Then TraderBuy()
and it bought me an ecto.

Make sure you have inkluded [Only registered and activated users can see links. Click Here To Register...] into your gwa2.
08/15/2020 15:10 phat34#3
Yes! For these functions() to work u have to be talking to the trader IE. GOTONPC().

Like other autoit functions, they can return values.
08/17/2020 15:41 Zvend#4
If you just did this:

<ScriptStart>
Initialize()
GoNPC(...)
TraderRequest(...)
TraderBuy()
<ScriptEnd>

then it might not happen anything. You enqueue the Order to request an item and then buy it but this queue is relating on your Addresses of Autoit. Which means if your script stops before executing the TraderBuy() then your Address of the information to buy the request item get lost and cant get read by the queue (which mostly happens a few frames later).

To easy fix that just do this:

<ScriptStart>
Initialize()
GoNPC(...)
TraderRequest(...)
TraderBuy()
Sleep(1000)
<ScriptEnd>