RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Character Control, Delete & Move/swap Characters around between accounts In-game!

Buggler

Wanderer
I think I found something

This is wrong, isn´t it?

Code:
 			public bool SwapEm()
			{
				if( a1 == null || a2 == null )
					return false;

				Mobile mob = (Mobile)a1[a1CharIndex];
				Mobile mob2 = (Mobile)a2[a2CharIndex];

	----------->			a1[a1CharIndex] = mob2;
	----------->			a2[a2CharIndex] = mob;

				if( mob == null || mob2 == null )
					return false;

				mob.Say( "I've been Swapped to another Account!" );
	---->		      mob.Say( "I've been Swapped to another Account!" );

				if( mob.NetState != null )
					mob.NetState.Dispose();

				if( mob2.NetState != null )
					mob2.NetState.Dispose();

				return true;
 

ASayre

RunUO Developer
Buggler said:
This is wrong, isn´t it?

Code:
 			public bool SwapEm()
			{
				if( a1 == null || a2 == null )
					return false;

				Mobile mob = (Mobile)a1[a1CharIndex];
				Mobile mob2 = (Mobile)a2[a2CharIndex];

	----------->			a1[a1CharIndex] = mob2;
	----------->			a2[a2CharIndex] = mob;

				if( mob == null || mob2 == null )
					return false;

				mob.Say( "I've been Swapped to another Account!" );
	---->		      mob.Say( "I've been Swapped to another Account!" );

				if( mob.NetState != null )
					mob.NetState.Dispose();

				if( mob2.NetState != null )
					mob2.NetState.Dispose();

				return true;

The only 'error' is just the extra "mob.Say( "I've been Swapped to another Account!" );" which jsut means that the 2nd mobile does't say it was swapped when swapped. AS far as the other lines you pointde out.. they're fine and working as they should.
 

jaynigs

Wanderer
Cool idea!

A question though please if i may..

I notice on the script is the standard warning for deleting characters regarding housing but what happens when the character you transfer is the character the house belongs to? does the house become condemned?
 

ASayre

RunUO Developer
jaynigs said:
Cool idea!

A question though please if i may..

I notice on the script is the standard warning for deleting characters regarding housing but what happens when the character you transfer is the character the house belongs to? does the house become condemned?

No, the house still belongs with that character and whatever account the character's account is. It'll just end up with an account having > 1 house. You can already do the same by getting the props of the house itself ( [area interface where BaseHouse ) And settign the owner to any character allowing you to bypass the 1 house/acct rule.
 

jaynigs

Wanderer
ASayre8 said:
No, the house still belongs with that character and whatever account the character's account is. It'll just end up with an account having > 1 house. You can already do the same by getting the props of the house itself ( [area interface where BaseHouse ) And settign the owner to any character allowing you to bypass the 1 house/acct rule.


Thanks for the info.
;)
 
Top