fino alle 17 che ero connesso assist funzionava, anche la mappa, poi ho avuto la bella idea di cambiare pg e non mi ha fatto piu riloggare.... se puo' essere d'aiuto cmq non riesco ad entrare ne io che ho alice, ne amici miei che hanno tiscali
annuncio
Comprimi
Ancora nessun annuncio.
*** Dal restart di questa sera ***
Comprimi
X
-
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
GM Kriegstreiber Käse® Discord: Jack___#9551
-
PER LO STAFF: Per quanto riguarda mapuo mi è appena stato riferito che qualcun'altro oltre me ha proposto di inserire l'ally in mapUO
[19:13:54] someone suggested the allies on map
[19:14:06] i've provided a code for testing (dont have runuo here for testing anymore)
[19:14:15] if uodreams wants to try this edit to mapuo.cs script
[19:14:23] it should work and display ally members
codice:using System; using System.Collections.Generic; using Server; using Server.Network; using Server.Mobiles; using Server.Engines.PartySystem; using Server.Guilds; namespace Server.Misc { public static partial class MapUO { private static class Settings { public const bool PartyTrack = true; public const bool GuildTrack = true; public const bool GuildHitsPercent = true; } public static void Initialize() { if ( Settings.PartyTrack ) ProtocolExtensions.Register( 0x00, true, new OnPacketReceive( OnPartyTrack ) ); if ( Settings.GuildTrack ) ProtocolExtensions.Register( 0x01, true, new OnPacketReceive( OnGuildTrack ) ); } private static void OnPartyTrack( NetState state, PacketReader pvSrc ) { Mobile from = state.Mobile; Party party = Party.Get( from ); if ( party != null ) { Packets.PartyTrack packet = new Packets.PartyTrack( from, party ); if ( packet.UnderlyingStream.Length > 8 ) state.Send( packet ); } } private static void OnGuildTrack( NetState state, PacketReader pvSrc ) { Mobile from = state.Mobile; Guild guild = from.Guild as Guild; if ( guild != null ) { bool locations = pvSrc.ReadByte() != 0; List<Mobile> members = guild.Members; foreach ( Guild g in guild.Allies ) members.AddRange( g.Members ); Packets.GuildTrack packet = new Packets.GuildTrack( from, members, locations ); if ( packet.UnderlyingStream.Length > ( locations ? 9 : 5 ) ) state.Send( packet ); } else state.Send( new Packets.GuildTrack() ); } private static class Packets { public sealed class PartyTrack : ProtocolExtension { public PartyTrack( Mobile from, Party party ) : base( 0x01, ( ( party.Members.Count - 1 ) * 9 ) + 4 ) { for ( int i = 0; i < party.Members.Count; ++i ) { PartyMemberInfo pmi = (PartyMemberInfo)party.Members[i]; if ( pmi == null || pmi.Mobile == from ) continue; Mobile mob = pmi.Mobile; if ( Utility.InUpdateRange( from, mob ) && from.CanSee( mob ) ) continue; m_Stream.Write( (int) mob.Serial ); m_Stream.Write( (short) mob.X ); m_Stream.Write( (short) mob.Y ); m_Stream.Write( (byte) ( mob.Map == null ? 0 : mob.Map.MapID ) ); } m_Stream.Write( (int) 0 ); } } public sealed class GuildTrack : ProtocolExtension { public GuildTrack() : base( 0x02, 5 ) { m_Stream.Write( (byte) 0 ); m_Stream.Write( (int) 0 ); } public GuildTrack( Mobile from, List<Mobile> members, bool locations ) : base( 0x02, ( ( members.Count - 1 ) * ( locations ? 10 : 4 ) ) + 5 ) { m_Stream.Write( (byte) ( locations ? 1 : 0 ) ); for ( int i = 0; i < members.Count; ++i ) { Mobile mob = members[i]; if ( mob == null || mob == from || mob.NetState == null ) continue; if ( locations && Utility.InUpdateRange( from, mob ) && from.CanSee( mob ) ) continue; m_Stream.Write( (int) mob.Serial ); if ( locations ) { m_Stream.Write( (short) mob.X ); m_Stream.Write( (short) mob.Y ); m_Stream.Write( (byte) ( mob.Map == null ? 0 : mob.Map.MapID ) ); if ( Settings.GuildHitsPercent && mob.Alive ) m_Stream.Write( (byte) ( mob.Hits / Math.Max( mob.HitsMax, 1.0 ) * 100 ) ); else m_Stream.Write( (byte) 0 ); } } m_Stream.Write( (int) 0 ); } } } } }
Ultima modifica di gramoz; 18-11-2013, 20:30.
Commenta
-
Originariamente inviato da gramoz Visualizza il messaggioPER LO STAFF: Per quanto riguarda mapuo mi è appena stato riferito che qualcun'altro oltre me ha proposto di inserire l'ally in mapUO
Onision
Commenta
-
Originariamente inviato da gramoz Visualizza il messaggioPER LO STAFF: Per quanto riguarda mapuo mi è appena stato riferito che qualcun'altro oltre me ha proposto di inserire l'ally in mapUO
Va modificato il file Scripts/Misc/MapUO.cs presente dentro la cartella di runUO, e va modificato come segue:
codice:using System; using System.Collections.Generic; using Server; using Server.Network; using Server.Mobiles; using Server.Engines.PartySystem; using Server.Guilds; namespace Server.Misc { public static partial class MapUO { private static class Settings { public const bool PartyTrack = true; public const bool GuildTrack = true; public const bool GuildHitsPercent = true; } public static void Initialize() { if ( Settings.PartyTrack ) ProtocolExtensions.Register( 0x00, true, new OnPacketReceive( OnPartyTrack ) ); if ( Settings.GuildTrack ) ProtocolExtensions.Register( 0x01, true, new OnPacketReceive( OnGuildTrack ) ); } private static void OnPartyTrack( NetState state, PacketReader pvSrc ) { Mobile from = state.Mobile; Party party = Party.Get( from ); if ( party != null ) { Packets.PartyTrack packet = new Packets.PartyTrack( from, party ); if ( packet.UnderlyingStream.Length > 8 ) state.Send( packet ); } } private static void OnGuildTrack( NetState state, PacketReader pvSrc ) { Mobile from = state.Mobile; Guild guild = from.Guild as Guild; if ( guild != null ) { bool locations = pvSrc.ReadByte() != 0; List<Mobile> members = guild.Members; foreach ( Guild g in guild.Allies ) members.AddRange( g.Members ); Packets.GuildTrack packet = new Packets.GuildTrack( from, members, locations ); if ( packet.UnderlyingStream.Length > ( locations ? 9 : 5 ) ) state.Send( packet ); } else state.Send( new Packets.GuildTrack() ); } private static class Packets { public sealed class PartyTrack : ProtocolExtension { public PartyTrack( Mobile from, Party party ) : base( 0x01, ( ( party.Members.Count - 1 ) * 9 ) + 4 ) { for ( int i = 0; i < party.Members.Count; ++i ) { PartyMemberInfo pmi = (PartyMemberInfo)party.Members[i]; if ( pmi == null || pmi.Mobile == from ) continue; Mobile mob = pmi.Mobile; if ( Utility.InUpdateRange( from, mob ) && from.CanSee( mob ) ) continue; m_Stream.Write( (int) mob.Serial ); m_Stream.Write( (short) mob.X ); m_Stream.Write( (short) mob.Y ); m_Stream.Write( (byte) ( mob.Map == null ? 0 : mob.Map.MapID ) ); } m_Stream.Write( (int) 0 ); } } public sealed class GuildTrack : ProtocolExtension { public GuildTrack() : base( 0x02, 5 ) { m_Stream.Write( (byte) 0 ); m_Stream.Write( (int) 0 ); } public GuildTrack( Mobile from, List<Mobile> members, bool locations ) : base( 0x02, ( ( members.Count - 1 ) * ( locations ? 10 : 4 ) ) + 5 ) { m_Stream.Write( (byte) ( locations ? 1 : 0 ) ); for ( int i = 0; i < members.Count; ++i ) { Mobile mob = members[i]; if ( mob == null || mob == from || mob.NetState == null ) continue; if ( locations && Utility.InUpdateRange( from, mob ) && from.CanSee( mob ) ) continue; m_Stream.Write( (int) mob.Serial ); if ( locations ) { m_Stream.Write( (short) mob.X ); m_Stream.Write( (short) mob.Y ); m_Stream.Write( (byte) ( mob.Map == null ? 0 : mob.Map.MapID ) ); if ( Settings.GuildHitsPercent && mob.Alive ) m_Stream.Write( (byte) ( mob.Hits / Math.Max( mob.HitsMax, 1.0 ) * 100 ) ); else m_Stream.Write( (byte) 0 ); } } m_Stream.Write( (int) 0 ); } } } } }
Commenta
-
Originariamente inviato da OnisionStaff Visualizza il messaggioGrazie, ho già segnato il tutto. Vedremo di confrontare il codice e fare i test appena possibile!
Onision
Originariamente inviato da seel82 Visualizza il messaggioSe non ci fossi io a chiederlo
Commenta
-
Oni, lo sviluppatore mi ha appena contattato avvertendomi che aveva sbagliato prima, bisogna modificare questi due files come segue
Scripts/Misc/MapUO.cs
codice:using System; using System.Collections.Generic; using Server; using Server.Network; using Server.Mobiles; using Server.Engines.PartySystem; using Server.Guilds; namespace Server.Misc { public static partial class MapUO { private static class Settings { public const bool PartyTrack = true; public const bool GuildTrack = true; public const bool GuildHitsPercent = true; public const bool AllianceTrack = true; } public static void Initialize() { if ( Settings.PartyTrack ) ProtocolExtensions.Register( 0x00, true, new OnPacketReceive( OnPartyTrack ) ); if ( Settings.GuildTrack ) ProtocolExtensions.Register( 0x01, true, new OnPacketReceive( OnGuildTrack ) ); } private static void OnPartyTrack( NetState state, PacketReader pvSrc ) { Mobile from = state.Mobile; Party party = Party.Get( from ); if ( party != null ) { Packets.PartyTrack packet = new Packets.PartyTrack( from, party ); if ( packet.UnderlyingStream.Length > 8 ) state.Send( packet ); } } private static void OnGuildTrack( NetState state, PacketReader pvSrc ) { Mobile from = state.Mobile; Guild guild = from.Guild as Guild; if ( guild != null ) { bool locations = pvSrc.ReadByte() != 0; List<Mobile> members = new List<Mobile>( guild.Members ); if ( Settings.AllianceTrack ) { if ( Guild.NewGuildSystem ) { AllianceInfo info = guild.Alliance; if ( info != null ) { foreach ( Guild g in info.Members ) members.AddRange( g.Members ); } } else { foreach ( Guild g in guild.Allies ) members.AddRange( g.Members ); } } Packets.GuildTrack packet = new Packets.GuildTrack( from, members, locations ); if ( packet.UnderlyingStream.Length > ( locations ? 9 : 5 ) ) state.Send( packet ); } else state.Send( new Packets.GuildTrack() ); } private static class Packets { public sealed class PartyTrack : ProtocolExtension { public PartyTrack( Mobile from, Party party ) : base( 0x01, ( ( party.Members.Count - 1 ) * 9 ) + 4 ) { for ( int i = 0; i < party.Members.Count; ++i ) { PartyMemberInfo pmi = (PartyMemberInfo)party.Members[i]; if ( pmi == null || pmi.Mobile == from ) continue; Mobile mob = pmi.Mobile; if ( Utility.InUpdateRange( from, mob ) && from.CanSee( mob ) ) continue; m_Stream.Write( (int) mob.Serial ); m_Stream.Write( (short) mob.X ); m_Stream.Write( (short) mob.Y ); m_Stream.Write( (byte) ( mob.Map == null ? 0 : mob.Map.MapID ) ); } m_Stream.Write( (int) 0 ); } } public sealed class GuildTrack : ProtocolExtension { public GuildTrack() : base( 0x02, 5 ) { m_Stream.Write( (byte) 0 ); m_Stream.Write( (int) 0 ); } public GuildTrack( Mobile from, List<Mobile> members, bool locations ) : base( 0x02, ( ( members.Count ) * ( locations ? 10 : 4 ) ) + 5 ) { m_Stream.Write( (byte) ( locations ? 1 : 0 ) ); for ( int i = 0; i < members.Count; ++i ) { Mobile mob = members[i]; if ( mob == null || mob == from || mob.NetState == null ) continue; if ( locations && Utility.InUpdateRange( from, mob ) && from.CanSee( mob ) ) continue; m_Stream.Write( (int) mob.Serial ); if ( locations ) { m_Stream.Write( (short) mob.X ); m_Stream.Write( (short) mob.Y ); m_Stream.Write( (byte) ( mob.Map == null ? 0 : mob.Map.MapID ) ); if ( Settings.GuildHitsPercent && mob.Alive ) m_Stream.Write( (byte) ( mob.Hits / Math.Max( mob.HitsMax, 1.0 ) * 100 ) ); else m_Stream.Write( (byte) 0 ); } } m_Stream.Write( (int) 0 ); } } } } }
codice:#region Alliances public class AllianceInfo { .... public List<Guild> Members { get { return m_Members; } } } #endregion ...
Commenta
Commenta