Pages: [1]
  Print  
Author Topic: Making OpenArena Scripts  (Read 6473 times)
nba.richforever
Guest
« on: May 12, 2012, 08:22:30 PM »

ive seen and heard in the past that players have been using scripts they made in there cfgs and i was wondering how do you make a oa script?

i just know how to play the game Smiley
Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #1 on: May 12, 2012, 08:23:23 PM »

You don't need scripts to play. Just decent reflexes
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
RMF
Member


Cakes 12
Posts: 694



« Reply #2 on: May 13, 2012, 07:28:18 AM »

Scripts work like any command in the game, only they are in a series. You can place a .cfg file in the folder of the mod you want to use them in, and then use /bind X exec your_script.cfg to execute it. You can do things like automatic rocketjump scripts (which look down, jump and shoot at the same time, and then reset your view), or even automatic strafejump scripts. These are considered cheating by most, and are usually prohibited in competitions. I've tried them before, but it also doesn't place nicely for me. I'm not going to give you instructions to create these scripts, you can probably find more resources than you need with a little bit of searching.

The scripts can also be used for other purposes, mostly for server administration. For example most servers use a maps.cfg file (or it's in their server.cfg) which initiates a map rotation. In these files it says something like this:
set map1 "map oasago2; set nextmap vstr map2;"
set map2 "map ps37ctf; set nextmap vstr map3;"
set map3 "map pul1ctf; set nextmap vstr map1;"
vstr map1

"vstr" means "execute this series of commands". The commands work like in a script, only are written between quotes ("") and, as far as I know, need to be written on a single line. Each command is separated by a semi-colon (;). When you do "vstr map1", it will execute "map oasago2; set nextmap vstr map2". So it changes the map to oasago2, and when the game needs to go to the next map (either by callvote, when the game ends, or when you manually do "/rcon vstr nextmap"), it will execute the string "vstr map2", which will change the map and set the nextmap to "vstr map3"... Then map 3 goes to map1 again, etc.

Another purpose would be to do a series of things you would usually have to do yourself. One example is changing the mouse sensitivity per weapon. You could do this in a script:
changeToRocketlauncher.cfg:
weapon 5
sensitivity 3
(Well I think weapon 5 is the rocket launcher, I might be wrong.)
Then ingame:
/bind r exec changeToRocketlauncher.cfg
When you press the R now, it will execute that script.
Alternatively, you can do this all ingame by vstr without any script:
/bind r vstr "weapon 5; sensitivity 3;"
But if a series of commands gets very long it's harder to do this. Also a script is really a file, something you can easily copy. Any binds you make like this are saved to q3config.cfg, which often gets overwritten or reset if you play a bugging mod or server.

You can do many more with this like spamming the chat, changing your name rapidly 100 times a second, cheat by automatically rocketjumping, but none of these are really recommendable. You'll just end up being banned from servers and nobody will like you or permit you to join their clan. (Well, any self-respecting clan. LoL might still take you.) Tongue

Any questions? ^^
Logged
nba.richforever
Guest
« Reply #3 on: May 13, 2012, 07:58:39 AM »

Yes i got a little more understanding of how they work and are made but now need to know the words to type


such as vstr

and map1 and stuff??

some cvars and settings can be made on your own?

or is map1 understood by the game?


i wil never use script to cheat just would like to know how to do them for useful tasks


:::: how do i know what i can and cant put such as

vstr vol_down
vstr vol_up


vstr map
vstr map2

etc how do i know what to put?
« Last Edit: May 13, 2012, 08:28:43 AM by nba.richforever » Logged
7
Member


Cakes 7
Posts: 278


Is 7 up?


« Reply #4 on: May 13, 2012, 10:46:44 AM »

The best way to learn is to download a few Quake 3 configurations (google on quake 3 config), open them with a text editor and find out what the commands do by looking them up in a console command list. The DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/]OpenArena wiki has some OpenArena specific information and there are several console command lists online.
Logged

I'm on the ten most wanted list, I've got it dead in the groove.
My face is on every wanted poster in town, for the way I move.
Pages: [1]
  Print  
 
Jump to: