Locked Home » Forums » Legacy & Archived » Archived Content » Darkfall Online » DFO - Guides / Secrets / Tricks

G15 keyboard looter Guide For Making Macros : DFO - Guides / Secrets / Tricks

Posted: March 11th, 2009
User avatar
Total Posts:527 Joined:2005
Here is a script for your G15 keyboard to loot. You mouse over the item you want to loot then hit the G key that you have it set for.

Code: Register to unlock hidden link

if (event == "G_PRESSED" and arg == 2) then
  
  x, y = GetMousePosition();

  PressMouseButton(1)
Sleep(10)
  MoveMouseTo(34156, 54602)
Sleep(10)
 ReleaseMouseButton(1)
Sleep(10)
  MoveMouseTo(x, y)

OutputLCDMessage("Looted", 2000)
end
This script is set for G key 2 and you have to find the X,Y for where you want the item to drop at.(your backpack).
Replace the numbers in MoveMouseTo(34156, 54602) with somewhere in your backpacks X,Y's
Posted: March 11th, 2009
User avatar
Total Posts:212 Joined:2009
how do I get this to work?

Just bought a G15 (generation2) just a few days ago.

how to get the script to g2 bottom?
Posted: March 11th, 2009
User avatar
Total Posts:212 Joined:2009
or do u run another program that sens that u push the g2 key and starts the script?
Posted: March 11th, 2009
User avatar
Total Posts:527 Joined:2005
I assume first that you have the G-Board software installed.
If so you should have a icon in your system tray. Double click it
Register to unlock hidden image

After it loads. Goto Edit -> Script Editor.



Register to unlock hidden image

Now copy and paste The code into the event function so it looks like this.


Register to unlock hidden image

After that Click Script -> Save.

Now we need to assign the script to a hotkey. Which in this case its G2 ( you can change this to ehat ever you wish but you need to change the 2

Code: Register to unlock hidden link

if (event == "G_PRESSED" and arg == 2) then
in this line to what G key number you wish.. example G4 key would be

Code: Register to unlock hidden link

if (event == "G_PRESSED" and arg == 4) then



assign it to G2 Key

Register to unlock hidden image

Now just close all this and you should be good to go.

Just reminber to change the line

Code: Register to unlock hidden link

MoveMouseTo(34156, 54602)
to the X,Y of someplace in your back pack.
Posted: March 11th, 2009
User avatar
Total Posts:212 Joined:2009
YAY!

i had old drivers... so I didnt have the script part :P
no wounder I couldnt figure it out! but big thx for a great walkthrough! should get something just for takeing the time to make it so "easy" to understand :)
will try it first thing when EU server get up agian!
Posted: March 11th, 2009
User avatar
Total Posts:212 Joined:2009
now its fully testaed WORKES like a charm.... if u have a g15 keyboard u have to get this :D

thx m8
Posted: March 11th, 2009
Total Posts:1 Joined:2009
How do you get the mouse coordinates?
Posted: March 11th, 2009
User avatar
Total Posts:4 Joined:2004
Great! Thank you.
Posted: March 11th, 2009
User avatar
administrator
Total Posts:29891 Joined:2002
Nice guide moving to confirmed.
Posted: March 12th, 2009
Total Posts:3 Joined:2009
Any help on how to get the correct mouse cords would be greatly helpful (of your backpack)
Posted: March 12th, 2009
nemo81
I too wonder how to get mouse position?

I guess it could be done by making a new script and sending the x,y result to the lcd?

Looking forward to answer

(in the meantime ill google)
Posted: March 12th, 2009
Total Posts:3 Joined:2009
You should post back if you are able to find something on google
Posted: March 12th, 2009
User avatar
Total Posts:527 Joined:2005
Put this in your editor and it will give you the X and Y of where your mouse is on the screen when pressed.

Code: Register to unlock hidden link

if (event == "G_PRESSED" and arg == 2) then
x, y = GetMousePosition();
ClearLCD( )
OutputLCDMessage("X=")
OutputLCDMessage( x)
OutputLCDMessage(" Y=")
OutputLCDMessage( y)

end
Posted: March 12th, 2009
Total Posts:3 Joined:2009
When I paste this into my script editing window then run it all I see it:

Macro Activated
Script


Then it does nothing. Am I doing something wrong?
Posted: March 12th, 2009
User avatar
Total Posts:527 Joined:2005
nero1209 wrote:When I paste this into my script editing window then run it all I see it:

Macro Activated
Script


Then it does nothing. Am I doing something wrong?
Just want to make sure of a couple of things.
You dont have other scripts for hotkey G2 other than that one at the same time.
I Assume you have the updated software for the keyboard.
Also you put this in the event function of the script.


Code: Register to unlock hidden link

function OnEvent(event, arg)
	OutputLogMessage("event = %s, arg = %s\n", event, arg);

if (event == "G_PRESSED" and arg == 3) then
x, y = GetMousePosition();
ClearLCD( )
--OutputLogMessage("Mouse is at %d, %d\n", x, y);
OutputLCDMessage("X=")
OutputLCDMessage( x)
OutputLCDMessage(" Y=")
OutputLCDMessage( y)

end
end
Ready to join the community? Click here and see all of the benefits!
blue large dotWho is online
Users browsing this forum: No registered users and 1 guest
Locked