Forums Index >> Modding >> Macro for thinktanks?



Page : <1> :


This may take some of the fun out of thinktanks, but... Have you ever thought of making a macro so that a computer controls the tank? This might be good if you have to do something real quick and dont want the tank just to sit there! I dunno if its possible though 8o

 

Thursday, July 06, 2006 at 7:47:59 AM

Easy to set an ai on your tank if you're hosting :P


Thursday, July 06, 2006 at 9:10:19 AM

But I want it so that a person can do it anywhere :P

 

Thursday, July 06, 2006 at 9:12:16 AM

Unless the server had a script, you really cant do it [easily]... Ah well :P


Thursday, July 06, 2006 at 9:14:40 AM

Ok. I was just wandering if it was a good idea... :(

 

Thursday, July 06, 2006 at 9:54:12 AM

^^&^^^&^^^^...you all put ":P" at the end..... :P

No clue what a marco is :(

Do you mean like a marco polo game type? :o

Sunday, July 09, 2006 at 3:06:43 PM

^ Macro = Program/Script/Whatever that makes the game/program act like a human was there, but isn't, more like an "autoer", or a program that automatizes tasks... For example, setting a bot ai to a human player is setting a macro, using programs to automatically do tasks for you is a macro... Then there's the office-kind of macro, programs designed to do stuff... To make the document more "dynamic" (and dangerous if they have bad intentions)


Sunday, July 09, 2006 at 4:32:24 PM

Ah....I get it, not really

Well, doesent matter to me cuz its summer, the only time I dont have to think :P well, I never think anyways so... :P

Monday, July 10, 2006 at 7:24:03 AM

Well, Im not, I script games, but not inside a game to make a marco polo game ;)

Monday, July 10, 2006 at 9:29:46 AM

^ You CODE games, and don't know what a macro is...? What a hell of a coder you are, it's basic knowledge :S


Monday, July 10, 2006 at 10:38:26 AM

Art, ^^ is probably just a script kiddie. XD

Monday, July 10, 2006 at 12:19:23 PM

OR ^^^ is lying, no offense donut :)


Monday, July 10, 2006 at 12:26:18 PM

Lying? What...I script in Flash, want me to show you???????? I can make an animaton in 24 hours with good graphics and such

I made one game, and I did script it, its called action scritpting for Flash MX 2004 so ha 8o

Monday, July 10, 2006 at 12:47:41 PM

Ah, okay, I'm sorry, but there are so many people of that liar kind today... We can't ever be sure ;)
Anyways I'm really surprised you dont know what the word macro means, but know how to work with Flash MX..


Monday, July 10, 2006 at 1:59:38 PM

Hmph, I think you could just set a hotkey to activate a bot script (as Art said earlier). And as it's activated, something comes up by your name that says [away] or something like that. Well, I can't script to save my life, but I think this could be a cool project for you Art %).


I used to eat a lot of natural foods until I learned that most people die of natural causes.

Tuesday, July 11, 2006 at 6:22:41 AM

^^Yea, im a beginer in Flash MX, moslty I animate cartoon stick figures, and just script the main menu and such B)

Tuesday, July 11, 2006 at 7:56:06 AM

Heres what I have so far. Now I just want you to know, im VERY new to scripting so...

If (!$server::dedicated) {
moveMap.bindCmd(keyboard, "p", "", "%client.player.setai(GoldLightAI);"

@ all good scriptors. Is this correct? Is there any mistakes? Plz I want to do this :S

 

Last edited: Thursday, July 13, 2006 at 8:10:26 PM

Thursday, July 13, 2006 at 6:10:42 PM

Nope, wrong... I'm not in the mood to tell you how to fix it, but on ACAS you can just write /possess NAME and /unpossess NAME


Friday, July 14, 2006 at 6:06:21 AM

Heh I usually just use other programs to do macro'ing for other games such as RPG's but yeah never tried it for shooting games before.

Tuesday, July 18, 2006 at 8:37:51 PM

@ Cas Im bored need ideas - Well heres one! Im glad theres a scriptor that will help me with my idea! :)

Im kinda new to scripting.. But that looks good to me! :P I hope we can make this work!

 

Tuesday, July 18, 2006 at 8:57:10 PM

 

 

Im glad theres a scriptor that will help me with my idea!

 

Finally I can do something. :)

 

Im kinda new to scripting

 

And so am I

 

I hope we can make this work!

 

Same thoughts here

 

 

 

 

Tuesday, July 18, 2006 at 11:29:15 PM

(I deleted above post, due to unrelating atm)
--
Okay, I started from scratch, and got the whole damn thing to work (exept some bugs that need to be fixed, plz note, you may try it, but I wouldn't)

 


//Main-Function
f unction macro(%client)
{
$len = clientgroup.getCount();
for($I=0; $I<$len; $I++)
{
%client = clientgroup.getObject($I);
%client.player.setai(GoldLightAI);
messageall(1, %client.namebase SPC "Is Now A Bot!" ,1);
$SaveTeam[%client] = %client.team;
$SaveName[%client] = %client.namebase;
%client.namebase = $SaveName[%client]@" [Bot]";
removeTaggedString(%client.name);
%client.name = addTaggedString("cpc8" @ %client.namebase @ "co");
return;
}
}

//Bind
m oveMap.bind(keyboard,"F12",macro);

 

Bugs (could someone help me fix?)
- The [Bpt] Piece Doesn't Appear @ ScoreBoard
- When You Get Killed, You're Back Normal State
- The bind. ATM you have to type macro(); into console
- When you get killed (and you switch back normal) the [Bot] Piece Stays (in your name, but not at Scoreboard (duh, it never appeared @ scoreboard)
- The GoldLightAI is a bit "silly"
- Only serverside (hmm, I don't think it should work client-side, or does it need to?)
- When you type macro(); into console, everybody get macroëd (you can fix by typing: CADD.macro();

Bugs I guess I can fix (of the above)
- Silly GoldLightAI to UberGoldLightAI
- When you get killed (and you switch back normal) the [Bot] Piece Stays (in your name, but not at Scoreboard (duh, it never appeared @ scoreboard)

 

 

 

 

 

Last edited: Wednesday, July 19, 2006 at 1:45:07 AM

Wednesday, July 19, 2006 at 1:14:42 AM

^It's all easy to fix... Except server-side part, there must ALWAYS be some code in the server :)

Anyways, I prefer the /possess and /unpossess codes in ACAS


Last edited: Wednesday, July 19, 2006 at 5:44:15 AM

Wednesday, July 19, 2006 at 5:43:21 AM

 

 

Anyways, I prefer the /possess and /unpossess codes in ACAS

 


Yeh, you're quite right.

 

 

 

 

Wednesday, July 19, 2006 at 6:42:49 AM

What? Your giving up??! Nooooo!!!! :S :P

I really want to work with you on this project so please. Dont give up yet! :o

And I would like it to be client side also so then they can do it anywhere.

(This may sound a bit noobish but where do I put this macro function?)

 

Last edited: Wednesday, July 19, 2006 at 8:08:46 AM

Wednesday, July 19, 2006 at 8:03:58 AM
-z-

I used to have a little script that changed control of my tank from Human to (relevant tank) AI (i.e. GoldHeavy if I was in a heavy) whenever the chat box was up, and reverting again as soon as the chat box was cleared - but I'm a long way from home now and don't have any of that code. However.. Just thought I'd pass on the idea to those attempting something.

It worked pretty well - except when playing CTF - whenever I tried to chat whilst in the goal with the flag... My tank would attempt to drive off. I never got round to writing in an exception for MissionType = CTF. Ah well..

-Z-

 

 

 

 

Wednesday, July 19, 2006 at 8:22:42 AM

@ Radi8 : No, I'm not giving up. I'm just thinking AC is quite right.
@ Radi8² : Yeh, I know the client-side would give this a new shape.
@ -Z- : That idea seems possible.. Ty for it

EDIT: Some bugs are fixed
Fixed Bugs
- there's a function leavemacro(); (still consoled) that deletes [Macro] from your name, and gives you the controll about tank
- Using new AI now (MacroAI) (twice as better then GoldLightAI)

 

 

 

 

Last edited: Wednesday, July 19, 2006 at 8:44:10 AM

Wednesday, July 19, 2006 at 8:34:33 AM

@cas - ok sorry I thought that... How did you make an AI? Or did you just edit the goldAi in the Tankai.cs?

@-Z- yes, Thank you for that idea

And where do I put this macro function? Do I put it in game/client/scripts, then exec it in the main.cs? Or what? 8o

 

 

Last edited: Wednesday, July 19, 2006 at 8:48:21 AM

Wednesday, July 19, 2006 at 8:45:59 AM

@-z-
It's easy, but I guess it was server-sided? Well, you'd ALWAYS need some script in the server, unless BT have been hiding something from us the whole time :P


Wednesday, July 19, 2006 at 1:15:13 PM

I made it now so you can "Unmacro" your self. Just add this to the main.cs file. Im still trying it for client

EDIT: How do you make it so when you die, your still macoring?

//Main-Function
function macro(%client)
{
$len = clientgroup.getCount();
for($I=0; $I<$len; $I++)
{
%client = clientgroup.getObject($I);
%client.player.setai(GoldLightAI);
messageall(1, %client.namebase SPC "Is Now Macroing!" ,1);
$SaveTeam[%client] = %client.team;
$SaveName[%client] = %client.namebase;
%client.namebase = $SaveName[%client]@"[Macro (Not Here)]";
removeTaggedString(%client.name);
%client.name = addTaggedString("cpc8" @ %client.namebase @ "co");

Return;
}
}
//Bind
moveMap.bind(keyboard,"F12",macro);

Function unmacro(%client)
{
$len = clientgroup.getCount();
for($I=0; $I<$len; $I++)
{
%client = clientgroup.getObject($I);
%client.player.setai("");
%client.setControlObject(%client.player);
messageall(1, %client.namebase SPC "Is not macroing anymore." ,1);
$SaveTeam[%client] = %client.team;
$SaveName[%client] = %client.namebase;
%client.namebase = $SaveName[%client]@"";
removeTaggedString(%client.name);
%client.name = addTaggedString("cpc8" @ %client.namebase @ "co");

Return;
}
}
//Bind
moveMap.bind(keyboard,"F11",unmacro);

 

Last edited: Wednesday, July 19, 2006 at 1:46:32 PM

Wednesday, July 19, 2006 at 1:22:51 PM

Look, WHY DOESN'T ANYONE GET IT!!!!? I'VE SAID THIS A MILLION TIMES!
THIS CODE IS SERVER-SIDE! THERE'S NO WAY TO MAKE IT CLIENT-SIDED USING TSL!!! SO STOP TRYING TO MAKE CLIENT SIDE WORK! THE SERVER WILL ALWAYS, ALWAYS, ALWAYS, ALWAYS, ALWAYS, ALWAYS, HAVE TO HAVE SOME CODE! GET IT?
I'LL EXPLAIN EASIER:
CLIENT SIDE = IMPOSSIBLE UNLESS SERVER HAS SOME CODE
GET IT? ARGH YOU ALL ANNOY ME!

Ahhh... I feel better now... Thank you for reading...
Well... I hope you all understood my message ;)
Oh, and if you want a client-and-serversided code already done, just use ACAS (or steal the code from it, remember its open-source)

@Admins/Mods
Sorry for the CAPS LOCK and the bold, but there's no other way to make these people understand. Hope you forgive me :)


Last edited: Wednesday, July 19, 2006 at 2:55:20 PM

Wednesday, July 19, 2006 at 2:52:23 PM

@ art - I already knew that. Its just I wish there was... :( soo I understand. And if I didnt understand. This would be the first time you tried to make me understand, so the the part

 

But there's no other way to make these people understand.

 

Isnt exactly very kind to me. But... I bet your post is to alot of other ppl

;)

 

Wednesday, July 19, 2006 at 9:42:15 PM

I've already said that it can't be done client-sided if the server has no codes in this thread hundreds of times, and you still

 

Im still trying it for client

 

So I thought you still hadn't understood

 


Thursday, July 20, 2006 at 4:36:04 AM

Oh well... I did... And could you test my little instant possess thing on your computer? Im pretty sure it works..

 

Thursday, July 20, 2006 at 9:39:21 AM

Yes, it'll probably work, if you use the "create-server" button, why? Because the script will be running in a both client/server game! If you run dedicated it will NOT work, get it? NOT


Thursday, July 20, 2006 at 10:08:04 AM

Ok, now I give up. Gluck!

 

 

 

 

Thursday, July 20, 2006 at 10:16:33 AM

Well. You dont have to... Ive already made it..... (Kinda) only for server side

 

Saturday, July 22, 2006 at 8:21:38 PM

Ok just add this to your main.cs and press F12 to macro your self. And F11 to unmacro your self. And YES I KNOW ITS ONLY FOR SERVER SIDE!!! And its hard to make it client side.

 

                                        
//Main-Function
function macro(%client)
{
$len = clientgroup.getCount();
for($I=0; $I<$len; $I++)
{
%client = clientgroup.getObject($I);
%client.player.setai(GoldLightAI);
messageall(1, %client.namebase SPC "Is Now Macroing!" ,1);
$SaveTeam[%client] = %client.team;
$SaveName[%client] = %client.namebase;
%client.namebase = $SaveName[%client]@"[Macro (Not Here)]";
removeTaggedString(%client.name);
%client.name = addTaggedString("cpc8" @ %client.namebase @ "co");
Return;
}
}
//Bind
moveMap.bind(keyboard,"F12",macro);
Function unmacro(%client)
{
$len = clientgroup.getCount();
for($I=0; $I<$len; $I++)
{
%client = clientgroup.getObject($I);
%client.player.setai("");
%client.setControlObject(%client.player);
messageall(1, %client.namebase SPC "Is not macroing anymore." ,1);
$SaveTeam[%client] = %client.team;
$SaveName[%client] = %client.namebase;
%client.namebase = $SaveName[%client]@"";
removeTaggedString(%client.name);
%client.name = addTaggedString("cpc8" @ %client.namebase @ "co");
Return;
}
}
//Bind
moveMap.bind(keyboard,"F11",unmacro);

 

 

 

Last edited: Monday, August 14, 2006 at 10:05:04 AM

Thursday, August 03, 2006 at 9:43:12 AM

I still don't get why you don't use "/possess" and "/unpossess" if you're an ACAS user! It just doesn't change your name to [macro] (something you never are, you're just being droven by an ai)


Friday, August 04, 2006 at 7:43:59 AM

Wow thanks! I'm going to use this :)

...................
Pellet eating Carnivores!!!
Get Insaniquarium, you weak minded fool....

Wednesday, August 09, 2006 at 6:37:32 AM

Page : <1> :

insert quote insert url insert email insert image bold italic underline superscript subscript horizontal rule : : Help on using forum codes

Add comment:

HTML is disabled within comments, but ZBB Code is enabled.

Back to the top

Web site designed, maintained and funded by -z- and Dan MacDonald