Multi-Gaming Community
It is currently 17 Jun 2025, 17:01

All times are UTC+02:00




Post new topic  Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Scripting!
PostPosted: 11 Oct 2010, 22:34 
Offline
Crap at posting (52)
User avatar
Hey so I've been messing with AutoHotKey and its usefulness for minecraft, and I've come up with a few things that could be useful for our server.

First, go to http://www.autohotkey.com/download/ to DL it if you don't have it already. Its a non-obtrusive program that you can turn off any time.
After you install it, there should be a green box in the bottom right hand of the screen. Right click it and click edit, then paste all or some of this:


^v::Send t/paste{Return} ; press ctrl-v to paste
^z::Send t/undo{Return} ; press ctrl-z to undo
^c::Send t/copy{Return} ; press ctrl-c to copy
^x::Send t/cut{Return} ; press ctrl-x to cut
^b::Send t/measure{Return} ; press ctrl-b to measure
^f::Send t/c{Return} ; press ctrl-f to do a cuboid
^g::Send t/mark{Return} ; press ctrl-g to mark
^t::Send t/c air{Return} ; press ctrl-t to make a cuboid of air



^p::
SendInput t/patrol{Return}
Sleep 300
SendInput {Shift down}
SendInput {q down}
Sleep 500
SendInput {q up}
SendInput {Shift up}
MouseMove <X>, <Y+400>, 5
return


To use that last one, it takes a bit of preparation. Right click on the green box again, open window spy, go to your minecraft and control your guy. in the window spy, itll tell you a mouse position (In Active Window: X, Y). Replace the <X> and <Y> with those numbers (Y add 400). For example, I see In Active Window: 511, 338, so I'd type
MouseMove 511, 700, 5
in that line.

Now you have a command that patrols, flies up and then looks straight down.

On a related note, the ';' key is just for comments.

Enjoy!


Top
   
 Post subject: Re: Scripting!
PostPosted: 12 Oct 2010, 00:57 
Offline
Secret Kitchen Princess (1256)
User avatar
+100 Internets.

This is really helpful.

_________________
It was used to emphasize the point, and is generally accepted by the grammar nazi community.


Top
   
 Post subject: Re: Scripting!
PostPosted: 12 Oct 2010, 03:02 
Offline
Has no REAL life! (3714)
User avatar
I'll deffinetly have to give this a go, are the hotkeys customisable?


Top
   
 Post subject: Re: Scripting!
PostPosted: 12 Oct 2010, 03:45 
Offline
Crap at posting (43)
User avatar
Quote:
I'll deffinetly have to give this a go, are the hotkeys customisable?
Why yes, they are!
Quote:
^v::Send t/paste{Return} ; press ctrl-v to paste
^z::Send t/undo{Return} ; press ctrl-z to undo
^c::Send t/copy{Return} ; press ctrl-c to copy
^x::Send t/cut{Return} ; press ctrl-x to cut
^b::Send t/measure{Return} ; press ctrl-b to measure
^f::Send t/c{Return} ; press ctrl-f to do a cuboid
^g::Send t/mark{Return} ; press ctrl-g to mark
^t::Send t/c air{Return} ; press ctrl-t to make a cuboid of air
See where it says...."^z::"? This defines the hotkey being used. "^" means it is using the Control-key modifier. You can use "!" for Alt, and "+" for Shift. "z" is the key being pressed. If you do not want it to use any modifier, you should begin the line with "#".

So, say I wanted to make it Alt+C to make a cuboid....I would change it to this:

!c::Send t/c{Return} ; press ctrl-f to do a cuboid

Or, if I wanted it to just be the "c" key:

#c::Send t/c{Return} ; press ctrl-f to do a cuboid


Hope that answers your question :)


Top
   
 Post subject: Re: Scripting!
PostPosted: 12 Oct 2010, 05:05 
Offline
Has no REAL life! (1295)
User avatar
:shock: Are you american like me? Making the simplest of things simpler for us to be lazier??? THANKS :mrgreen: :4 :4 :4

_________________
Not in cruelty. Not in wrath. The Reaper came today; an Angel visited this gray path, and took the cube away.


Top
   
 Post subject: Re: Scripting!
PostPosted: 12 Oct 2010, 07:14 
Offline
Has no REAL life! (1099)
User avatar
Hooray for keyboard with Macros!

_________________
[22:07] <@FBB2> +Ollieboy: %d+Pandorum%f: So Ollie when shall we have sex again?
[22:07] <@Xesdra_> fail
[22:07] <@FBB2> +Ollieboy: Noo the say failed me
[22:08] <@FBB1> +Pandorum: LOL


Top
   
 Post subject: Re: Scripting!
PostPosted: 12 Oct 2010, 10:48 
Offline
is Wonder Woman (5950)
User avatar
Xesdra wrote:
Hooray for keyboard with Macros!
:5:

_________________
Classy is when a woman has everything to flaunt, but chooses not to show it!


Top
   
 Post subject: Re: Scripting!
PostPosted: 13 Oct 2010, 00:07 
Offline
Doesn't get out much (334)
User avatar
This is fantastic stop! :D
I can't wait to get using this. xD
Though I am already used to typing it out...
Oh well! A new thing to get used to. :D
<3Macros<3

_________________
"This war is about colours. If you wear the wrong ones, you are going to be killed."
~Mmeeddiiccaattiioonn~
ஜஜ۩۞۩ஜஜ۩۞۩ஜ
╔═╦╗╔╦═╦═╦╗╔╗
║═╣║║║╔╣╔╣╚╝║
║╔╣╚╝║║║║╚╗╔╝
╚╝╚══╩╝╚╝♥╚╝
ஜஜ۩۞۩ஜஜ۩۞۩ஜ


Top
   
 Post subject: Re: Scripting!
PostPosted: 15 Oct 2010, 00:02 
Offline
Likes to type... (265)
User avatar
Any idea what the chat input would be? What I am trying to do is have it simply capture everything being said in the game, and copy it into a .txt file. This could easily be done with IRC, but I am wanting it to capture the things you don't see in IRC chat. I am quite a noob to ahk. I'll continue googling and trying to figure this out, unless someone here figures it out before me, which I hope someone does. I tried doing this with pixelsearch but that turned into a big mess.

_________________
I used to do drugs. I still do, but I used to, too.
-Mitch Hedberg

Front page of a very old website of mine back in 1999:
Hello, today is December 30, 110 and this site is Y2K compatible.


Top
   
 Post subject: Re: Scripting!
PostPosted: 15 Oct 2010, 00:10 
Offline
Geek (885)
User avatar
I somehow doubt you can capture text said ingame with AHK since all it does is repeat keystrokes. If you also dont want to use IRC you probably need to look at the packets you receive from the server (like HBOT does if im not mistaken). Which really isnt something a, as you call yourself, noob should do.

_________________
"Um ... I'm just wondering if it's okay if I hold you down against your will for a little bit?"


Top
   
 Post subject: Re: Scripting!
PostPosted: 15 Oct 2010, 00:54 
Offline
Doesn't get out much (334)
User avatar
Fumino wrote:
Any idea what the chat input would be? What I am trying to do is have it simply capture everything being said in the game, and copy it into a .txt file. This could easily be done with IRC, but I am wanting it to capture the things you don't see in IRC chat. I am quite a noob to ahk. I'll continue googling and trying to figure this out, unless someone here figures it out before me, which I hope someone does. I tried doing this with pixelsearch but that turned into a big mess.
Why do you want the chat logs? :P

_________________
"This war is about colours. If you wear the wrong ones, you are going to be killed."
~Mmeeddiiccaattiioonn~
ஜஜ۩۞۩ஜஜ۩۞۩ஜ
╔═╦╗╔╦═╦═╦╗╔╗
║═╣║║║╔╣╔╣╚╝║
║╔╣╚╝║║║║╚╗╔╝
╚╝╚══╩╝╚╝♥╚╝
ஜஜ۩۞۩ஜஜ۩۞۩ஜ


Top
   
 Post subject: Re: Scripting!
PostPosted: 15 Oct 2010, 03:01 
Offline
Likes to type... (265)
User avatar
Just a habit, like when I play my MUD (multi-user-dungeon) games, it keeps a log of everything, and it's just nice to look at those logs years later and see a little bit into the past. A good example of this is here: http://forums.tfcmud.com/showthread.php ... 1995-12-16

So if this server is here years from now, and I post a /players list from way back then. People could reminisce about the good old days.

_________________
I used to do drugs. I still do, but I used to, too.
-Mitch Hedberg

Front page of a very old website of mine back in 1999:
Hello, today is December 30, 110 and this site is Y2K compatible.


Top
   
 Post subject: Re: Scripting!
PostPosted: 15 Oct 2010, 04:58 
Offline
Doesn't get out much (334)
User avatar
Fumino wrote:
Just a habit, like when I play my MUD (multi-user-dungeon) games, it keeps a log of everything, and it's just nice to look at those logs years later and see a little bit into the past. A good example of this is here: http://forums.tfcmud.com/showthread.php ... 1995-12-16

So if this server is here years from now, and I post a /players list from way back then. People could reminisce about the good old days.
Hehe well we have all the chat logs on FTP. ^^ When you move up you'll have access to them. =)

_________________
"This war is about colours. If you wear the wrong ones, you are going to be killed."
~Mmeeddiiccaattiioonn~
ஜஜ۩۞۩ஜஜ۩۞۩ஜ
╔═╦╗╔╦═╦═╦╗╔╗
║═╣║║║╔╣╔╣╚╝║
║╔╣╚╝║║║║╚╗╔╝
╚╝╚══╩╝╚╝♥╚╝
ஜஜ۩۞۩ஜஜ۩۞۩ஜ


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 13 posts ] 

All times are UTC+02:00


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited