AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Spellbook Commands (https://forums.alliedmods.net/showthread.php?t=229177)

FlaminSarge 11-02-2013 20:14

[TF2] Spellbook Commands
 
2 Attachment(s)
While this plugin performs the same functions as http://forums.alliedmods.net/showthread.php?t=229123, I wrote it with self-usage in mind. That is, "sm_setspell <charges>" as the base command that targets yourself, with various other options available as parameters.

Commands
sm_setspell <charges> [spell] [target] - Defaults to "cheats" admin access. Set the number of spell <charges> on yourself. Optional parameter [spell] accepts a number to set the spell type as well. Optional parameter [target] allows you to specify some target(s) instead of targetting yourself. The number of charges and the ability to target other players is dependent on the cvars and overrides listed further down.
sm_spelllist - Defaults to public access. Displays the list of spells and the number associated with each spell.

ConVars
tf_spellbookcmds_version - Ignore this, it does nothing and you shouldn't touch it.
tf_spellbookcmds_limit -1 - If >= 0, sets the maximum number of charges you're allowed to set with sm_setspell. Whether this affects a player or not depends on one of the overrides listed below.

Overrides
sm_setspell_target - Default "cheats" access. Players with access to this will be able to use the 3rd parameter of sm_setspell to target other players instead of only being able to target themselves.
sm_setspell_unlimit - Default "root" access. Players with access to this will ignore the spell charge limit cvar.

As a reminder, if you want to make sm_setspell public/less-restricted-access (the way I pretty much intended it to be for use with overrides), you can use an override for sm_setspell to change who can access it. Basically, you can give everyone access to sm_setspell but only give certain people access to the ability to target others or go over the spell limit. Give it a try.

Changelog
Code:

1.0 - 11/2/2013
*Initial release

To-Do:
*Split spell limit cvar split into rare vs. normal spells, other changes regarding this dichotomy.
*Release another plugin that enables the Spell HUD/spell drops on any map (I've already figured it out, just need to write it up nicely)

Previous plugin view count: --

FlaminSarge 11-03-2013 01:36

Re: [TF2] Spellbook Commands
 
Let me know of any breakage.

PCDrivers 11-03-2013 02:20

Re: [TF2] Spellbook Commands
 
2 Attachment(s)
Very improved, of course.

Preferred to put it in an attempt to translate it into the Spanish, multi-language, and here share it for all :)

Mrmitoo 11-03-2013 12:48

Re: [TF2] Spellbook Commands
 
Very nice! Thanks for that! :)

Bjorngomes 11-03-2013 16:17

Re: [TF2] Spellbook Commands
 
This plugin looks more improved... Thanks for it

Snaggle 11-03-2013 17:57

Re: [TF2] Spellbook Commands
 
Could you perhaps include a delay between command usage? Limiting the max number of charges is good, but you can bypass this by binding the command with your spell attack key. Firing the spell will just reload your spell (unlimited charges) basically.

luki1412 11-04-2013 08:05

Re: [TF2] Spellbook Commands
 
I think you shouldn't be able to use them while taunting...

Mr. Man 11-04-2013 22:32

Re: [TF2] Spellbook Commands
 
Sarge, can you incorporate a menu list instead of a text-based list? They cut off.

FlaminSarge 11-06-2013 19:13

Re: [TF2] Spellbook Commands
 
/spelllist shouldn't cut off, as it sends each spell number as a separate message...

A delay between command usages might be good.

I'll add in the multilang thing when I can.

friagram 11-11-2013 17:37

Re: [TF2] Spellbook Commands
 
Seems the spellbook is a weapon slot (can get it with getplayerweaponslot) for some classes, but not others (engineer/engineer). Players will switch to it when they run out of ammo and such. There a specific reason it doesn't show up for those 2 classes in any slots?


All times are GMT -4. The time now is 21:36.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.