Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.68 KB | None | 0 0
  1. using Game.Base.Packets;
  2. using Game.Server.GameObjects;
  3. using SqlDataProvider.Data;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Configuration;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading;
  10.  
  11. namespace Game.Server.Managers
  12. {
  13.     public class EventNumber
  14.     {
  15.         public static int Event = 0;
  16.         public static void MsgAll(string msg)
  17.         {
  18.             foreach (GamePlayer player in WorldMgr.GetAllPlayers())
  19.             {
  20.                 player.SendMessage("[EVENTO] "+ msg);
  21.             }
  22.  
  23.         }
  24.         public static void EventRun()
  25.         {
  26.             Event = 1;
  27.             Console.WriteLine(Event);
  28.             MsgAll("O Evento vai começar dentro de 10 Segundos");
  29.             Thread.Sleep(5000);
  30.             MsgAll("O Evento vai começar dentro de 5 Segundos");
  31.             Thread.Sleep(5000);
  32.             MsgAll("O Evento começou tentem descobrir numero de 1 a 200");
  33.             Thread.Sleep(3000);
  34.             MsgAll("Para tentar descobrir o numero é so digitar no chat o numero");
  35.         }
  36.         public static void FinishEvent(GameClient client)
  37.         {
  38.             Event = 0;
  39.             MsgAll("Temos um vencedor: " + client.Player.PlayerCharacter.NickName);
  40.             ItemTemplateInfo PET = new ItemTemplateInfo();
  41.             PET.CategoryID = 35;
  42.             PET.TemplateID = 35140401;
  43.             PET.Level = 5; // KKKK TEST
  44.             ItemInfo itemInfo = ItemInfo.CreateFromTemplate(PET, 3, 0);
  45.             client.Player.SendItemToMail(itemInfo, "Parabéns você ganhou o evento do DDTank II, Evento criado por SkelletonX", "DDTank II Evento", Packets.eMailType.ItemOverdue);
  46.         }
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement