468,765 Members | 1,722 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Auric__ Hello, are you there. I hope so.

thanks for replying to my post..i did not think anybody would reply...i am
only 13 and English is not my first language but i will try to describe what
i am trying to do...

well iam trying to make "Artifical Inteligence " with the game
Starcraft...and i need to know that code to make this happen.. i dont
Understand PEEK or POKE...... and i want it to do..so when the address of
money is 50 then make a probe as i do other stuff.... and hopefully sometime
make it gathermoney.....
and its a memory value in STarcraft for minerlas the correct address is
this,..4FD4A0 i want it so when i hotkey the building and i enable the
"program" when i have 50 money it will press 1p which will select the
building and build a worker......also if u can help me with the sendkeys
command when i make a button and make it sendkeys 1p after i hotkey the
building in the game..i think it goes to fast or something it just selects
the builing........"Sendkeys "1p") what am i doing wrong....???

if you can help me...that would be great.

thanks,

Frank.

"Auric__" <no*********@email.address> wrote in message
news:ah********************************@4ax.com...
On Sun, 19 Sep 2004 00:35:31 +0000 (UTC), "Frank Wallace"
<fr***********@btconnect.com> wrote:
Hello,

Could someone please help me with this Visual Basic problem.

I need to know whats the code for this:

If address 29292929(making it up)= 50 then
sendkeys "1p"


What is that supposed to be the address of? Is that meant to be a memory
location?

Methinks you need to be a bit more detailed with what you're trying to
do with that bit of pseudo-code.
--
auric underscore underscore at hotmail dot com
*****
The fact that you find this strange makes me want to run away very, very
quickly.


Jul 17 '05 #1
4 1722
On Mon, 20 Sep 2004 14:13:55 +0000 (UTC), "Frank Wallace"
<fr***********@btconnect.com> wrote:
thanks for replying to my post..i did not think anybody would reply...i am
only 13 and English is not my first language but i will try to describe what
i am trying to do...

well iam trying to make "Artifical Inteligence " with the game
Starcraft...and i need to know that code to make this happen.. i dont
Understand PEEK or POKE...... and i want it to do..so when the address of
money is 50 then make a probe as i do other stuff.... and hopefully sometime
make it gathermoney.....
and its a memory value in STarcraft for minerlas the correct address is
this,..4FD4A0 i want it so when i hotkey the building and i enable the
"program" when i have 50 money it will press 1p which will select the
building and build a worker......also if u can help me with the sendkeys
command when i make a button and make it sendkeys 1p after i hotkey the
building in the game..i think it goes to fast or something it just selects
the builing........"Sendkeys "1p") what am i doing wrong....???

if you can help me...that would be great.


Don't top-post, Frank. I'm here, just been thinking on it. I'm also not
the only person here, y'know, others know more than I do.

Here's a Google search on Peek and Poke in VB:
http://www.google.com/search?q=(%22v...+vb)+peek+poke

This page (the first returned) has a decent implementation but no
explanation:
http://www.freevbcode.com/ShowCode.asp?ID=6758

Basically, you'll need to use the (undocumented) GetMemx and PutMemx
(where x is 1, 2, 4, or 8) API calls. You need to already know the
memory address you want to play with.

As for sendkeys, all it does AFAIK is place characters in the keyboard
buffer. If sendkeys is going too past, place a pause between keypresses,
like this:

SendKeys "1"
Sleep 100 'API call, wait about 1/10 of a second
SendKeys "p"

One problem specific to Starcraft is that you must have the right
building selected to build your probe, and that might be on the other
side of the map as the raging battle you're currently directing. A
better thing to do would be:

SendKeys "^2" 'or whatever it is to set a new location
SendKeys "1" 'to the main building
Sleep 100
SendKeys "p"
SendKeys "2" 'back to your current worries

Also, I don't remember if jumping to locations automatically selects the
building or not.
--
auric underscore underscore at hotmail dot com
*****
- How you doin'. You in charge?
- If anyone was in charge, it'd be me.
Jul 17 '05 #2
On Mon, 20 Sep 2004 15:35:00 -0700, I wrote:
If sendkeys is going too past,


correction: going too FAST
--
auric underscore underscore at hotmail dot com
*****
....and don't call tech support!
Jul 17 '05 #3
WOW thats hELPS ALOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!EXC ELLENT

thanks Auric__if you can also help me making a auto build in
starcraft!??..........that wil be even more excellent....dont worry if you
cant ore are busy though coz you have already helped me loads..

thanks again Auric__

frank.
"Auric__" <no*********@email.address> wrote in message
news:i6********************************@4ax.com...
On Mon, 20 Sep 2004 14:13:55 +0000 (UTC), "Frank Wallace"
<fr***********@btconnect.com> wrote:
thanks for replying to my post..i did not think anybody would reply...i am
only 13 and English is not my first language but i will try to describe
what
i am trying to do...

well iam trying to make "Artifical Inteligence " with the game
Starcraft...and i need to know that code to make this happen.. i dont
Understand PEEK or POKE...... and i want it to do..so when the address of
money is 50 then make a probe as i do other stuff.... and hopefully
sometime
make it gathermoney.....
and its a memory value in STarcraft for minerlas the correct address is
this,..4FD4A0 i want it so when i hotkey the building and i enable the
"program" when i have 50 money it will press 1p which will select the
building and build a worker......also if u can help me with the sendkeys
command when i make a button and make it sendkeys 1p after i hotkey the
building in the game..i think it goes to fast or something it just selects
the builing........"Sendkeys "1p") what am i doing wrong....???

if you can help me...that would be great.


Don't top-post, Frank. I'm here, just been thinking on it. I'm also not
the only person here, y'know, others know more than I do.

Here's a Google search on Peek and Poke in VB:
http://www.google.com/search?q=(%22v...+vb)+peek+poke

This page (the first returned) has a decent implementation but no
explanation:
http://www.freevbcode.com/ShowCode.asp?ID=6758

Basically, you'll need to use the (undocumented) GetMemx and PutMemx
(where x is 1, 2, 4, or 8) API calls. You need to already know the
memory address you want to play with.

As for sendkeys, all it does AFAIK is place characters in the keyboard
buffer. If sendkeys is going too past, place a pause between keypresses,
like this:

SendKeys "1"
Sleep 100 'API call, wait about 1/10 of a second
SendKeys "p"

One problem specific to Starcraft is that you must have the right
building selected to build your probe, and that might be on the other
side of the map as the raging battle you're currently directing. A
better thing to do would be:

SendKeys "^2" 'or whatever it is to set a new location
SendKeys "1" 'to the main building
Sleep 100
SendKeys "p"
SendKeys "2" 'back to your current worries

Also, I don't remember if jumping to locations automatically selects the
building or not.
--
auric underscore underscore at hotmail dot com
*****
- How you doin'. You in charge?
- If anyone was in charge, it'd be me.

Jul 17 '05 #4
>"Auric__" <no*********@email.address> wrote in message
news:i6********************************@4ax.com.. .
[a bunch of stuff]

On Tue, 21 Sep 2004 14:28:23 +0000 (UTC), "Frank Wallace"
<fr***********@btconnect.com> wrote:
WOW thats hELPS ALOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!EXC ELLENT

thanks Auric__if you can also help me making a auto build in
starcraft!??..........that wil be even more excellent....dont worry if you
cant ore are busy though coz you have already helped me loads..

thanks again Auric__

frank.


DON'T TOP-POST!

If I was to implement an auto-build function, I'd find out what
Starcraft does when you tell it to build a new probe. It's going to
modify a memory location somewhere, it's just a matter of finding out
which location and what happens to it. (My guess is it reserves a byte
or 2 in memory and then gives that byte a non-zero value to represent
what's to be built when it gets to that slot. But that's just a guess.)
--
auric underscore underscore at hotmail dot com
*****
- Can't you reach out with your feelings?
- Can I reach out with something else?
- Is it long enough?
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Altar | last post: by
1 post views Thread by Bhavesh Patel | last post: by
5 posts views Thread by Greg Smith | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.