Don't like ads? PRO users don't see any ads ;-)
Guest

code

By: a guest on Aug 18th, 2012  |  syntax: None  |  size: 1.93 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Terraria;
  6. using Hooks;
  7. using TShockAPI;
  8. using TShockAPI.DB;
  9. using System.ComponentModel;
  10. using System.Net;
  11. using Newtonsoft.Json;
  12.  
  13. namespace EventServer
  14. {
  15.     [APIVersion(1, 12)]
  16.     public class EventServer : TerrariaPlugin
  17.     {
  18.         public EventServer(Main game)
  19.             : base(game)
  20.         {
  21.             Order = 10;
  22.         }
  23.         #region Main Plugin
  24.         public static List<Player> spelers = new List<Player>();
  25.         public static int update = 0;
  26.         public override string Name
  27.         {
  28.             get { return "Event"; }
  29.         }
  30.         public override string Author
  31.         {
  32.             get { return "Anonymous"; }
  33.         }
  34.  
  35.         public override string Description
  36.         {
  37.             get { return "Private plugin for the server events"; }
  38.         }
  39.         public override Version Version
  40.         {
  41.             get { return new Version(1, 1, 1); }
  42.         }
  43.         public override void Initialize()
  44.         {
  45.             Console.WriteLine("bla");
  46.             GameHooks.Initialize += OnInitialize;
  47.             ServerHooks.Leave += OnLeave;
  48.             //GameHooks.Update += OnUpdate;
  49.         }
  50.         public static void PlayerPhysics(Player player)
  51.         {
  52.             player.position.X = 120;
  53.             Console.WriteLine("fe");
  54.         }
  55.         public static void OnInitialize()
  56.         {
  57.             Console.WriteLine("ja");
  58.             Commands.ChatCommands.Add(new Command("", Test, "test"));
  59.  
  60.         }
  61.         public static void OnLeave(int id)
  62.         {
  63.             Console.WriteLine("fesf");
  64.         }
  65.         public static void OnUpdate()
  66.         {
  67.         }
  68.         public static void Test(CommandArgs args)
  69.         {
  70.             Console.WriteLine("command uitgevoerd");
  71.             args.Player.SendMessage("test.");
  72.         }
  73.         #endregion
  74.  
  75.     }
  76. }