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!

need help

jaynigs

Wanderer
X-SirSly-X said:
here is a quick fix:

Code:
	public override void OnRemoved( object parent )
	{
		if (  parent is Mobile )
		{
			Mobile from = (Mobile)parent;
			from.FollowersMax -= 1;

			[COLOR="Red"]if (from.FollowersMax <= 5)
			{
				from.FollowersMax = 5;
			}[/COLOR]
		}
	}


Here is another one..


ive not tested this at all, give this a try, replace deserialize method with this one..


Code:
	public override void Deserialize(GenericReader reader)
	{
		base.Deserialize( reader );
		int version = reader.ReadInt();

		if( Parent is Mobile )
			(Mobile)parent.FollowersMax += 1;

	}


Hopefully that will add the extra followers when the server is reloaded. If so, SirSlys code is not needed, but may be left in as a failsafe
 

mkiplm

Sorceror
jaynigs said:
Here is another one..


ive not tested this at all, give this a try, replace deserialize method with this one..


Code:
	public override void Deserialize(GenericReader reader)
	{
		base.Deserialize( reader );
		int version = reader.ReadInt();

		if( Parent is Mobile )
			(Mobile)parent.FollowersMax += 1;

	}


Hopefully that will add the extra followers when the server is reloaded. If so, SirSlys code is not needed, but may be left in as a failsafe

errors errors
errors
errors



- Error: Scripts\custom scripts\ScriptMaker3[1].25\+1controlcap.cs: CS0111: (li
ne 48, column 23) Class 'ControlCap' already defines a member called 'Deserializ
e' with the same parameter types
 

Attachments

  • +1controlcap.cs
    985 bytes · Views: 2

jaynigs

Wanderer
Replace means to remove the old... :rolleyes:

It now looks like you have 2 Deserialize methods...

Find this and delete it..

Code:
	public override void Deserialize(GenericReader reader)
	{
		base.Deserialize( reader );
		int version = reader.ReadInt();
	}
 

jaynigs

Wanderer
delete the script, use the one sir sly posted,

find this and add the line in bold.

Code:
	public override void Deserialize(GenericReader reader)
	{
		base.Deserialize( reader );
		int version = reader.ReadInt();

[B]		if( Parent is Mobile )
			(Mobile)Parent.FollowersMax += 1;
[/B]
	}
 

mkiplm

Sorceror
sir sly worked ur dint and i change the remove to this and it worked

public override void OnRemoved( object parent )
{
if ( parent is Mobile )
{
Mobile from = (Mobile)parent;
from.FollowersMax -= 1;

if (from.FollowersMax <= 5)
{
from.FollowersMax = 5;
}
}
}
 

jaynigs

Wanderer
Mine should work, slys fix doesnt work properly, when the server restarts you have to remove the earrings and equip them again to get the slots bonus..

Note also that i made a typo on the fix i posted, try it again..
 

mkiplm

Sorceror
jaynigs said:
Mine should work, slys fix doesnt work properly, when the server restarts you have to remove the earrings and equip them again to get the slots bonus..

Note also that i made a typo on the fix i posted, try it again..

i restart shard and ever thing it worked fine i checked it stayed 6 when i had on when i took off it was 5
 

jaynigs

Wanderer
what im trying to say is, when u equip the earrings you get 6 slots, if you save and restart the shard, your character may have 5 slots again with the earrings equiped

My fix should make sure that your character will always have 6 slots with the earrings equiped whether you restart the shard or not..

If you are sure it works fine, then carry on, but im sure you will be back here again in the future...

You players will get annoyed of having to keep removing and re-equping your earrings to get the 6 slots back
 
Top