r/Tf2Scripts • • Apr 10 '13

Satisfied [Request]Medic uber.

I would like a script that on a right click will switch from my current weapon pop uber and say in chat "Uber popped" Or If I press 4 will fake uber. Thank you in advanced.

8 Upvotes

7 comments sorted by

3

u/clovervidia Apr 10 '13

The only problem I see is that this would need wait commands, which may crash your game if the server has them disabled.

Since you can't immediately use a weapon once you switch you it (you gotta wait a little bit), this can't be achieved with scripts without using the wait for delays.

If you know for sure the server you plan to use this on has wait enabled, then I can make it using the command. Otherwise you would have to do it manually.

Alternatively, I could make it so that you press MOUSE2 to switch to the medi-gun and release to pop the uber and send the chat message.

Which option would you prefer?

2

u/[deleted] Apr 11 '13

The 2nd option (:

5

u/clovervidia Apr 11 '13 edited Apr 12 '13

This should do the trick:

//+ Über with MOUSE2 Alternate
alias sayUber "say_team Über popped"
alias switchUber "+attack2; sayUber; -attack2"
alias +uber "slot2"
alias -uber "switchUber"
bind "MOUSE2" "+uber"
//-

When you press right-click, it switches to your medi-gun and when you release, it will Über then tell your team through team chat.

Ask me if it breaks or something.

1

u/Kered13 Apr 12 '13

This never calls -attack2, so it will have problems. Either future ubers will immediately pop, or you won't be able to pop them at all (I'm not sure which).

If you hold mouse2 until the switch finishes, this will work:

alias sayUber "say_team Uber popped"
alias +uber "slot2; sayUber; +attack2"
alias -uber "-attack2"
bind mouse2 +uber

1

u/clovervidia Apr 12 '13

True. I indeed missed that. But instead of having to hold it, I thought holding to pull out the medi-gun then releasing to activate the charge might work better.

Updated mine, putting the -attack2 right after the sayUber. Not able to test it at the moment, butit should work now.

1

u/Kered13 Apr 13 '13

No. Without any wait in between the +attack2 and -attack2 will cancel out and not do anything. And you don't want to use wait for reasons that have been stated many times before in other threads.

If you want to leave it all on one button, then you need to do something like I posted.

0

u/Shaggy_Xx Apr 12 '13

Idk if this is exactly what you want, I spent like 5 hours messing with autoexecs 2 days ago or so and this is what I currently have.

alias +charge "+attack2;slot2;dropitem;voicemenu 2 4;say_team "(>^.^)> POPPING THE UBES <(^.^<)""
alias -charge "-attack2"

alias fake ""voicemenu 1 7";say_team "*** FAKED THE UBES ***""

bind mouse2 "+charge"

bind v "fake"

then make another autoexec cfg file called "resetmedcfg" and put this in it:

alias "resetmedcfg" "bind mouse2 "+attack2";bind mouse3 "+attack3";bind v "+record";bind f "inspect"; echo "*** MEDIC CONFIG UNLOADED ***""
resetmedcfg

and put:

exec resetmedcfg

in every class execp meds autoexec and in your regular autoexec.

If that didn't help check out This thread - http://www.ugcleague.com/forum/showthread.php?t=6171