Exemplo n.º 1
0
 private void Mapviewer_Load(object sender, EventArgs e)
 {
     player = client.GetPlayer();
     mapViewer1.Directory = directory;
     mapViewer1.LoadMap();
     mapViewer1.SetMapCenter(player.Location);
 }
Exemplo n.º 2
0
        public FormMapCopy(FormBot fb)
        {
            this.fb = fb;
            InitializeComponent();
            this.Visible = true;
            mapviewer = new MyMap(this.pictureBox1, this);
            mapviewer.LoadMap();
            player = fb.player;
            System.Console.WriteLine("Playessrs x,y,z" + player.Location.X + ", " + player.Location.Y + ", " + player.Location.Z);

            playerLocation = player.Location;
            mapviewer.SetMapCenter(playerLocation);

            mapviewer.SetLevel(0);
            mapviewer.SetLevel(1);
            mapviewer.SetLevel(2);
            mapviewer.SetLevel(3);
            mapviewer.SetLevel(4);
            mapviewer.SetLevel(5);
            mapviewer.SetLevel(6);
            mapviewer.SetLevel(7);
            mapviewer.SetLevel(8);
            mapviewer.SetLevel(9);
            mapviewer.SetLevel(10);
            mapviewer.SetLevel(11);
            mapviewer.SetLevel(12);
            mapviewer.SetLevel(13);

            mapviewer.SetLevel(playerLocation.Z);
        }
Exemplo n.º 3
0
 private void buttonAddonOne_CheckedChanged(object sender, EventArgs e)
 {
     player = client.GetPlayer();
     if (buttonAddonOne.Checked)
     {
         player.Addon = Tibia.Constants.OutfitAddon.Addon1;
     }
 }
Exemplo n.º 4
0
 private void start()
 {
     try
     {
         player = client.GetPlayer();
         uxShortTimer.Start();
         uxLongTimer.Start();
     }
     catch { }
 }
Exemplo n.º 5
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     client = ClientChooser.ShowBox();
     if (client != null)
         if (client.LoggedIn)
         {
             player = client.GetPlayer();
             uxMap.Markers.Add(new MapViewer.MapMarker(player));
         }
 }
Exemplo n.º 6
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            Client = ClientChooser.ShowBox();
            if (Client == null || !Client.LoggedIn)

            {
                MessageBox.Show("You must have at least one client open and logged in.");
                Application.Exit();
            }
            else
            {
                Player = Client.GetPlayer();
            }
        }
Exemplo n.º 7
0
 public static string BattleListToString(List<Creature> PbList, Player player, bool manashield, int skill)
 {
     String str = "<INFO><SELF><NAME>" + player.Name + "</NAME>" + "<MAGICLVL>" + player.MagicLevel + "</MAGICLVL><LVL>" + player.Level + "</LVL><HP>" + player.HP + "</HP><HPPER>" + player.HPBar + "</HPPER><XYZ>" + player.X + "," + player.Y + "," + player.Z + "</XYZ><SKILL>" + skill  +"</SKILL></SELF>";
     for (int i = 0; i < PbList.Count; i++)
     {
         Creature creature = PbList[i];
         int id = player.Target_ID;
         if ((creature.Type == Tibia.Constants.CreatureType.Target || creature.Type == Tibia.Constants.CreatureType.Player) && creature.IsVisible)
         {
             str += "<TARGET><NAME>" + creature.Name + "</NAME>" + "<HPPRE>" + creature.HPBar + "</HPPRE><XYZ>" + creature.X + "," + creature.Y + "," + creature.Z + "</XYZ>";
             if (manashield && creature.Id == id)
                 str += "<MANASHIELD>GEEN</MANASHIELD>";
             else
                 str += "<MANASHIELD>?</MANASHIELD>";
             str += "</TARGET>";
         }
     }
     str += "</INFO>";
     return str;
 }
Exemplo n.º 8
0
 bool ReceivedSelfAppearIncomingPacket(IncomingPacket packet)
 {
     player = client.GetPlayer();
     Tibia.Packets.Incoming.ChannelOpenPacket.Send(client, ChatChannel.Custom, "TT+");
     System.Threading.Thread.Sleep(100);
     OutWhite("Console started.");
     return true;
 }
Exemplo n.º 9
0
 private void frmMapView_Load(object sender, EventArgs e)
 {
     Client = Client.GetClients()[0];
     Player = Client.GetPlayer();
 }
Exemplo n.º 10
0
        private void timerWASD_Tick(object sender, EventArgs e)
        {
            if (buttonKeyboard.Checked)
            {
                if (GetAsyncKeyState((int)Keys.Insert) !=0)
                {
                    KeyboardHook.Enable();
                }
                if (GetAsyncKeyState((int)Keys.Home) !=0)
                {
                    KeyboardHook.Disable();
                }
            }

                player = client.GetPlayer();

                KeyboardHook.Add(Keys.W, new KeyboardHook.KeyPressed(delegate
                {
                    player.Walk(Tibia.Constants.WalkDirection.Up);
                    return false;

                }));
                KeyboardHook.Add(Keys.A, new KeyboardHook.KeyPressed(delegate
                {
                    player.Walk(Tibia.Constants.WalkDirection.Left);
                    return false;

                }));
                KeyboardHook.Add(Keys.S, new KeyboardHook.KeyPressed(delegate
                {
                    player.Walk(Tibia.Constants.WalkDirection.Down);
                    return false;

                }));
                KeyboardHook.Add(Keys.D, new KeyboardHook.KeyPressed(delegate
                {
                    player.Walk(Tibia.Constants.WalkDirection.Right);
                    return false;

                }));
        }
Exemplo n.º 11
0
        private void buttonEnable_CheckedChanged(object sender, EventArgs e)
        {
            player = client.GetPlayer();
            if (buttonEnable.Checked)
            {
                comboboxOutfits.Enabled = false;
                player.Outfit = (OutfitType)comboboxOutfits.SelectedItem;
            }
            else
            {
                player.Outfit = OutfitType.GameMaster;
                comboboxOutfits.Enabled = true;

            }
        }
Exemplo n.º 12
0
        public virtual void Run(Core core)
        {
            this.core = core;
            client = core.Client;
            player = core.Player;

            #region Register Variables

            #endregion
        }
Exemplo n.º 13
0
 void EventClass_PlayerLoggedOut(DateTime dateTime)
 {
     Program.Player = null;
     Player = Program.Player;
 }
Exemplo n.º 14
0
 void EventClass_PlayerLoggedIn(DateTime dateTime)
 {
     Program.Player = Client.GetPlayer();
     Player = Program.Player;
 }
Exemplo n.º 15
0
        private void OnLogout(object sender, EventArgs e)
        {
            Modules.Disable();

            if (Client.Window.WorldOnlyView)
            {
                Client.Window.WorldOnlyView = false;
            }

            Player = null;
        }
Exemplo n.º 16
0
 private void OnLogin(object sender, EventArgs e)
 {
     Thread.Sleep(300);
     Player = Client.GetPlayer();
     Modules.Enable();
     StartTime = DateTime.Now;
 }