Chips' Fun House Forum Index

Post new topic   Reply to topic

View next topic
View previous topic
Page 1 of 1
Chips' Fun House Forum Index  ~  Our Clubhouse - General Discussion  ~  Script Menuing 101
Author Message
Spider Man
PostPosted: Thu Jul 13, 2006 9:35 pm  Reply with quote
Forum Sniper
Forum Sniper


Joined: 23 Jan 2005
Posts: 665
Location: Kentucky

This got buried so I thought I'd post it again.

Code:

//say menu
developer 1

//say aliases
alias greet1 "say hi;rebind"
alias greet2 "say Hello %i;rebind"
alias greet3 "say_team I am behind you %i;rebind"
alias greet4 "say How many kills you got today, %i?;rebind"
alias taunt1 "say Your going down %i;rebind"
alias taunt2 "say Good Fight %i, I have %a Armor and %h Health left;rebind"
alias taunt3 "say That must have hurt %i, but I have %a Armor and %h Health left;rebind"
alias taunt4 "say Roses are red, Violets are blue, You'll be dead when I frag you;rebind"
alias help1 "saveme; say_team I need a Medic, I'm down to %h Health;rebind"
alias help2 "saveme; say_team I need an Engineer, I'm down to %a Armor;rebind"
alias help3 "say_team I need backup, quick!;rebind"
alias help4 "say_team Follow me, %i, and we'll score some frags!;rebind"
alias help5 "say_team Wait for me, %i, I can help you get some frags;rebind" 

//CfH Rules
alias rule1 "say Lameness and stupidity of all kinds permitted...just deal with it.;rebind"
alias rule2 "say No racism, foul language or abuse...you will be perm banned.;rebind"
alias rule3 "say Custom sprays allowed...offensive sprays are an immediate ban.;rebind"
alias rule4 "say Players must have a name...not "player" or anything offensive.;rebind"
alias rule5 "say Mics are open to all teams...everyone can talk to everyone.;rebind"
alias rule6 "say DO NOT block the map with the radios. They must not hinder play.;rebind"
alias rule7 "say Play detrimental to your team not permitted.;rebind"

//menu aliases
//Main
alias menu1 "echo 1) Greetings; echo 2) Taunts; echo 3) Team Help; echo 4) Rules;  bind 1 menu2; bind 2 menu3; bind 3 menu4; bind 4 menu5; bind 5 rebind"
//Greetings
alias menu2 "echo 1) Hello All; echo 2) Hello Person; echo 3) Behind You; echo 4) How Many; echo 5) Cancel; bind 1 greet1; bind 2 greet2;bind 3 greet3; bind 4 greet4; bind 5 rebind"
//Taunts
alias menu3 "echo 1) Going Down; echo 2) Good Fight; echo 3) Must have Hurt; echo 4) Ode to the Frag; echo 5) cancel; bind 1 taunt1; bind 2 taunt2; bind 3 taunt3; bind 4 taunt4; bind 5 rebind"
//Help
alias menu4 "echo 1) Need Medic; echo 2) Need Engineer; echo 3) Need Backup; echo 4) Follow Me; echo 5) Wait for me; echo 6) cancel; bind 1 help1; bind 2 help2; bind 3 help3; bind 4 help4;bind 5 help5; bind 6 rebind"
//Rules
alias menu5 "echo 1) Rule 1; echo 2) Rule 2; echo 3) Rule 3; echo 4) Rule 4; echo 5) Rule 5; echo 6) Rule 6; echo 7) Rule 7; echo 8) Cancel;bind 1 rule1; bind 2 rule2;bind 3 rule3; bind 4 rule4; bind 5 rule5; bind 6 rule6;bind 7 rule7; bind 8 rebind"

//must rebind
alias rebind "bind 1 slot1;bind 2 slot2;bind 3 slot3;bind 4 slot4;bind 5 slot5;bind 6 slot6;bind 7 slot7;bind 8 slot8;bind 9 slot9"

//bind a key to script change to suit
bind h "menu1"


Installation:
Save as say.cfg in your TFC folder. Then create a userconfig.cfg in your TFC folder and put "exec say.cfg" in it. Start a game.

Instructions:
Once you press the key it is bound to ("h" in the example) , goto the console to see the categorie options. Then get out of the console before pressing the number assosiated with the category you want. Going back to the console you will see the different say options for that category. Leave the console again and press the number for the say option. That choice will then be inputed to the ingame chat.

Notes:
Sorry for the need to go to the console to actually see the menu's options. Valve farked the developer command, it echoes only to the console, not the top left of the screen.

The menu is put together in such a way that you can easilly memorize the options, and eventually you will not need to goto to the console to use it. For ex. pressing "h 1 2" will imediately send the command "say "hi %i" to the server. 3 keys still beats typing the chat in the old fashioned way.

Tech Notes:
The menu is written in such a way that you can easially see how it was made and what's going on inside it to make it work. It simply creates new commands, or "macros" by use of the alias command, rebinds number keys to some of the aliases, you press a number, and the numbers get rebound to some more aliases, and at the end it binds the numbers back to your weapons.

**************Menu Command Format for noobs***************
*****[optional]***...can add more of same...***(usage notes)*****

DEVELOPER 1 (turns on the echo command, amoung other things.)

ECHO anything[[;echo something else]...] (echos to the console, like a list of menu options)

ALIAS name1 "command1 [[;command2]...]" (make your own macros, or a list of commands to be executed when the macro name is used)

BIND key name1[[;bind key name2]...] (bind a key to your macro or any command. No need for the "+" or quotes for alias macros.)

SAY something (sends something to the chat for all to see)

SAY_TEAM something (sends something to the chat for your team only to see)

; (semicolon, seperates commands on a single line for creating macros)

*********************************************************

Please edit the say aliases as you see fit, and use this as a template to create your own script menus. Enjoy!

Challenge: (no prizes awarded)
create a fourth catagory, for use with this menu.
in this category add chat strings geared toward TFC.
go 1 more level, if you want, so some options will need a third number to be pressed. for examples:
TFC>Enemy seen with flag>locations
TFC>need help>locations
These could come back with chat strings like, "Enemy flagcarrier last seen in the ramproom" and, "Help needed in the flagroom".
Time it took me to complete challenge with 30 new say alias: 25 min.
Post your results!

edit: fixed some errors in and added to the command format section.


Last edited by Spider Man on Sat Jul 15, 2006 3:45 pm; edited 1 time in total

_________________
Somebody mixed Tobasco sauce in my chocolate chip cookie mix!
-[CfH]-Server Admin
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
StaR
PostPosted: Fri Jul 14, 2006 8:41 pm  Reply with quote
Forum H4xor
Forum H4xor


Joined: 09 Oct 2005
Posts: 1378
Location: California

Scripts are for actors
LEAVE IT THAT WAY

_________________
Back to top
View user's profile Send private message
freakn
PostPosted: Fri Jul 14, 2006 10:37 pm  Reply with quote
Forum Medic
Forum Medic


Joined: 15 Dec 2005
Posts: 159
Location: Atlanta, GA

class related binds is where the Money I$ At

_________________
Back to top
View user's profile Send private message
Chance!
PostPosted: Fri Jul 14, 2006 11:39 pm  Reply with quote
Forum H4xor
Forum H4xor


Joined: 30 Nov 2004
Posts: 2918
Location: Raleigh, NC

can we not flame people when they post scripts? just because you don't play that way, doesn't mean that you deserve the right to flame others. this could be used as a metaphor for many other things now that i look at it...

_________________



-[CfH]-Server Admin
Back to top
View user's profile Send private message AIM Address MSN Messenger
Americanboy3
PostPosted: Fri Jul 14, 2006 11:42 pm  Reply with quote
Forum H4xor
Forum H4xor


Joined: 02 Dec 2005
Posts: 1265
Location: Seattle, WA

*cough cough* FALCON

_________________
-"I went all over the world. I had access to beautiful women, champagne and caviar. No, I don't regret a minute of it." -John Symonds

-"A man tells his stories so many times that he becomes the stories. They live on through him, and in that way he becomes immortal." -Big Fish
Back to top
View user's profile Send private message AIM Address
Spider Man
PostPosted: Sat Jul 15, 2006 3:11 pm  Reply with quote
Forum Sniper
Forum Sniper


Joined: 23 Jan 2005
Posts: 665
Location: Kentucky

I see no one has taken me up on the challenge at the end of the post. It should be easy enough. Just go ahead an give it a try!
freakn wrote:
class related binds is where the Money I$ At

If you think so, then make a Spy disguise menu.

Special Easy Challenge just for Freakn:
Open spy.cfg in your TFC folder with Notepad.
A simple 1 level menu should do it.
Bind a key to an alias macro that binds all the numbers to other alias macros that a) disguses you to that class and b) executes the rebind alias macro.
Be sure to include the rebind alias macro, which rebinds the numbers to the weapons.
Need help? Talk to Nerve-ana because he already made, and uses, a disguise menu.
Time to complete challenge: 10 minutes

Even Easier Challenge for Star:
Bind a key to "say I can't play TFC. I'm just an actor who stars in a PC game show called TFC."
time to complete challenge: 10 seconds.

_________________
Somebody mixed Tobasco sauce in my chocolate chip cookie mix!
-[CfH]-Server Admin
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Chance!
PostPosted: Sat Jul 15, 2006 10:36 pm  Reply with quote
Forum H4xor
Forum H4xor


Joined: 30 Nov 2004
Posts: 2918
Location: Raleigh, NC

wasn't it you who i sent my spy disguise menu to spiderman? i've done menu scripting for a long time, it really frees up alot more keys if you like to have lots of binds for keys (like all of you sound spammers don't have to have your entire keyboard bound to a different "say sound.wav" instead you can use just 1 key =P

_________________



-[CfH]-Server Admin
Back to top
View user's profile Send private message AIM Address MSN Messenger
freakn
PostPosted: Sat Jul 15, 2006 11:32 pm  Reply with quote
Forum Medic
Forum Medic


Joined: 15 Dec 2005
Posts: 159
Location: Atlanta, GA

Menu's might be good for sound spamming and odd ball talking ... but i'd rather not sit and scroll through a menu to do a comand when I can do it in a few remembered key stroke .... and I don't loose control of the mouse. Need to perform 30000 task? Might want to reconsider what is and is not important, and shove dedicatd things into class script files. I also use the scroll wheel and fast weapon change, no need for number keys.

Would be nice if the developer print out came back. That was good times.

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
All times are GMT - 5 Hours

View next topic
View previous topic
Page 1 of 1
Chips' Fun House Forum Index  ~  Our Clubhouse - General Discussion

Post new topic   Reply to topic

Jump to:  
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 vote in polls in this forum




Powered by phpBB and Ad Infinitum v1.06