Character Reset 1.1

Reset players' character or your own character without any hassle

  1. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    Character Reset

    *Requires SSC to be enabled*
    This plugin lets players manually reset their character to the server's SSC default character.
    Since "starter items" is now part of TShock, I pulled the reset command feature out from CustomStarterItems and made it into its own plugin.

    Commands:
    • /resetcharacter <all/stats/inventory/quests> - For players to reset themselves
    • /resetplayers <all/stats/inventory/quests> - For admins to reset all players
    • /resetplayer <username> <all/stats/inventory/quests> -For admins to reset a specific player (Online or Offline)
    Permissions:
    • characterreset.* -Can use all commands
    • characterreset.stats -Players can only reset their Health&Mana (/resetcharacter stats)
    • characterreset.inventory -Players can only reset their inventory (/resetcharacter inventory)
    • characterreset.quests -Players can only reset their Angler Quests (/resetcharacter quests)
    • characterreset.players -Allows /resetplayers & /resetplayer
    *Players can use "/resetcharacter all" if given all 3 permissions (stats, inventory, quests)
    To-Do:
    • Reset all players' character
    • Suggestions
    [Plugin Download]
    [Source]
     
    • Like Like x 1
  2. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    647
    Cool shizzle, bippizzle.

    Keep da plugins comin'. You da mon, mon.
     
    • Like Like x 2
  3. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    I'MMA WHAT?! Mon mon
     
  4. Terrabear

    Terrabear Level 6

    Joined:
    Jun 26, 2014
    Messages:
    138
    Uaaaa, Cooooool!! :D

    Imma armor mon, mon
     
  5. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,597
    Good job Bips. Keep dem codes flowin'
     
  6. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    I just fixed a little error in the code (forgot to include a permission).
    Woops, hehe :p
     
  7. Terrabear

    Terrabear Level 6

    Joined:
    Jun 26, 2014
    Messages:
    138
    How about making a division between perm and function? I cannot hide the commands with aliascmd because they are interlocked.
     
  8. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    Do you mean like a command for each permission?
     
  9. Terrabear

    Terrabear Level 6

    Joined:
    Jun 26, 2014
    Messages:
    138
    Umm.. maybe like that? I wanna give '/reset' command(excutes '/resetcharacter') to groups, which is customized by aliascmd.

    but I have to give 'characterreset.~' permissions also,
    so people can check /characterreset through /help,
    and may use it infinitely without cost or cooldown.

    I've thought this can be abused at any time..
    and it was just a trivial suggestion, so don't mind too much. Still good, yeah :)
     
  10. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    Alright, so I changed how the command works.
    It now uses arguments (/resetcharacter <all/stats/inventory>).
    I've also added another identical command except that it's "//resetcharacter" and doesn't check the player for permissions.

    So in your case, you would make your AliasCommand execute "//resetcharacter inventory".
     
    • Like Like x 1
  11. Terrabear

    Terrabear Level 6

    Joined:
    Jun 26, 2014
    Messages:
    138
    Really, nice work :D
     
  12. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    647
    Take my approval. Take it!
     
    • Like Like x 1
  13. blambin

    blambin Level 1

    Joined:
    Jul 25, 2014
    Messages:
    16
    now i take some error,how fix it?:(

    2014-09-03 19:39:36 - Utils: INFO: : /resetcharacter all.
    2014-09-03 19:39:36 - Command: ERROR: System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at Terraria.NetMessage.SendData(Int32 msgType, Int32 remoteClient, Int32 ignoreClient, String text, Int32 number, Single number2, Single number3, Single number4, Int32 number5)
    at CharacterReset.CharacterReset.ResetCharacter(CommandArgs args)
    at TShockAPI.Command.Run(String msg, TSPlayer ply, List`1 parms)
     
  14. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    It seems like you're executing the command from the console. The commands are intended for players to execute.
     
  15. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    Updated to include new things:
    • You can now reset all players' (online & offline) character with "/resetplayers"
    • Added the ability to reset Angler Quests
    -Removed the hidden commands because they shouldn't be necessary
    -Changed what the permission "characterreset.*" does. It now allows both commands to be used.
     
    • Like Like x 2
  16. dark22

    dark22 Level 4

    Joined:
    May 17, 2014
    Messages:
    97
    @bippity
    Wow, fantastic changes, thank you for share to the community.
     
  17. IcyPhoenix

    TShock Contributor

    Joined:
    Jul 27, 2012
    Messages:
    367
    bippity I really hope you considered what happens if someone calls their character "all".
     
  18. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    I'm browsing my code and I don't really see where that might screw something up .___.
     
  19. IcyPhoenix

    TShock Contributor

    Joined:
    Jul 27, 2012
    Messages:
    367
    Ahh my apologies, there isn't a command to target one specific person to reset that one specific person?
     
  20. bippity

    Plugin Developer

    Joined:
    Jan 14, 2012
    Messages:
    298
    Making that right now after seeing your first post :p