Autoit Skirmish Bot Help

This is a good place to ask general question about our products.
rufflesHR
Posts: 91
Joined: Fri Oct 22, 2010 9:10 pm

Autoit Skirmish Bot Help

Post by rufflesHR » Sun Oct 02, 2011 9:08 pm

Ok so i started on a simple Skirmish bot For Siege of Gondamon, as this skirmish is plyable by all players and is simple and easy to complete. Ive ran into some problems with server side lag casueing my WASD controls to become off by a little bit so that after it lags while turning it will be facing a little left instead of straight ahead so when i move forawds etc, or travel to another location the bot will be put off the path and totaly mes up the bot causing imminent failor or death, and ideas or suggestion, in addition to prgramming skills to help with this Autoit based bot would be appreciated,additionally ive tried to use mouseclick/drag but the since the game re-centers the mouse after a rightclick/drag, it will change after each useage of the mouse and mess up the bot even more, I think all it needs is a good maping system or to be usable with the new 1.4 .XML maps to make it much easier to use and untangle the mess im having with travelling.
here is the code i typed up last night, its not much and is specific to my pc and LOTRO configurations however i will include a varialbe to adjsut all mouseclicks to fit with each window size etc so users with different window setting can use the same bot
Code:

; Script Start - Add your code below here
WinActivate ("The Lord of the Rings")
sleep (5000)
Send("{CTRLDOWN}j{CTRLUP}");opens the skirmish panel
sleep (4000)
MouseClick("left",654,121,1);goes to the skirmish tab
sleep (1500)
Mouseclick("left",810,268,1);this presses the arrow to scroll up to acuratley choosethe right skirmish
MouseDown("left")
sleep (5000)
mouseup("left")
MouseClick("left",641,340,1);this selects the skirmish
sleep (200)
MouseClick("left",713,153,1);selcts lvl to play on
sleep (300)
Send("{BACKSPACE}{BACKSPACE}59"); this sets the lvl to play on
sleep (300)
MouseClick("left",681,559,1);this pushes the create button
Sleep (300)
MouseClick("left",589,539,1);this pushes the play now button to start teh skirmish
sleep (25000); waits for loading
If PixelGetColor(184,710)=12486256 Then; checks if your player is loaded by lookinhg at the xp bar
MouseClick("left",631,157,1); summons your skirmish soldier
sleep (3000)
Else
sleep (30000)
MouseClick("left",631,157,1); summons your skirmish soldier
sleep (3000)
EndIf
send ("{w DOWN}");moves to npc to start the skirmish
sleep (900)
send ("{w UP}")
sleep (2500)
send ("{F10}");selects the npc to start the skirmish
sleep (500)
send ("u")
MouseMove(642,190);turns around from the npc 180 degrees to move away from him slightly(this is were the lag happens, and can set the bot off course)
MouseDown("right")
MouseMove(683,374)
MouseUp("right")
MouseClick("right",826,478,1); clicks "continue" to continue the skrimish :WILL NEED TO BE CHANGED TO LEFT CLICK FOR FUNCTIONALLITY PERPOSES
send ("{w DOWN}");moves away from npc
sleep (2700)
send ("{w UP}")
Best run to date? close to 4 days nonstop during the 200%XP week only stopped to switch areas cause I was leveling crazy fast, also helps to have the pocket +25% xp too :)

Benickes
Posts: 11
Joined: Sat Sep 17, 2011 3:54 pm

Re: Autoit Skirmish Bot Help

Post by Benickes » Thu Oct 27, 2011 3:19 am

I have made something similar with allowing my bot to auto repair and auto sell every hour using the goto grind spot function on the bot. I use an autoclicking program to repair and sell all common and lower items every hour by just setting up some clicks. I think you could adapt this to use with your bot. just setup movement positions and use the bot to move instead of the game controls.

I leave the repair grind postions inactive and it works good. So when i tell it to start it just goes and goes and then stop goto "repair" wait 5min then repair and start again.

Yes I know it's crude but it's good enough for me.

rufflesHR
Posts: 91
Joined: Fri Oct 22, 2010 9:10 pm

Re: Autoit Skirmish Bot Help

Post by rufflesHR » Mon Dec 05, 2011 1:44 pm

Yea I've found many uses out of Autoit such as I've
Made a simple farming bot( literally) so I can leave and come back hours later and have stacks of the supplies I need to cook up some food.. Have automated the entire process. With this skirmish bot I'm aiming to both farm and safely bot for xp. Haven't worked on them as of late , and the bots I do have are specific for my setup like window location for example so it clicks on the correct place not 1 pixel to the left and so breaking the bot. I'll post em if anyone can make them usable by everyone
Best run to date? close to 4 days nonstop during the 200%XP week only stopped to switch areas cause I was leveling crazy fast, also helps to have the pocket +25% xp too :)

tom89212
Posts: 17
Joined: Sat Nov 19, 2011 8:42 am

Re: Autoit Skirmish Bot Help

Post by tom89212 » Mon Dec 19, 2011 4:49 am

How do we use this script?Anyone knows?

rufflesHR
Posts: 91
Joined: Fri Oct 22, 2010 9:10 pm

Re: Autoit Skirmish Bot Help

Post by rufflesHR » Sat Dec 31, 2011 9:20 pm

the above script is in the AI3 language, usable wit the program Autoit version 3 or higher.to even use this script all your settings would have to be the same as mine for example if your skirmihs tab opens in a diferent place from mine it woundt work becaue the mouse is clicking in a specific place, however you could go through and use the basic logic incorporated and make your own bot to start the skirmishes (as this is as far as i have gotten, or have wanted to get, will be some time before release,lots of time :) ) but in order to do that you need some basic understanding of the program and the language..its really simple and if i can do it , im sure you can too :)
Best run to date? close to 4 days nonstop during the 200%XP week only stopped to switch areas cause I was leveling crazy fast, also helps to have the pocket +25% xp too :)

red_st_angel
Posts: 8
Joined: Sat Oct 20, 2012 2:00 pm

Re: Autoit Skirmish Bot Help

Post by red_st_angel » Thu Nov 01, 2012 5:45 pm

I know this and old topic, but just in case you still check back, the use of the /follow command was pretty helpful for me so you still get where you need to be whether you lag or not

LOST
Posts: 32
Joined: Thu Mar 15, 2012 3:41 pm
Location: G3RM4NY

Re: Autoit Skirmish Bot Help

Post by LOST » Sun Nov 04, 2012 1:15 pm

red_st_angel wrote:I know this and old topic, but just in case you still check back, the use of the /follow command was pretty helpful for me so you still get where you need to be whether you lag or not

WOW!! I've auto-it-pwnage-botted now 2 chars to 75 and 2 more to 85 and if I had known that the /follow command works on NPCs too I would probably have a better completion ratio than ~0.7 .......

Thanks for the info red_st_angel ! - this should have been posted half a year ago..... :-D

Ash
Posts: 20
Joined: Sat Oct 30, 2010 12:56 pm

Re: Autoit Skirmish Bot Help

Post by Ash » Sat Nov 10, 2012 8:31 am

LOST wrote:
red_st_angel wrote:I know this and old topic, but just in case you still check back, the use of the /follow command was pretty helpful for me so you still get where you need to be whether you lag or not

WOW!! I've auto-it-pwnage-botted now 2 chars to 75 and 2 more to 85 and if I had known that the /follow command works on NPCs too I would probably have a better completion ratio than ~0.7 .......

Thanks for the info red_st_angel ! - this should have been posted half a year ago..... :-D
can you post your setup ???

rufflesHR
Posts: 91
Joined: Fri Oct 22, 2010 9:10 pm

Re: Autoit Skirmish Bot Help

Post by rufflesHR » Sun Nov 11, 2012 12:31 am

Wha?! you can /follow NPCs, hmm that may make this easier to do, like Seige of Gondamon, wait for the 3 gate guards to fall then /follow mathi to make sure im close by, then target a mob and /follow him, and if the autoface option is enabled in the Options menu in LOTRO that would make this sooooo much easier, TY so muc hfor that piece of info, hope it still works with the latest update, if it does i might get around to posting a working AI3 bot (screen resolution would still be a problem but maybe someone can figure out a way to change were the mouse would click based on screen/game resolution)
Best run to date? close to 4 days nonstop during the 200%XP week only stopped to switch areas cause I was leveling crazy fast, also helps to have the pocket +25% xp too :)

Ash
Posts: 20
Joined: Sat Oct 30, 2010 12:56 pm

Re: Autoit Skirmish Bot Help

Post by Ash » Sun Nov 11, 2012 7:19 pm

one question: s it possible to make the bot hit one target with hight priority ??? if so, it's hell easy to make the Defense of Prancing Pony, you just need to setup the bot to always attack the torch carrier when it comes on range, no mather what or who it's hitting it must stop and kill the torch guy

mdtrav
Posts: 51
Joined: Mon Mar 15, 2010 8:18 pm

Re: Autoit Skirmish Bot Help

Post by mdtrav » Mon Nov 12, 2012 9:29 pm

Ash wrote:one question: s it possible to make the bot hit one target with hight priority ??? if so, it's hell easy to make the Defense of Prancing Pony, you just need to setup the bot to always attack the torch carrier when it comes on range, no mather what or who it's hitting it must stop and kill the torch guy
yes

Ash
Posts: 20
Joined: Sat Oct 30, 2010 12:56 pm

Re: Autoit Skirmish Bot Help

Post by Ash » Tue Nov 13, 2012 4:17 pm

how ???

mdtrav
Posts: 51
Joined: Mon Mar 15, 2010 8:18 pm

Re: Autoit Skirmish Bot Help

Post by mdtrav » Tue Nov 13, 2012 5:59 pm

METHOD: SCANTARGET
LOOPWHILE iHaveATarget()
if scanCurrentTarget() = priorityTarget;
attack();
else
pressTargetNextMonsterKey();
endIf
ENDLOOP
ENDMETHOD

That is some basic prep code for you that is not specific. Personally most of my pixel bots are written in ACTOOL, even though it is slow and not quite as advanced as autoit v3, which I also use a lot. ACTOOL makes pixel and picture scanning very simple. It also is not very advanced, you have to do a lot of working around and writing a lot of extra code that autoit would do automatically for you. I also have written pixel bots in java which is a lot of fun but when writing script based bots like this you do not really need OOP.

rufflesHR
Posts: 91
Joined: Fri Oct 22, 2010 9:10 pm

Re: Autoit Skirmish Bot Help

Post by rufflesHR » Mon Nov 19, 2012 9:26 pm

Well this is the Autoit3 script that I've made so far, its very unique to my setup so if anyone wants to use it they can use the notes off to the side of the code to change the mouse co-ordinates. It starts LOTRO logs you in and starts the Seige of Gondamon skirmish, the only thing I think I might have trouble with is the battle phase, and looping in and out of rest/battle, otherwise the rest is very simple, anyone with some AI3 experience that wants to help with those phases feel free :)
everything after the semicolon ";" is the description.
the line of code {Send("{=}");will begin following selected NPC} involves a alias that i made in-game to type /follow whenever "=" is pressed, this can be changed by taking out the "=" and putting /follow, but id recommend an alias..

Code: Select all

sleep(3000)
MouseClick("left",1649,155,2);clicks on the LOTRO.exe
sleep(18000);waits for the program to load up to default page
MouseClick("left",994,384,1);clicks on password field
Send("thisisntmypassword{ENTER}");types your password and presses enter
sleep(2000)
MouseClick("left",1232,485,1);selects "Next" button to start game
sleep(25000);waits for program to load
MouseClick("left",468,445,1);makes sure the LOTRO window is active
Send("{ALTDOWN}{ENTER}{ALTUP}"); sets the window size to fullscreen
sleep(40000); waits to be sure the program is in Fullscreen 
MouseClick("left",384,703,1);selects character
MouseClick("left",1547,875,1);clicks "Enter Middle Earth"
sleep(35000);waits for charcter to load")
Send("{CTRLDOWN}j{CTRLUP}");opens skirmish panel
sleep(1500)
MouseClick("left",233,160,1);clicked inside the search box under the "Specific" tab
sleep(800)
Send("gondamon"); types gondamon in the search bar to narrow the search results
sleep(800)
MouseClick("left",101,235,1);clicked on the actual skirmish
sleep(1000)
MouseClick("left",206,579,1);clicks "Launch Now"
sleep(1000)
MouseClick("left",468,445,1);actually starts the Skirmish
sleep(25000);waits for the skirmish to load
send("{w DOWN}");moves the character fowards slightly
sleep(200);same
send("{w UP}");same
sleep(500)
Send("{F10}");selects closest NPC
Send("{=}");will begin following selected NPC 
sleep(500)
send ("u");interacts with Mathi to open menu
MouseClick("left",851,711,1);clicks continue to start the skirmish
MouseClick("left",866,180,1);clicks on the Skirmish soldier button to summon your soldier
Best run to date? close to 4 days nonstop during the 200%XP week only stopped to switch areas cause I was leveling crazy fast, also helps to have the pocket +25% xp too :)

mdtrav
Posts: 51
Joined: Mon Mar 15, 2010 8:18 pm

Re: Autoit Skirmish Bot Help

Post by mdtrav » Tue Nov 20, 2012 6:13 am

Here is a snippit I have in my code to search for an npc. Could work for any npc, this one is for the quest starter.

Code: Select all

Procedure TargetID using i, b
  Call Debug "TargetID"
  SetConst b = $_path + npc.ID
  ListLoad ID, $b
  ListCount ID, i
  Loop $i
    IsGreen ID[{LoopNo}]
      Set HaveNPC = True
      Set Target = npc
      Call Debug "TargetID 83d1"
    Else
      Call Debug "Not the correct target"
      Set HaveNPC = False
      Break
    End
  End
End

Post Reply