+  planetsuper forums
|-+  Main» Games» Paintball2» scripting actions
Username:
Password:
Advanced Search
Pages: [1]
  Print  
Author Topic: scripting actions  (Read 951 times)
{appy Hamper
Junior Member
*
Posts: 31


« on: Feb 06, 2007, 03:46 PM »

Is there a way to script multiple actions (like addbot) into one alias?

for instance:

bind "f" "botted"
alias botted "addbot;addbot;addbot;addbot;addbot;addbot"

So far the game will only read the first one, or none of them depending on the action.  Is there a different format I should be using?  I thought of sticking "wait"s in between, but I've been told that doesn't work either.
Logged
tipsyhitman
Member
**
Posts: 106


« Reply #1 on: Feb 06, 2007, 04:37 PM »

This a local server?
Logged
Zorchenhimer
Senior Member
***
Posts: 419



« Reply #2 on: Feb 06, 2007, 04:55 PM »

... Behind a proxy... just like me. Smiley
Logged

"We Americans are freedom loving people and nothing says freedom like getting away with it" -Guy Forsyth

Galbadia Hotel - Soundtracks
Eiii
Member
**
Posts: 181


« Reply #3 on: Feb 06, 2007, 05:48 PM »

...that doesn't have anything to do with this.

Try sticking 10 or 15 waits inbetween each one.
Logged
Zorchenhimer
Senior Member
***
Posts: 419



« Reply #4 on: Feb 06, 2007, 06:21 PM »

Just curious, how long it one "wait"?
Logged

"We Americans are freedom loving people and nothing says freedom like getting away with it" -Guy Forsyth

Galbadia Hotel - Soundtracks
jitspoe
Platinum Member
***
Posts: 1511



« Reply #5 on: Feb 06, 2007, 07:01 PM »

One frame, so it depends on your framerate.  Many commands are flood protected, so you have to wait about a second before executing them again.   If you added like 20 bots simultaneously, you'd probably overflow.
Logged

BALETED!
{appy Hamper
Junior Member
*
Posts: 31


« Reply #6 on: Feb 06, 2007, 07:25 PM »

For bots I just ended up binding a key to switch mouse1 to "addbot."  That adds them at a fairly quick rate.

If I put an alias inside another one will it execute that one too?

bind "f" botted
alias botted "addbot;wt;addbot;wt;addbot;wt;addbot"
alias wt "wait;wait;wait;wait;wait;wait;wait;wait;wait;wait"

Will it read that?
Logged
jitspoe
Platinum Member
***
Posts: 1511



« Reply #7 on: Feb 06, 2007, 07:26 PM »

yeah, that should work.
Logged

BALETED!
Zorchenhimer
Senior Member
***
Posts: 419



« Reply #8 on: Feb 06, 2007, 07:45 PM »

I did that with 15 wait's in the alias, but it only got to the second command and went no further. Would it help if vsync was turned on to make "wait" equal more time?
Logged

"We Americans are freedom loving people and nothing says freedom like getting away with it" -Guy Forsyth

Galbadia Hotel - Soundtracks
jitspoe
Platinum Member
***
Posts: 1511



« Reply #9 on: Feb 06, 2007, 08:02 PM »

It might.
Logged

BALETED!
Shadow
Junior Member
*
Posts: 42



« Reply #10 on: Feb 08, 2007, 09:17 AM »

yes but u can just add more waits in there Smiley
and jits could u maybe add an wait "time in ms" function ?
and 2. sry but can u increase script buffer or idk what it is cause my configs going to be deleted everytime Sad and theres a addtext: message buffer_overflow or sth like this Sad
Logged
Zorchenhimer
Senior Member
***
Posts: 419



« Reply #11 on: Feb 08, 2007, 09:21 AM »

yes but u can just add more waits in there Smiley

I could, but it wouldn't do anything. Eventually you get so many in there that some buffer somewhere gets full or overflowed or something.
Logged

"We Americans are freedom loving people and nothing says freedom like getting away with it" -Guy Forsyth

Galbadia Hotel - Soundtracks
Shadow
Junior Member
*
Posts: 42



« Reply #12 on: Feb 08, 2007, 09:23 AM »

no thats 2 different things ^^ the waits are for hammer the buffer thing is probably my profile script ...
Logged
Zorchenhimer
Senior Member
***
Posts: 419



« Reply #13 on: Feb 08, 2007, 12:33 PM »

Either way something gets overloaded and brings the script to a screeching halt.
Logged

"We Americans are freedom loving people and nothing says freedom like getting away with it" -Guy Forsyth

Galbadia Hotel - Soundtracks
jitspoe
Platinum Member
***
Posts: 1511



« Reply #14 on: Feb 08, 2007, 12:46 PM »

I think waits freeze up all your input, so if you were to wait for like a second or more, you wouldn't be able to control anything during that time period.  The other problem with waiting for a specific amount of time is that people could abuse it and write scripts that would be constituted as cheating.
Logged

BALETED!
PiCaSSo
Guest
« Reply #15 on: Feb 08, 2007, 01:04 PM »

I'll bet they already have/are...
Logged
{appy Hamper
Junior Member
*
Posts: 31


« Reply #16 on: Feb 08, 2007, 07:13 PM »

sry but can u increase script buffer or idk what it is cause my configs going to be deleted everytime Sad and theres a addtext: message buffer_overflow or sth like this Sad

The limit is 8kb's.  What I have to do is have a {apps.cfg that I load everytime I play, and I have another config I can exec with a bind to bring up more scripts.
The original config.cfg will combine everything you use when you play so mine ends up like 14kb.  It erases itself when I start the game, but then I load {apps.cfg and I have everything again.
If I have inspired you to do that, then make sure you put commands in your alternate .cfg that will not change when you switch back to the normal .cfg

ex.  I exec {apps2.cfg where I have a bind to set fov120.  If I exec back to {apps.cfg it will reset the fov to 90 (or whatever it is already set at in that file)


Logged
Shadow
Junior Member
*
Posts: 42



« Reply #17 on: Feb 10, 2007, 01:01 PM »

yes i know this ... the problem is ... when i exit the game the script i executed is now on the config.cfg so its too big and will deleted ...
but i have an idea ...
on startup with an autoexec.cfg

writeconfig blah.cfg
exec scripts.cfg`s

and on quit
exec blah.cfg
but it doesnt work for me cause i have like some 100 cvars which will be deleted then ... -.-


an i need many cvars and many aliases
cause all the new menus i made and the scripts are completly dynamic i have to make it like this cause there isnt any if function ^^ and i use cmds working like this
cmd $$$hm$$$$hm2$$$$hm3$$$
f.e.
hm = Alias
hm2 = for
hm3 = quit

the cmd which would be executed is

Aliasforquit

alias Aliasforquit quit

... im making things like this ...
the menus are creating aliases using cvars ...

and one thing i made is the profile script thats why my buffer is oversized ...

it looks like this:

Code:
bind Shift +Shift
alias +Shift "seta Shift Up"
alias -Shift "seta Shift Down"
bind 1 "keyscript1$$Shift$$"
bind 2 "keyscript2$$Shift$$"
...
alias keyscript1up "keyscript1$$profile$$"
alias keyscript11 "..."
alias keyscript1down "set profile 1"
so when shift is pressed and u press a number it will set the profile cvar to the number if shift is released the alias for the current setted profile and the nr. shich is pressed will be executed ... ^^
its very usefull but needs too many aliases for the buffer
« Last Edit: Feb 10, 2007, 01:16 PM by Shadow » Logged
{appy Hamper
Junior Member
*
Posts: 31


« Reply #18 on: Feb 10, 2007, 05:10 PM »

yeah then you need a bigger limit.  sorry. Embarrassed
Logged
Pages: [1]
  Print  
Show unread posts since last visit

 
Jump to: