Full Version : Adding new notoriety type help please :(
xmlspawner >>Scripting Support >>Adding new notoriety type help please :(
<< Prev | Next >>
Lord Mashadow- 07-12-2006
Hello, i modified the core for addind new noto type it called Claned because i am using my own clan system. Now i changed that in source-notoriety.cs

CODE
public const int Innocent = 1; public const int Ally = 2; public const int CanBeAttacked = 3; public const int Criminal = 4; public const int Enemy = 5;
public const int Murderer = 6;
public const int Invulnerable = 7;
public const int Claned = 8; i added this
private static NotorietyHandler m_Handler;
public static NotorietyHandler Handler
{
get{ return m_Handler; }
set{ m_Handler = value; }
}
private static int[] m_Hues = new int[]
{
0x000,
0x059,
0x03F,
0x3B2,
0x3B2,
0x090,
0x022,
0x035,
0x497, i added this
};

i opened a thread in runuo forums and couldnt get useful help a guy said me fix that
in source Packets.cs MovementAck
that is

CODE
public sealed class MovementAck : Packet { private static MovementAck[][] m_Cache = new MovementAck[9][] //// That was 8 not 9 i changed it { new MovementAck[256],
new MovementAck[256],
new MovementAck[256],
new MovementAck[256],
new MovementAck[256],
new MovementAck[256],
new MovementAck[256],
new MovementAck[256],
new MovementAck[256] // i added this
};

well i fix real notoriety.cs for using this noto type, server started up finely no errors , but that noto-type color isnt correct , i wanted to do black name and black healt bar, but it is yellow name grey healtbar, i can walk but when i open another char in game and when i try to walk a bit it crashes
i opened the server in -debug mode and here is the crash report

CODE
Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array. at Server.Mobile.Move(Direction d) at Server.Mobiles.PlayerMobile.Move(Direction d) in d:\RunUO 1.0\Scripts\Mobiles\PlayerMobile.cs:line 857 at Server.Network.PacketHandlers.MovementReq(NetState state, PacketReader pvSrc)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)

and the pmobile line 857 is this

CODE
if ( !base.Move( d ) ) return false;

now i am confused what do i need to modifie in these source files? please help if you need more info i can give
Haazen- 07-12-2006
I was not able to follow this all the way back but it seems to me that somewhere the noteriety value is being used in movement. That value where ever it is can now be 0 - 8 or 9 values. Movement has only 8 directions. Somehow, possible in Move( ) either in core Mobile.cs or scripts PlayerMobile.cs, you need to limit the value to one less than it is now. Not sure if the value is 8 or 7. But that is what is happening. You have 8 cases to move in Mobile.cs in the core around line 2750. You are sending it a 9th value and it pukes.
Good luck. Sorry I could not see the exact issue of how your 9th noteriety value is used for movement.
Lord Mashadow- 07-13-2006
i am not sure about new movement attack a guy said me that and when i do it, i got rid of that crash porblem a bit , yea i couldnt walk any, now i can walk in my char but when i open another char and try to walk it crashes and colors arent correct i wanted to make black healtbar and black name but its yellow name and grey healtbar, well i think this is hard to do it, and modifieing core isnt supporting in runuo so that they didnt help me about it,
Well i am thinking for cancelling this project because its too hard for me
However can i fix the current noto-type colors? for expamle you know guys
Enemy noto-type is orange you all know, hmm can i turn it to black?
i tried to modifie source notority.cs for it, then i modified the real notority.cs for hues both of them
But it still orange??? can someone explain me that?
and haazen thx for helps thx