It is currently Tue Sep 07, 2010 3:52 am




Post new topic Reply to topic  [ 3 posts ] 
 The potential of TremFusion 
Author Message
Troll
Troll

Joined: Fri Oct 10, 2008 10:05 pm
Posts: 37
Location: P(r)oland
Post The potential of TremFusion
Tremfusion have a lot of great features. Of course, the best is VOIP, but I'd like to show you other features that are often forgotten, but still useful and nice.

1. Aliases
I really like this one. It works quite like seta+vstr, but instead of creating new cvar, it creates new function that can be used like /quit /disconnect etc.
Code:
/alias alias_name thing to do
- it will create alias "alias_name" which will execute "things to do". Most likely it will say unknown function :)
Code:
/unalias alias_name
will delete alias "alias_name"
Code:
/aliaslist
will show list of all aliases
Code:
/clearaliases
will delete all aliases, be careful with this one.
But you can do awesome things with aliases... a lot of people were asking me about my "Damn You whatever i type here" thing. I used aliases. How?
Code:
/alias damn say Damn You
/damn whatever i type here

Everything after "alias_name" will go after "things to do".

2. Script arguments
I wasn't using this much, but I really should. You can use your arguments when executing custom .cfg file. For example I want to improve Cerra's "you know who needs some balls? nick" thing. Create a file balls.cfg in base/ folder:
Code:
say You know, \$arg_all\  needs some balls!

then go to console and type
Code:
/exec balls.cfg Asvarox

It will output "You know, Asvarox needs some balls!" (liar, btw ;) )
It's better than aliases when you want to put "whatever i type here" somewhere in middle of text, but then you will have to type much more longer text. When you do /exec, thing that you executing will have access to few new cvars
arg_all - shows everything typed after /exec filename.cfg
arg_1, arg_2, arg_n - show n argument typed after /exec filename.cfg (arguments are separated by space bar).
arg_count - shows number of arguments used.
Example: I want to improve my damn thing:
damn.cfg:
Code:
say Damn You \$arg_all\ ! (damned \$arg_count people)


3. The IF command
This one is really useful too. I will show you much more better use for this one. Now basics.
Code:
/if 1 = 1 "say I love You!" "say Damn You!"

now if 1 = 1 it will say "I love you" but if somehow 1 wont be 1, it will say "Damn You".
I know, it's really dumb one.

4. Delay
In normal tremulous we had /wait <time> command, that was locking up our client for <time> frames. In tremfusion we have delay command that works similar, but better
Code:
say RUSH THE ENEMY!
delay 1000 say CRUSH THEM!
delay 2000 say TRAMPLE THOSE ANTS!
delay 3000 say MOVE YOUR FAT ASS AND RUSH NOW!

It's useful, I use it in lots of binds.

There are few other features that I should mention, but i won't because this thread will be too long.
Ok, lets go to the last point:

5. Using everything together
Do you remember our problem with Script arguments? Text that i had to type was WAY too long. Thanks aliases for help! Let's improve improved balls thing. balls.cfg will have same value. Just execute:
Code:
/alias balls exec balls.cfg

Now you will have to type /balls Asvarox instead of "exec balls.cfg Asvarox". But it's really obvious. Let's go ahead, and improve my improved damn thing. As we remember it will output, for example "Damn you Asvarox, Cerra! (damned 2 people)". But when i want to damn only one person, "(damned 1 people)" is unnecessary. How to fix it? Let's go to damn.cfg file:
Code:
if \$arg_count\ < 2 "echo Damn You \$arg_all\ !" "echo Damn You \$arg_all\ ! (damned \$arg_count\ people)"

So if i damn less than 2 people, it won't say "(damned 1 people)", but if will damn 2 or more people, it will say how many.
Ok, this will be the last one. Some servers have antispam system that wont let you say 2 times same thing in short period of time. It's quite annoying when you have just killed rc and you can't notify your teammates well. Sure, you can do multiple saying bind (say thing1;say thing2) but if you pres it 2 times, you won't be able to send any other message for another short period of time. How to fix all those problems? This will be probably the most complicated script in this thread.
1) type in console:
Code:
/seta sayingnow 0

We will need this cvar to define, if we are using script while it's still executing, so we won't be able to accidentally flood.
2) create file attack.cfg:
Code:
set sayingnow 1
say_team RUSH NOW
delay 1000 say_team THEY ARE WEAK, CRUSH THEM!
delay 2000 say_team MOVE YOUR FATTY ASSES AND RUSH!
delay 3000 set sayingnow 0

first line sets sayingnow cvar to 1. Why? You will see. Then teamspam goes. When you use this script it will say "RUSH NOW", then after 1 sec "THEY ARE WEAK, CRUSH THEM!" and after 2 secs (of using the script) "MOVE YOUR FATTY ASSES AND RUSH!". Last line will be executed after 3 seconds. It sets sayingnow again to 0. Why after 3 seconds, not 2? DO NOT FLOOD.
Ok, now how we can use this script?
Code:
/if \$sayingnow\ = 0 "exec attack.cfg"

This will execute attack.cfg only when sayingnow cvar is 0. Basically it's almost always 0. It will become 1 only when attack.cfg is executing.

It took me over 1 hour to write this. There's still a lot of great features that i didn't mention here, like toggle or prompt. You can read about them here, at Feature List page.

Thanks for reading!

_________________
My troll is back!


Wed Nov 26, 2008 6:30 pm
Profile
Developer
Developer
User avatar

Joined: Wed Oct 01, 2008 5:27 pm
Posts: 108
Location: Utah, USA
Post Re: The potential of TremFusion
Totally awesome thread Asva. Thanks. It's going in our manual, on the wiki!

-Ender


Thu Nov 27, 2008 4:03 am
Profile

Joined: Sat Nov 15, 2008 3:14 am
Posts: 3
Post Re: The potential of TremFusion
Just what I was looking for. Couldn't find it on the wiki.

thanks.


Tue Mar 17, 2009 2:46 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.