The Daily Click ::. Forums ::. Klik Coding Help ::. I really suck at klik coding. *cries*
 

Post Reply  Post Oekaki 
 

Posted By Message

markno2



Registered
  06/06/2006
Points
  865

Game of the Week WinnerVIP MemberPicture Me This Round 30 Winner!Weekly Picture Me This Round 39 Winner!Kliktober Special Award Tag
8th June, 2010 at 16:18:14 -

Mmmyellow...

I'm trying to make a program that records the actions of the mouse and then repeats it. Definitely not trying to make a macro for an MMORPG or anything, nope. *shifty eyes*

Can anyone halp with this? Like... by making the whole thing for me? Or at least by telling me which extensions to use. Thx. D:

 
Discarded pizza boxes are an indispensable source of cheese.

ZeroFun



Registered
  08/06/2010
Points
  4
8th June, 2010 at 16:44:31 -

i have done this... as a test.. COUGH
anyways
objects youl need is
MOUSE OBJECT
and list object
and key object
aaand string parser
then u use keyobject and get random button to activate the recording
when recording on list object: EVERY 0.2 milliseconds add line "mouseobject(mousex)+";"+mouseobject(mousey)"
and then u use keyobejct and stop the recording
and then u use it again (with using i mean events) to playpack the recording.
Start of frame: string parser source = list object, add delimeter= ;
when playbacking
every 0.2 millisecond (same as the recording speed) u take first line of list object and then u put : mouse object set mouse x to stringparser getfirst element and mouse object set mouse y to stringparser get last element and then u delete the first line
and the u can have action
wich tests if all lines are done
then it stops the recording


thats the technique i used, tought on mine u could select recording speed etc.save n load it ;D
hope i helped

 
"How'd i type it so that you guys can see it?" -- idiots@irc

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
8th June, 2010 at 16:45:24 -

Does it have to be one you made? I used a good free one awhile back that made importing 120+ frames a few times so much easier. I'd have to go find it again.

I wish I could drag and drop a bunch of PNGs into MMF2. Seems like that should be possible by now. Or is it and I'm doing it wrong? /off-topic

 

  		
  		

ZeroFun



Registered
  08/06/2010
Points
  4
8th June, 2010 at 16:56:12 -

Tought the one i just toldd is only for movement..

 
"How'd i type it so that you guys can see it?" -- idiots@irc

joolsvurn



Registered
  24/05/2010
Points
  60
9th June, 2010 at 01:22:32 -

This is what I would do. I'm not sure how much memory this would use up, but you could make 4 active objects that divide the entire screen, like:

-----------

| 1 | 2 |
-----------
| 3 | 4 |
-----------


Then have spacebar activate a counter, Counter A:

Upon pressing spacebar, 

and counter A = 0:
-set counter A to 1.


When Counter A = 0, we aren't recording macro. When the Counter A = 1, we are.

Then we keep track of which object the mouse collides with with the INI object. Group "1" will be x coordinates, and Group "2" will be y coordinates. Also, a second counter, Counter B, keeps track of how many collision have been made.

when the counter A = 1,

and mouse collides with active object 1:
-set groupItemValue of the ini to group 1, item str$(the value of counter B), value (desired x position)
-set groupItem Value of the ini to group 2, item str(the value of counter B), value (desired y position)
-add 1 to counter B


Then copy and paste this for the other 3 objects:

when the counter A = 1,

and mouse collides with active object 2:
-set groupItemValue of the ini to group 1, item str$(the value of counter B), value (desired x position)
-set groupItem Value of the ini to group 2, item str(the value of counter B), value (desired y position)
-also, add 1 to counter B


Etc.

Now, when we press enter, we'll exit macro record mode:

Upon pressing enter:

-set counter A to 0


Then we'll have the M key be the button that recalls the macro. You could do a loop or whatever at this point, but I'll just do a simple third counter, Counter C. You'll basically have:

Upon pressing M,

and counter A = 0,
and repeat (value of counter B) times:
-set mouse x to the value of grouItemValue of the ini group 1, item (value of counter C)
-set mouse y to the value of grouItemValue of the ini group 2, item (value of counter C)
-add 1 to counter C


Now, this is just the basic idea. The mouse would jump from point to point, so you might want to integrate a simple custom movement for it to make it move smoothly. You could also make it more precise by adding more active objects, maybe dividing the screen into 9 segments or more.

Also, I never have tried anything like this out. This is just how I would try it. I might test it out in MMF2 later to see if it actually works.

Good luck!

 
It's just a way to stay alive, boy.

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
9th June, 2010 at 05:19:26 -

You're better off to use a scripting program to do this.
I've made all kinds of simple scripts for games, usually just to do mundane tasks automatically like selling all the gems in a bag without having to drag them one by one to the shop ... with a simple script I can just hit a hotkey and it'll do what I tell it to do.

Simple scripts for mmorpgs are much easier to make with a script program than making anything is in TGF or MMF.
There's usually a nice group of people who can help you in the scripting community too.
Sometimes they'll already have most of what you need. It's still going to take focus and patience to learn no matter what you do.

I DO NOT recommend TGF, MMF (1 or 2), GameMaker, Construct, or any other similar game developing utilities for what's made so much easier with a regular free scripting tool. AutoIt is one you could try, but there's other better ones out there.
Put those search engines to use.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
12th June, 2010 at 14:58:38 -

What they said ^.

Theres an example of a record feature that I saw on sonic fan games hq a looooooooooooooong time ago. I bet its still there. It records the players movements and plays them back, but you can probably incorporate it into mouse movements as well.



 
n/a

markno2



Registered
  06/06/2006
Points
  865

Game of the Week WinnerVIP MemberPicture Me This Round 30 Winner!Weekly Picture Me This Round 39 Winner!Kliktober Special Award Tag
12th June, 2010 at 18:12:37 -

Thanks for the advice gise, although I really just wanted someone else to make it for me, since I don't have MMF2. Sorry.

I know there are macroing programs available, but I've had an account in this game for almost ten years now... Don't want it being banned or anything. >:

 
Discarded pizza boxes are an indispensable source of cheese.

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
12th June, 2010 at 21:57:17 -

If you don't want to risk your account being banned then abandon this idea!

 
n/a

joolsvurn



Registered
  24/05/2010
Points
  60
15th June, 2010 at 04:30:31 -

I completely misunderstood what you were asking for marky_2. I thought you wanted mouse micros for your game!

 
It's just a way to stay alive, boy.
   

Post Reply



 



Advertisement

Worth A Click