PDA

View Full Version : [TF2] Drunken Heal (2.0)


Dragonshadow
06-11-2009, 10:04
Drunken Heal
UPDATE 2.0

You're Bottle taunt heals or hurts for a specified abount

OH SNAP REWRITE
--

sm_drunkenheal_amount
Amount Healed By Bottle (Default 15)

sm_drunkenheal_cooldown
Heal Cooldown Time [In Seconds] | 0 = Disabled (Default 10)

sm_drunkenheal_enable
Enable/Disable Drunken Heal

sm_drunkenheal_broken
If set, broken bottle's only heal (or hurt) for half

sm_drunkenheal_hurt
If set, bottle hurts instead of heals

And ofcourse the version Cvar:

sm_drunkenheal_version

Features:
Heals on Taunt (Duh)
Does Not OverHeal
Disables on Sudden Death
Customizable Cooldown
Broken bottles heal for half (Cvar)
Be careful with that, alchohol is a poison you know...

Bugs:
None that I know of

Credits:
Lotz O' Peopal & Things. Thank *insert obligatory superbeing here* for IRC.

To Do:
Wat.

DrunkenHeal2 is the new version
DrunkenHeal1 is the old version

GNCMatt
06-11-2009, 13:39
Found your problem with the heal amount.

Line 28:

cvheal = CreateConVar("sm_drunkenheal_amount", "15", "Amount Healed By Bottle (Default 15)", FCVAR_PLUGIN, true, 0.0, true, 1.0);


The trailing 0.0 and 1.0 arguments refer to minimum and maximum values. You would be better off with:

cvheal = CreateConVar("sm_drunkenheal_amount", "15", "Amount Healed By Bottle (Default 15)", FCVAR_PLUGIN);


I was almost going to say keep the minimum to 0.0, but who knows, maybe a server admin wants them to get hurt when they drink :).

Dragonshadow
06-11-2009, 13:44
NO WAY
IT WAS THAT SIMPLE?
I'm an idiot xD
Thanks, uploading new script now.

GNCMatt
06-11-2009, 13:49
I didn't notice it at first, but it became pretty obvious when I set it from rcon.

10:41:16 "sm_drunkenheal_amount" = "1.000000" ( def. "15" ) min. 0.000000 max. 1.000000
- Amount Healed By Bottle (Default 15)

retsam
06-11-2009, 15:06
So how does this work? It just heals the demoman while he has the bottle out?

It heals teammates or how does that work? You didnt give much of a description.

Dragonshadow
06-11-2009, 15:28
I put it in the little plugin thing thats supposed to show up over the plugin...

But it didn't show up -.-

Edited first post

GNCMatt
06-11-2009, 16:13
So how does this work? It just heals the demoman while he has the bottle out?

It heals teammates or how does that work? You didnt give much of a description.

When you drink from the bottle, which is your taunt, press G.

Smashman
06-11-2009, 22:31
Super idea! Like the Medic's Kritz taunt. Maybe a random chance to be hurt from it?

msleeper
06-11-2009, 22:42
I thought it was "Scrumpy"?

Dragonshadow
06-12-2009, 08:20
I thought it was "Scrumpy"?

Me bottle's'grumpeh

Me bottle is grumpy

Dragonshadow
06-12-2009, 08:22
Super idea! Like the Medic's Kritz taunt. Maybe a random chance to be hurt from it?

Already had it planned ;D

Just got to figure out how to do a random , and how to give damage to a player (so it does the damage on the screen instead of just subtracting health)

Wofiel
06-12-2009, 12:31
Me bottle's'grumpeh

Me bottle is grumpy

""Scrumpy" is a term often used for ciders made in South West England" -- (http://en.wikipedia.org/wiki/Scrumpy)

Smashman
06-13-2009, 07:20
It's really not grumpy. He says "Eh. Me bottle of Scrumpy" How the hell can a bottle be grumpy? Check out http://www.tf2wiki.net/wiki/Demoman

Dragonshadow
06-13-2009, 08:07
Oh, didn't know that!
I'll edit my post :)

ballz
07-03-2009, 19:34
It's really not grumpy. He says "Eh. Me bottle of Scrumpy" How the hell can a bottle be grumpy? Check out http://www.tf2wiki.net/wiki/Demoman

How can he jump on grenades and fly through the air..??

Antithasys
07-08-2009, 05:28
Please update first post with public cvar in your code.

Once done plugin will be approved.

ZeroFreeze
07-08-2009, 09:33
Already had it planned ;D

Just got to figure out how to do a random , and how to give damage to a player (so it does the damage on the screen instead of just subtracting health)

new random = GetRandomInt(1, 10);

Dragonshadow
07-08-2009, 19:25
Please update first post with public cvar in your code.

Once done plugin will be approved.

I guess you mean update the info in that plugin thing that FINALLY appeared after a month of waiting, if so, done, if not, I have no idea what you're talking about as my cvar's are in my first post.
Though I think I would rather have this thread deleted, as I want to add some more features and release an updated version.

alinayg
07-09-2009, 06:00
Awesome plugin dragon, I'll be sure to add this to our server.

alinayg
07-09-2009, 21:01
Hu, It seems that when you set the
configs in the server cfg to this:

sm_drunkenheal_enable 1
sm_drunkenheal_amount 30

Did you update your first post with what GNCMatt told you? Because when I use those settings demos get 1 hp.

Dragonshadow
07-09-2009, 22:12
Hu, It seems that when you set the
configs in the server cfg to this:

sm_drunkenheal_enable 1
sm_drunkenheal_amount 30

Did you update your first post with what GNCMatt told you? Because when I use those settings demos get 1 hp.

Ehh, it was the right one before the move (downloaded this morning) and now it isn't, 1 sec, re-uploading.

Dragonshadow
07-09-2009, 22:16
Fixed, also added experimental version with cooldown, haven't had a chance to test it.
Also, new vesion with more efficient checks and actually tested stuffs should be out tomorrow.

Zuko
07-10-2009, 12:04
Added Multi-Language Support
Added Polish translation

alinayg
12-11-2009, 04:49
Don't know if you still update this, but i use it on my server and we have found a bug.

If you taunt right when you are falling off a ledge, you continue taunting but you can move around and shoot.

The bug is that you still get the heal of you do this with the demo bottle.

Love the plugin, that's the only problem with it, thanks.

Dragonshadow
12-11-2009, 07:12
Wow old plugin is old, I forgot about it O_O
I'm not quite sure if I can fix that bug, I mean I can do a check to see if they're still in the same place with the start/end timers but thats about it...

Actually that should do it, gimme a bit.

alinayg
12-17-2009, 14:08
Waits patiently.

Dragonshadow
12-17-2009, 21:12
Lol update released just in time for noone to ever use the bottle again ^^

alinayg
12-17-2009, 23:37
Lol true, but thanks anyway.

alinayg
01-17-2010, 19:59
L 01/17/2010 - 19:14:34: [SM] Native "GetEdictClassname" reported: Invalid edict (-1)
L 01/17/2010 - 19:14:34: [SM] Displaying call stack trace for plugin "drunkenheal2.smx":
L 01/17/2010 - 19:14:34: [SM] [0] Line 136, /home/groups/alliedmodders/forums/files/3/8/3/3/5/55463.attach::OnClientCommand()
Humm...

Dragonshadow
03-19-2010, 19:39
L 01/17/2010 - 19:14:34: [SM] Native "GetEdictClassname" reported: Invalid edict (-1)
L 01/17/2010 - 19:14:34: [SM] Displaying call stack trace for plugin "drunkenheal2.smx":
L 01/17/2010 - 19:14:34: [SM] [0] Line 136, /home/groups/alliedmodders/forums/files/3/8/3/3/5/55463.attach::OnClientCommand()
Humm...

Uhm
lolwut
needs more info