Example #1
0
 private void Mapviewer_Load(object sender, EventArgs e)
 {
     player = client.GetPlayer();
     mapViewer1.Directory = directory;
     mapViewer1.LoadMap();
     mapViewer1.SetMapCenter(player.Location);
 }
        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);
        }
Example #3
0
 private void buttonAddonOne_CheckedChanged(object sender, EventArgs e)
 {
     player = client.GetPlayer();
     if (buttonAddonOne.Checked)
     {
         player.Addon = Tibia.Constants.OutfitAddon.Addon1;
     }
 }
Example #4
0
 private void start()
 {
     try
     {
         player = client.GetPlayer();
         uxShortTimer.Start();
         uxLongTimer.Start();
     }
     catch { }
 }
Example #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));
         }
 }
Example #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();
            }
        }
Example #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;
 }
Example #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;
 }
Example #9
0
 private void frmMapView_Load(object sender, EventArgs e)
 {
     Client = Client.GetClients()[0];
     Player = Client.GetPlayer();
 }
Example #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;

                }));
        }
Example #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;

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

            #region Register Variables

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

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

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