1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

[1.16] Ancientgods' All-In-One plugin

Discussion in 'Unsupported / Outdated Plugins' started by Ancientgods, Oct 15, 2013.

  1. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    • Like Like x 4
  2. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    Warning: /reportgrief and /building will not save reported locations on server restart! (maybe if i have enough people asking for this i will think about making it)
     
  3. kalekip1

    kalekip1 Level 1

    Joined:
    Aug 21, 2012
    Messages:
    9
    /tppos is useless as it is built-in in TShock?... :/

    And can you be clearer what /freeze does?
     
  4. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    I made /tppos because tshock had their command coded wrongly (forgot to put in *16) and /freeze will give the specified player buff 47 (frozen) for 3 seconds every 2 seconds, by IP-address which means that if they log in on a different account they will still be frozen.
     
    • Like Like x 1
  5. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Lauren this is awesome! But in order to prevent the required relogs, check https://github.com/k0rd/WorldRefill WorldRefill.cs. This is the world refill we (me, IcyPhoenix and k0rd) are working on, and k0rd made an InformPlayers method which pretty much updates the tiles without requiring a reload.

    Since github is opensource, free feel to use that in your plugin.

    Oh, and I suggest you to make a way to delete buildings and grief reports by staff later, else the list becomes too big and clunky.
     
    • Like Like x 2
  6. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    For your information, /checkgrief and /checkbuilding loops trough the list and teleports to those locations, and while doing so it will remove that report, but thanks for the help!
     
  7. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Oh. I though you had set that, but what if the staff member's not finished with it / disconnects?
     
  8. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    Well... that would rather be annoying... xd


    celebi23, i am now using informplayers();, altough this does not solve the problem for my /fillchest command (if you fill a chest that was completely empty before), any ideas on how to update players/server on those new items?
     
  9. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    InformPlayers() Method is for tile updates; you will need another command for chest updates. Maybe Infinite Chests source has something? Or the protector plugin?

    Both of those have chest refill commands. Haven't checked them personally, but fingers crossed that those don't just make removing items from a chest not removing them from the server, because if they do it that way then there's nothing there to help you.

    Anyway, chests should update if you close them, then open them again, since it then gets server data again. You sure you need to relog to update a chest as well?
     
  10. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    try using /fillchest on an empty chest and then open it, you'll see the item stacks, but no images for the items, and you're not able to take them out either
     
    • Like Like x 1
  11. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Wow that's weird. Will install your plugin and test it.

    Oh, and would you upload source to github, or you don't know how to use it? It's way better than it is to pack it in a .rar file.
     
  12. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    well i've uploaded a plugin to github once but im not really familiar with it, i will try my best to get it on there tho, just for you :)

    Edit: i have now posted it on github :)
     
    • Like Like x 1
  13. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Np, git bash is confusing xD (Alas why one of the devs once commited "I f--king hate git" as the commit message).

    The tutorial is quite handy. You can download the github client for Windows, but I once used it and found it clunky, so I use git bash and git gui.

    Back on topic, I've tested /fillchest, and it seems that even the server doesn't update the item ID's for some reason... I've tried reloading and it doesn't work for this one either, you have to actually restart tshock. It's weird like that.

    InformPlayers used to be a mess (tped the played to make the tiles update) but it's now much more stable. Even though Infinite Chests breaks lots of this plugin, a proper integration would actually let you fix this by reloading the db (since it stores the chests in a db).

    By looking through the code, I saw that you define the FreezePlayer and any other value as a variable. This works, but if the server restarts the player will no longer be frozen. You should try to incorporate a db (SQLite is pretty simple) into the plugin. "Persistent" values need to be in a database in order to make it perfect :]
     
  14. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    Well i might consider adding a db, that could also be used to store reported buildings when the server shuts down
     
    • Like Like x 1
  15. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Oh yes, I forgot those aren't stored either. This is more troublesome that I though.
     
  16. Snirk Immington

    Snirk Immington Level 9

    Joined:
    Jan 12, 2012
    Messages:
    378
    Cool stuff!
    There are many ways to make databases aside from SQL which are file techniques that are good to know.
    An SQL database is good for having some data for a lot of things, like users.
    TShock uses text-base configuration files to save settings for the program that can be edited in a text file.

    You might want to look into serialization. This means C# will take an object and write its contents into a file. You could include the build sites, staff-chat users, and frozen players as Lists in that object. It requires a few techniques a beginner might not be familiar with. I can't off the top of my head remember if there's a TShock plugin which does this (I know one of my private ones does) but it is a common technique in lots of projects.

    Here is an example of a binary formatter. In the example, it converts an object into bytes and writes them to a file. You can simply get an object back by calling Deserialize() and use it as you would!

    P.S. The GitHub attached source code does not contain any back doors.
     
    • Like Like x 2
  17. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    You mean the way config.json files are created? You use StreamWriter and StreamReader to create a file to store bits of information... I though of this, but I find SQL to be way more organized :]
     
  18. Verone

    Verone Level 1

    Joined:
    Feb 7, 2012
    Messages:
    11
    Great plugin, tested it sometimes on my server to add new stuff...it likes to crash often though (trying to make a gem cavern above ground ect) or spawning a new dungeon :(
     
  19. XerX

    XerX Level 1

    Joined:
    Oct 12, 2013
    Messages:
    12
    Hi. Whenever I start this up, I get the following error.
    [​IMG]
    I even went ahead and removed all the plugins except this one from my older and it still happens. Any help?
     
  20. alerek

    alerek Level 6

    Joined:
    Jul 25, 2011
    Messages:
    125
    ^ This~

    Love the features though, had an older build in before, but got the above error as well when loading >.<