Howdy pardner!

These here forums are read-only. Click here to go to the new forums, where you can actually post and stuff!

Sorry for the inconvenience

-Andrew

LegendCraft

-------------------------------------------------------------------------------------------------------------

Hello! The LegendCraft Server Software allows developers to create C# plugins that will alter the server. Plugins can do almost anything from creating new commands, to creating server bots, etc. The general format for a LegendCraft Plugin can be found here here

The LegendCraft Plugin System and Manager were created by the 800Craft team.

And there you go! The LegendCraft API is basically the fCraft API with some changes found here.

LegendCraft Source

Advanced Plugin Example

Simple Plugin Example

Another Simple Plugin Example

The release for LegendCraft can be found here: LegendCraft Downloads

FAQs:

Q. Will LegendCraft support scripts such as Lua or Python scripts for plugins?

  • Nope.

Q. Do I need to know how to program to create LegendCraft plugins?

  • Yep.

Q. Where can I find a good IDE/Compiler for C#?

  • I highly recommend Visual Studio for Windows users. There are several free options, as well as paid options. The free IDEs are under the "Express" section. For non-Windows users, Monodevelop is a very capable IDE.

Q. Okay, I have my IDE and I started with some code, but I am getting errors everywhere!

  • You must reference the LegendCraft version of fcraft.dll found in the latest release of LegendCraft.

Q. I'm a beginner programmer, but I still want to make plugins. Will you help me?

  • As long as you really want to learn and become better, then there will always be people who will help. Remember, there is a difference between asking someone to write a program for you, and asking someone for help.

Q. How can I contact the LegendCraft Team?

  • We have an IRC base channel at #LegendCraft on irc.esper.net. The channel is used for LegendCraft discussion, and the Official LegendCraft Test server relays chat to that channel.

Some extra stuff for beginners:

Messaging:

  • Send a message to the player: player.Message("Your message here");

  • Send the whole server a message: Server.Message("Your message here");

  • Send the players in the same world as the person doing the command: player.World.Players.Message("Your message here");

Taking in player's as parameters to a command:

  1. To take in a player as a parameter of a command (for instance in /H5 <player>), you need to assign the target's name to a string with 'string targetName = cmd.Next();'

  2. You must then tie that player's name to an actual player on the server. First check if the string you take in is actually there (for instance if someone types /H5 and doesn't give a player name). Check if the string is null: 'if (String.IsNullOrEmpty(targetName)) { player.Message("The usage of the command is '/<commandname> <player>'"); return; }.

  3. Then if the string is not null, you can try to tie the player's name to an actual player in the game. That is done by typing 'Player target = Server.FindPlayerOrPrintMatches(player, targetName, false, true);'.

  4. Once the player's name is matched to the actual player, you need to perform another null check to see if the target actually exists (The target variable can be empty if the player isn't actually online to perform the action on or if the player name given was not an actual player's name). This null check can be done like this: if (target == null){ player.MessageNoPlayer(target); return; }.

  5. Once all of this is done, you can finally do operations using the target variable the same way you would use the player variable. (Ex. target.Message("Your message here");, target.TeleportTo(player.Position);, etc.)

Tips:

  • Try commenting the lines you write so that you can keep track of what you are doing and to really understand what you are doing. When you put a lot of comments, it is easy to see where you go wrong (if you go wrong) and it is a good learning tool if you are just starting to program.

  • Use IntelliSense to your full advantage!!! Much of the reason I was able to learn the fCraft based software quickly is because of IntelliSense and good summary documentation. When you start to type something, an autocomplete menu will come up. I recommend scrolling though it a lot in the beginning, just to get a sense of where everything is located and what everything actually does. When you highlight something in the code or in the IntelliSense autocomplete menu, it gives you a small summary of what the variable/method/Class/etc. actually does. By exploring the possibilities of what you can do at any given time, you can get to know the software easily. The first thing I would try: in a command, write 'player.' and then scroll through all of the IntelliSense options. Get an idea of how you can use that player variable. Then try writing 'player.Info.' and then scroll through the IntelliSense options and get an idea of what is located in the PlayerInfo.

  • If you have trouble understanding the stuff above, don't worry. You can basically copy everything I did above and it will work for you and eventually you will understand exactly what is going on. After all, I started programming by making plugins for my 800Craft software when I ran an 800Craft server. I have come a long way just by making simple commands and really trying to understand each line of code that I would write.

If you ever need help programming or making a plugin, please drop in on Webchat.esper.net and look on the channels #LegendCraft and #RisingEmbers for me (@Dingus) or LeChosenOne (@LeChosenOne). If we are there, we would be glad to help. More in-depth help can be given over skype if necessary. Find me on the IRC if you want in-depth help via skype.

Dingus

So, this seems like the most official thing i could find, or my friends for that matter, so for a while now, i think it was last friday this happen, the owner of a server, using LegendCraft software, set the server to restart automatically, no one was on for the restart, or during the time, so we're guessing it has something to do with that, But after the restart, you start getting this message when ever you try to chat, just plain chat.

http://imgur.com/Kg1Pq8f

I have tried to help my friends, and they seemed to have tried all the basic things, doing another restart that wasnt automatic, to looking at all the ranks and making sure they all have permission to chat, also, this is only seeming to effect the two highest ranks, which are both basically owner ranks. Every other rank only sees this when they chat, you can still use command etc. So if anyone knows how to fix this, please offer your help, it will be much appreciated.

Also, i don't really just browse the classicube forums, so i'm apologizing now if this is breaking a rule, but i cant find anywhere else that seems best for this to go.

Thank you.

UnknownShadow200 🔧 Thu Oct 22 at 19:09:39 (2015)

The unhandled exception should be logged to the server's log file (In the 'logs directory'). The log entry for the exception will have "ERROR: " in it would should make it easy to find.

It would be helpful if you (or the server owner) could upload the full details of the exception.

Edit: I looked into the exception, and it looks to be because SwearWords.txt is corrupted. Not entirely sure though.

I'll tell the owner to get this for you once he gets home. Thanks for providing your help!

Update: You saying that made him thing of trying and deleting the anti-cuss file or what ever it's called, and it worked, thanks for the help!

Hi, sorry about that. I've been inactive for a while. Yes, the issue was a corrupted swearwords.txt file. Thank you for the fix UnknownShadow2000.

🛑 This thread has been set to read-only due to inactivity. 🛑