Results 1 to 14 of 14
  1. #1
    iliketrainz's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    644
    Reputation
    39
    Thanks
    142

    An object with same key has already been added.

    I tried updating the MemoryMonitor plugin for KRelay but when I insert it into the Plugins folder and launch KRelay I get an error:
    An object with the same key has already been added. What am I doing wrong?

  2. #2
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,771
    Delete the old one?
    My Vouches
    Having an issue with RotMG? Check for the solution here.


    Need Realm items? Come to RealmStock!

    Accepting PayPal - Bitcoin - Giftcards
    Selling ST Sets, Class Top Sets, Life Pots, and much more!


    Find it here: MPGH Sales Thread

  3. #3
    iliketrainz's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    644
    Reputation
    39
    Thanks
    142
    Quote Originally Posted by 059 View Post
    Delete the old one?
    I'm new to C# so I don't really know where to find it.

  4. #4
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by iliketrainz View Post


    I'm new to C# so I don't really know where to find it.
    Delete the old plugin from the plugins folder.
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  5. #5
    iliketrainz's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    644
    Reputation
    39
    Thanks
    142
    Quote Originally Posted by PKTINOS View Post


    Delete the old plugin from the plugins folder.
    I did that.

  6. #6
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by iliketrainz View Post


    I did that.
    Empty the plugins folder and insert the new one?

    I think "An object with the same key has already been added. " has to do with the name function, so try changing that I guess.
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  7. #7
    iliketrainz's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    644
    Reputation
    39
    Thanks
    142
    Quote Originally Posted by PKTINOS View Post


    Empty the plugins folder and insert the new one?

    I think "An object with the same key has already been added. " has to do with the name function, so try changing that I guess.
    Didn't work. This is hard.

  8. #8
    059's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    California
    Posts
    3,312
    Reputation
    700
    Thanks
    92,771
    Quote Originally Posted by iliketrainz View Post


    Didn't work. This is hard.
    Can you paste your code here?
    My Vouches
    Having an issue with RotMG? Check for the solution here.


    Need Realm items? Come to RealmStock!

    Accepting PayPal - Bitcoin - Giftcards
    Selling ST Sets, Class Top Sets, Life Pots, and much more!


    Find it here: MPGH Sales Thread

  9. #9
    iliketrainz's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    644
    Reputation
    39
    Thanks
    142
    Quote Originally Posted by 059 View Post
    Can you paste your code here?
    Code:
    using Lib_K_Relay;
    using Lib_K_Relay.Interface;
    using Lib_K_Relay.Networking;
    using Lib_K_Relay.Networking.Packets;
    using Lib_K_Relay.Networking.Packets.Server;
    using System;
    
    namespace Sprite
    {
    	public class Sprite : IPlugin
    	{
    		private bool isSprite;
    
    		public string GetAuthor()
    		{
    			return "CrazyJani";
    		}
    
    		public string GetName()
    		{
    			return "Sprite World No Clip";
    		}
    
    		public string GetDescription()
    		{
    			return "Enables no-clipping in Sprite World. You won't have to risk getting disconnected on an important occasion because you had no clip on in a wrong dungeon.";
    		}
    
    		public string[] GetCommands()
    		{
    			return new string[0];
    		}
    
    		public void Initialize(Proxy proxy)
    		{
    			proxy.HookPacket(PacketType.UPDATE, new PacketHandler(this.OnUpdate));
    			proxy.HookPacket(PacketType.MAPINFO, new PacketHandler(this.OnMapInfo));
    		}
    
    		private void OnMapInfo(Client client, Packet packet)
    		{
    			MapInfoPacket mapInfoPacket = (MapInfoPacket)packet;
    			this.isSprite = (mapInfoPacket.Name == "Sprite World");
    		}
    
    		private void OnUpdate(Client client, Packet packet)
    		{
    			bool flag = this.isSprite;
    			if (flag)
    			{
    				UpdatePacket updatePacket = (UpdatePacket)packet;
    				for (int i = 0; i < updatePacket.Tiles.Length; i++)
    				{
    					bool flag2 = updatePacket.Tiles[i].Type == 254;
    					if (flag2)
    					{
    						updatePacket.Tiles[i].Type = 88;
    					}
    				}
    			}
    		}
    	}
    }
    Code:
    using Lib_K_Relay;
    using Lib_K_Relay.Interface;
    using Lib_K_Relay.Networking;
    using Lib_K_Relay.Networking.Packets;
    using Lib_K_Relay.Networking.Packets.Client;
    using Lib_K_Relay.Networking.Packets.Server;
    using Lib_K_Relay.Utilities;
    using System;
    
    namespace AutoAnswer
    {
    	public class AutoAnswer : IPlugin
    	{
    		private bool enabled = true;
    
    		public string GetAuthor()
    		{
    			return "Ameji";
    		}
    
    		public string GetName()
    		{
    			return "AutoAnswer";
    		}
    
    		public string GetDescription()
    		{
    			return "This plugin responds to cem and dying thessal.";
    		}
    
    		public string[] GetCommands()
    		{
    			return new string[]
    			{
    				"/answer on",
    				"/answer off"
    			};
    		}
    
    		public void Initialize(Proxy proxy)
    		{
    			proxy.HookCommand("answer", new CommandHandler(this.OnAutoAnswerCommand));
    			proxy.HookPacket(PacketType.TEXT, new PacketHandler(this.OnText));
    		}
    
    		private void OnAutoAnswerCommand(Client client, string command, string[] args)
    		{
    			bool flag = args.Length == 0;
    			bool flag4 = !flag;
    			if (flag4)
    			{
    				bool flag2 = args[0] == "on";
    				bool flag5 = flag2;
    				if (flag5)
    				{
    					this.enabled = true;
    					client.SendToClient(PluginUtils.CreateNotification(client.ObjectId, "Auto Answer Enabled!"));
    				}
    				bool flag3 = args[0] == "off";
    				bool flag6 = flag3;
    				if (flag6)
    				{
    					this.enabled = false;
    					client.SendToClient(PluginUtils.CreateNotification(client.ObjectId, "Auto Answer Disabled!"));
    				}
    			}
    		}
    
    		private void OnText(Client client, Packet packet)
    		{
    			bool flag = !this.enabled;
    			bool flag4 = !flag;
    			if (flag4)
    			{
    				TextPacket textPacket = (TextPacket)packet;
    				bool flag2 = textPacket.Text.ToLower().Contains("say") && textPacket.Text.ToLower().Contains("ready") && textPacket.NumStars == -1;
    				bool flag5 = flag2;
    				if (flag5)
    				{
    					PlayerTextPacket playerTextPacket = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
    					playerTextPacket.Text = "Ready.";
    					client.SendToServer(playerTextPacket);
    				}
    				else
    				{
    					bool flag3 = textPacket.Text.ToLower().Contains("king") && textPacket.Text.ToLower().Contains("alexander") && textPacket.NumStars == -1;
    					bool flag6 = flag3;
    					if (flag6)
    					{
    						PlayerTextPacket playerTextPacket2 = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
    						playerTextPacket2.Text = "He lives and reigns and conquers the world.";
    						client.SendToServer(playerTextPacket2);
    					}
    				}
    			}
    		}
    	}
    }

  10. #10
    New's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    Location:
    Posts
    2,605
    Reputation
    386
    Thanks
    4,708
    My Mood
    Angelic
    Quote Originally Posted by iliketrainz View Post
    o
    Which one of those two don't work when you open KRelay?

    Because you said something about "MemoryMonitor plugin" on the original thread.
    New

    Current Project:
    SimpleExaltHack

    Outdated stuff I made in the past:
    Famebot
    Clientless tradebot
    RotMG ping checker
    Zautonexus crack

  11. #11
    iliketrainz's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    644
    Reputation
    39
    Thanks
    142
    Quote Originally Posted by PKTINOS View Post

    Which one of those two don't work when you open KRelay?

    Because you said something about "MemoryMonitor plugin" on the original thread.
    Ok so here's the thing. I updated the MemMonitor plugin, the AutoAnswer plugin, and edited one of CrazyJani's plugins to change a certain tile in his sprite world plugin. However, autoanswer and memory monitor don't work together, nor do autoanswer and sprite. Haven't tried all 3 at the same time but I doubt it would work. I get the error when I do one of the two with AutoAnswer. When this error comes, everything works fine except the sprite / memory plugin. Those don't even appear in the plugin list.

  12. #12
    CrazyJani's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    2,475
    Reputation
    170
    Thanks
    15,666
    Quote Originally Posted by iliketrainz View Post
    Ok so here's the thing. I updated the MemMonitor plugin, the AutoAnswer plugin, and edited one of CrazyJani's plugins to change a certain tile in his sprite world plugin. However, autoanswer and memory monitor don't work together, nor do autoanswer and sprite. Haven't tried all 3 at the same time but I doubt it would work. I get the error when I do one of the two with AutoAnswer. When this error comes, everything works fine except the sprite / memory plugin. Those don't even appear in the plugin list.
    This is a problem with the way you're compiling those plugins. Always create a new project for each plugin or they might share an id of some sort, preventing them from working together.

    When you're editing someone else's plugins you don't always need to decompile them with ILSpy. I've release the source code for my Sprite plugin, you can just edit that and compile the edited code.

    Same goes for apemanzilla's Memory Monitor, he included the .cs file in the download. You don't need to edit anything, just compile the source code from that file and you have an updated version of the plugin.

  13. The Following User Says Thank You to CrazyJani For This Useful Post:

    iliketrainz (09-25-2016)

  14. #13
    iliketrainz's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    644
    Reputation
    39
    Thanks
    142
    /solved @Luis

  15. #14
    Luis's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    2,801
    Reputation
    348
    Thanks
    1,845
    My Mood
    Psychedelic
    Joe and Raple exist as well, thanks for mentioning me tho.

Similar Threads

  1. [WTB] GTA V Modded Account that has already been transferred
    By Skyfall125 in forum Grand Theft Auto 5 (GTA V) User Services/Shops
    Replies: 0
    Last Post: 08-29-2016, 04:07 PM
  2. An anti cheat has already been deployed. Be careful!
    By IV2B in forum Pokemon Go Discussions
    Replies: 46
    Last Post: 07-28-2016, 02:36 AM
  3. Email has already been registered.
    By Eternity in forum Adventure Quest Worlds (AQW) Discussions
    Replies: 7
    Last Post: 04-04-2015, 02:34 AM
  4. [WTT] I Want a 7 days to die alpha key for a DayZ key that has only been used by me
    By fadelessghost54321 in forum DayZ Selling / Trading / Buying
    Replies: 2
    Last Post: 08-25-2013, 12:37 PM