Raised This Month: $12 Target: $400
 3% 

[TF2] Spellbook Commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author
FlaminSarge
Veteran Member
Join Date: Jul 2010
Plugin ID:
3956
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    9 
    Plugin Description:
    Set the number of spells and type of spell on players' spellbooks
    Old 11-02-2013 , 20:14   [TF2] Spellbook Commands
    Reply With Quote #1

    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: --
    Attached Files
    File Type: sp Get Plugin or Get Source (tf_spellbookcmds.sp - 3103 views - 5.4 KB)
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.

    Last edited by FlaminSarge; 11-02-2013 at 20:19.
    FlaminSarge is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 11-03-2013 , 01:36   Re: [TF2] Spellbook Commands
    Reply With Quote #2

    Let me know of any breakage.
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.
    FlaminSarge is offline
    PCDrivers
    AlliedModders Donor
    Join Date: Feb 2013
    Location: Canary Islands
    Old 11-03-2013 , 02:20   Re: [TF2] Spellbook Commands
    Reply With Quote #3

    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
    Attached Files
    File Type: sp Get Plugin or Get Source (tf_spellbookcmds.sp - 1252 views - 5.4 KB)
    File Type: txt tf_spellbookcmds.phrases.txt (2.4 KB, 595 views)

    Last edited by PCDrivers; 11-03-2013 at 03:49. Reason: Added my version
    PCDrivers is offline
    Mrmitoo
    New Member
    Join Date: Oct 2013
    Location: France.
    Old 11-03-2013 , 12:48   Re: [TF2] Spellbook Commands
    Reply With Quote #4

    Very nice! Thanks for that!
    Mrmitoo is offline
    Send a message via Skype™ to Mrmitoo
    Bjorngomes
    Member
    Join Date: Jun 2013
    Old 11-03-2013 , 16:17   Re: [TF2] Spellbook Commands
    Reply With Quote #5

    This plugin looks more improved... Thanks for it
    Bjorngomes is offline
    Snaggle
    AlliedModders Donor
    Join Date: Jul 2010
    Location: England
    Old 11-03-2013 , 17:57   Re: [TF2] Spellbook Commands
    Reply With Quote #6

    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.
    Snaggle is offline
    luki1412
    Veteran Member
    Join Date: Oct 2008
    Location: OnPluginStart()
    Old 11-04-2013 , 08:05   Re: [TF2] Spellbook Commands
    Reply With Quote #7

    I think you shouldn't be able to use them while taunting...
    __________________
    luki1412 is offline
    Mr. Man
    Veteran Member
    Join Date: Mar 2011
    Location: Huh?
    Old 11-04-2013 , 22:32   Re: [TF2] Spellbook Commands
    Reply With Quote #8

    Sarge, can you incorporate a menu list instead of a text-based list? They cut off.
    Mr. Man is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 11-06-2013 , 19:13   Re: [TF2] Spellbook Commands
    Reply With Quote #9

    /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.
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.
    FlaminSarge is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 11-11-2013 , 17:37   Re: [TF2] Spellbook Commands
    Reply With Quote #10

    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?
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 10:20.


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