taultunleashed logoScripting help : EverQuest 2 Premium Discussions
newtopic  postreply
 [ 10 posts ] 
blue large dot

Scripting help : EverQuest 2 Premium Discussions

Posted: March 7th, 2005, 1:08 am
 
tault_ngm1
tault_ngm1's Reps:
User avatar
I am so noob to scripting within ACtool and auto it. But I chose actool for the script I am making but having a problem activateing it in game.

My question is this. I attempting to write a script to activate the script and another key to deactivate it.

So something like this if your following:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
SetActiveWindow Program

->KeyDown {DEL} Starts/Stops script
Loop 10
keydown e 1 sec
End

OR

SetActiveWindow Program

KeyDown `
Then
Start/Stop
Loop 10
keydown e 1 sec
End



Reply with quote
Posted: March 7th, 2005, 1:46 am
 
tault_pickled
tault_pickled's Reps:
User avatar
Wow someone decided to make their own script!

Ok here is some help and idea structure to achieve your goal.

Using Auto IT, I dont like ACTools that much :)

Example.au3

(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Basic Auto IT Structure for HotKey Activate'a'Function ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;Set partial Window title to use the Actions on!
$programTitle = "EverQuest II"

;Sets the activate Script Key -> DEL key
HotKeySet("{DEL}", "StartMyScript")

;Sets the pause Script Key -> END key
HotKeySet("{END}", "StopMyScript")

;Define what we want to do when script starts -> DEL pressed
Func StartMyScript()
   WinActivate($programTitle)
   For $i = 1 To 10 Step 1
      ;For Loop, does this action below 10 times any time Del is pressed!
      Send("e")
      Sleep(1000)
   Next
EndFunc

;Define what we want to do when script is paused -> END pressed
Func StopMyScript()
   WinActivate($programTitle)
   While 1
      ;Script is now paused forever until Del is pressed
      Sleep(2000)
   Wend   
EndFunc

MsgBox(0, "Begin", "Ready to begin Script?")


;Initiates Script, loops forever waiting for keys to be pressed.
While 1
   Sleep(1000)
Wend


Reply with quote
Posted: March 7th, 2005, 2:03 am
 
tault_ngm1
tault_ngm1's Reps:
User avatar
wow! thats more then I was looking for. :)

I will give this a shot and see how it works with the app. I'll let ya know either way ;)


Reply with quote
Posted: March 7th, 2005, 2:31 am
 
tault_ngm1
tault_ngm1's Reps:
User avatar
Ok, I am back after some testing. With your default config the program will open, as intended, but the toon would sit and jerk in place for about 5 seconds then stop.

I attempted to change the Hotkeys around thinking something could be conflicting, no change :/ So, I opened up textpad and tested there.... it works. But something is fobard.

Now, question I have about "Sleep", I assume this may be the same as "delay". So if I am right Send(w) will send a command for w to be pressed and held or pressed and lifted each time every 10 seconds?


(ps. I can move in game with the script I noted at first but I have to alt-tab out to activate it.)


Reply with quote
Posted: March 7th, 2005, 3:03 am
 
tault_pickled
tault_pickled's Reps:
User avatar
The basic program above:

Press-> DEL -> it select's EQ2 Window, and presses E every second.

To press and HOLD E DOWN, is something that would need to be changed to suit.

like so
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
  Send("{e down}")
  Sleep (5000) ;Wait 5 seconds whilst HOLDING down 'e' key.
  Send("{e up}") ;Release 'e' key


Good Luck!


Reply with quote
Posted: March 7th, 2005, 3:34 am
 
tault_ngm1
tault_ngm1's Reps:
User avatar
pickled (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
Press-> DEL -> it select's EQ2 Window, and presses E every second.



Well, i'm not mechanically illiterate :D

Which I changed $programtitle = textpad to see if it's sending an output. It was. But for some reason the game app did not recognize it.

(!empty($user->lang['QUOTE'])) ? $user->lang['QUOTE'] : ucwords(strtolower(str_replace('_', ' ', 'QUOTE'))):
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
  Send("{e down}")
  Sleep (5000) ;Wait 5 seconds whilst HOLDING down 'e' key.
  Send("{e up}") ;Release 'e' key



Works perfect now! almost... upon further testing {DEL} nor {END} work while the game app is active. However, if you alt-tab out to another app then select {DEL} or {END} it calls the program back and stops or runs the script again.

I am looking at the script, with what knowledge I have about scripting, I am unable to define the issue why it only activates when the app is inactive.


Reply with quote
Posted: March 7th, 2005, 4:08 am
 
tault_pickled
tault_pickled's Reps:
User avatar
I just tested it with and it seemed to work fine however I think I know why it's having trouble with EQ2, is that its trying to access EQ2 to fast (depends on computer processor speed).

Anyway here is the remedy.

Add this:
Sleep(2500)

After each:
WinActivate($pr...

Q. What does this do? (for the mechanically illiterate):
A. It waits an extra 2.5secs for the EQ2 application to become 'active' on the desktop before sending keys E (when del is pressed to start it).


Reply with quote
Posted: March 7th, 2005, 5:10 am
 
tault_pickled
tault_pickled's Reps:
User avatar
Oh yeh!, you might wanna UN-ASSIGN del and end in EQ2 :P


Reply with quote
Posted: March 7th, 2005, 5:34 am
 
tault_ngm1
tault_ngm1's Reps:
User avatar
I just want to make a quick note before proceeding, I appreciate the help you have provided so far. :)

I attempted to add the additional line but did not work for me. As far as computer processor speed.. not sure that would be my specific problem since I paid over 5k for the main components inside the box.

Step by step process. I start eqii and login as usual. Once I am in the game I launch the script, using it as an auto run for testing purposes.

I minimize eq before calling {DEL}. After calling {DEL} eq becomes active as expected and runs the script for 10seconds. After which call {DEL} again and run for another 10 seconds. Now, during the time I am running I call {END}, expecting to halt, but the toon continues to run... run.. run.. ok runs for over a minute. After which I attempt to call {DEL} again and nothing happens. It seems that it is paused until I exit autoit.

I also attempted this script on my server running BF1942/MOH/DOD to auto run, but what happens here is entirely different. After starting the script it activates the specified application and I am able to run for 10 seconds, but can not stop using {END} I need to wait it out. Once I have stoped moving I call the {DEL} function again, but will not run. So I alt-tab out into another application and call the {DEL} function again, now the character is auto-running again, if I alt-tab out again into another application while running and call the {END} function I am able to stop running.

hope I did not loose you there..


Reply with quote
Posted: March 7th, 2005, 5:53 am
 
tault_pickled
tault_pickled's Reps:
User avatar
Hmm try chaging the Sleep(2000) in StopScript to (100), otherwise I have absolutely no idea, works ok for me when I tested it with notepad and doom III.

If you want the char to stop running when you press end you need to make the appropriate actions in Stop section.


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 158 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of EverQuest 2 Premium Discussions RSS Feed 
Sitemap of EverQuest 2 Premium Discussions Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?