Quote:
Originally Posted by Destinyfr
Hi ! Is there something to autobuy ultimate equipment packaging (lvl 83) when npc is nearby please ? Thanks !
|
Here's a template code, you just need to edit the NPC Name and edit 2 Mouse lines with the correct mouse coordinates, I wrote comments behind the lines to explain which coords are required.
To get mouse coordinates you have to open the Script Editor and hover above where you want to click, press F8 then, the Script Editor does display the coords and copies the full Mouse line to your clipboard
Note: the Aion window is small as usual with scripts, so when you get the mouse coords the window also needs to be small
Code:
#IF=%FirstTime,;
_SetVar=NPC,Meririnerk; // Set the NPC Name here
#SmoothBackground
MemPtrWrite=%AddrFPS,%OffsetFPS1,500,BYTE;
MemPtrWrite=%AddrFPS,%OffsetFPS2,500,FLOAT;
Command=;
Print=;
UseSpeed=1;
FrameActionByName=trade_dialog,XPOS,0;
FrameActionByName=trade_dialog,YPOS,0;
MemPtrWrite=%AddrFrameName[dlg_dialog],0x6C,2.54296875,FLOAT;
MemPtrWrite=%AddrFrameName[dlg_dialog],0x74,3.317382812,FLOAT;
#ENDIF
MemPtrWrite=%PlayerBase,%OffsetData/0xCC,Waiting for NPC,WCHAR[16];
#DO=99999999;
Command=/select %Var[NPC];
_UNTILMemPtrRead=%TargetBase,%OffsetName,WCHAR[64],=%Var[NPC];
_IFMemPtrRead=%TargetBase,%OffsetName,WCHAR[64],=%Var[NPC];
Command=/attack;
#DO=1000;
_UNTILMemPtrRead=%AddrFrameName[dlg_dialog],0x28,BYTE,=175;
Delay=5;
Mouse=127,187; // Mouse Coordinates of the Buy button on the dialog window
#DO=1000;
_UNTILMemPtrRead=%AddrFrameName[trade_dialog],0x28,BYTE,=175;
Delay=5;
Mouse=61,79,Right; // Mouse Coordinates of the item to purchase on the buy window
Mouse=184,380; // Mouse Coordinates of the Buy button on the buy window (this should already be correct)
#DO=1000;
_UNTILMemPtrRead=%AddrFrameID[%ConfirmFrameID],0x28,BYTE,=175;
#DO=1000;
SendKey=0x0D;
_UNTILMemPtrRead=%AddrFrameID[%ConfirmFrameID],0x28,BYTE,<175;
Delay=5;
MemPtrWrite=%PlayerBase,%OffsetData/0xCC,Bought from NPC,WCHAR[16];
_MemPtrReadVar=%PlayerBase,%OffsetName,WCHAR[32],PlayerName;
WaitForResponse=Attempted to buy on %Var[PlayerName];
MemPtrWrite=%PlayerBase,%OffsetData/0xCC,0,DWORD;
#EndScript
#ELSE
#EndScript
#ENDIF