Unknown type 5369

05/14/2011 14:21 marlyandedsel#1
can you help me with this

Lenght = 36
Unknown type = 2101
Unknown type = 1037

please some clue and how to code this one...
05/14/2011 14:39 12tails#2
sniff the packet and struct/do the system and you're done to go... 2101 is the donation tab on guild profile....

good luck!
05/14/2011 15:00 marlyandedsel#3
yes thanks.... also when i hit the gate at guild area when the HP of the gate = 0 the gate wont open..
05/14/2011 15:13 pro4never#4
Then fix it.... lol.

On killing the gates change their mesh and respawn to local.
05/14/2011 15:34 marlyandedsel#5
I'd like top Chris but.... you know Im just a beginner of c#... will give me clue about the gate please
05/14/2011 16:21 12tails#6
something like Npc.Type = SobMesh.Open; Npc.SpawnAll();
but you must create the methods...
05/14/2011 16:37 marlyandedsel#7
yes

if right or left gate reaches the Hit points to 0
then NPC.Type = SobMesh.Open
Npc.SpawnAll()

is it something like that?
I just cant figure out how to manage those method/terms in c#
05/14/2011 17:47 _DreadNought_#8
maybe you should be trying to fix that at this stage?

however ill help you out a little(note: I am not looking at the source code at all!)
In attack processor where you attack the SOB and where its something like
Code:
Sob.Hitpoints -= damage;
remove that and make it
Code:
if (sob.Hitpoints <= damage)
{
Sob.Hitpoints -= damage;
Sob.Mesh = Sob.Open;
//Code to respawn isnt it something like SendScreen(this, false);?
}
else
{
sob.hitpoints -= damage;
}
05/14/2011 18:20 marlyandedsel#9
I this code should I correct for that one?

Quote:
#region [Left-Gate]
case 6701:
Terrain = Game.Features.GuildWar.Handle.LeftGate;
if (ServerBase.Kernel.GetDistance(Attacker.X, Attacker.Y, Terrain.X, Terrain.Y) > 2)
{ Attacker.AttackPacket = null; return; }

Damage = MathSys.PrepareT(Attacker, Terrain, 0);

if (Terrain.HitPoints <= 0)
{ return; }

if (Damage >= Terrain.HitPoints && Terrain.HitPoints > 0)
{
Terrain.HitPoints = 0;
Attacker.AttackPacket = null;
}
else
{
Terrain.HitPoints -= Damage;
Attacker.AttackPacket = Packet;
}

#region Send Packet
Packet.Attacker = Attacker.UID;
Packet.Attacked = Target;
Packet.Damage = Damage;
Packet.X = Terrain.X;
Packet.Y = Terrain.Y;
Packet.AttackType = 2;
Attacker.Owner.SendScreen(Packet, true);
#endregion
break;
#endregion
#region [Right-Gate]
case 6702:
Terrain = Game.Features.GuildWar.Handle.RightGate;
if (ServerBase.Kernel.GetDistance(Attacker.X, Attacker.Y, Terrain.X, Terrain.Y) > 2)
{ Attacker.AttackPacket = null; return; }

Damage = MathSys.PrepareT(Attacker, Terrain, 0);

if (Terrain.HitPoints <= 0)
{ return; }

if (Damage >= Terrain.HitPoints && Terrain.HitPoints > 0)
{
Terrain.HitPoints = 0;
Attacker.AttackPacket = null;
}
else
{
Terrain.HitPoints -= Damage;
Attacker.AttackPacket = Packet;
}

#region Send Packet
Packet.Attacker = Attacker.UID;
Packet.Attacked = Target;
Packet.Damage = Damage;
Packet.X = Terrain.X;
Packet.Y = Terrain.Y;
Packet.AttackType = 2;
Attacker.Owner.SendScreen(Packet, true);
#endregion
break;
#endregion
05/14/2011 18:25 InfamousNoone#10
I pose this question. If your a beginner at C#, why try making a server before learning the actual language? :confused:
05/14/2011 18:27 _DreadNought_#11
Code:
if (Damage >= Terrain.HitPoints && Terrain.HitPoints > 0)
{
Terrain.HitPoints = 0;
Attacker.AttackPacket = null;
[B]Here[/B]
Terrian.Mesh = LeftGate.Open
//Respawn
}
else
{
Terrain.HitPoints -= Damage;
Attacker.AttackPacket = Packet;
}
Terrian.mesh etc might not be right but im 99pct sure its almost correct.
05/14/2011 18:28 marlyandedsel#12
ops! Thats hurt

yay! i got it right this time thanks for the helps

code
Quote:
if (Damage >= Terrain.HitPoints && Terrain.HitPoints > 0)
{
Terrain.HitPoints = 0;
Attacker.AttackPacket = null;
//
Terrain.Type = Network.GamePackets.SOBMesh.LeftGateOpen;
foreach (Receivers.ClientState cli in ServerBase.Kernel.GamePool.Values)
if (cli.Entity.MapID == 1038)
Terrain.SendSpawn(cli);
//
}
else
{
Terrain.HitPoints -= Damage;
Attacker.AttackPacket = Packet;
}
05/14/2011 18:54 _DreadNought_#13
Did it work?
05/14/2011 19:14 marlyandedsel#14
yes it work, but another problem i got if I own the pole i cant open or close the gate....
here is the code

Quote:
#region [Left-Gate]
case 6701:
{
switch (npcRequest.OptionID)
{
case 0://begin talk
if (!Handle.Running && (int)client.Account.State < 3)
{
dialog.Text("Please wait until the right time!");
dialog.Link("I see.", 255);
dialog.Send();
return;
}
if (client.Entity.Guild == null)
{
dialog.Text("You don't have a guild, please don't bother me!");
dialog.Link("I see.", 255);
dialog.Send();
return;
}
if (client.Entity.Guild != null)
{

if (Game.Features.GuildWar.Handle.Holder == client.Entity.Guild.Name)
{
dialog.Text("You belong to the guild that has bring down the great pole, i'll be ");
dialog.Text("glad helping you. What do you want?");
dialog.Link("Open/Close the gate.", 1);
dialog.Link("Let me enter the guild castle.", 2);
//dialog.Link("I want to heal the gate.", 3);
dialog.Link("Let me think it over.", 255);
dialog.Send();
}
else
{
dialog.Text("Your guild is not holding the pole, to enter you have to bring me down!");
dialog.Link("I see.", 255);
dialog.Send();
}
}
break;
case 1://ask to join
{
client.Entity.Teleport(1038, 159, 186);
break;
}
case 2://ask to open/close
{
if (client.Entity.GuildRank == GuildRank.DeputyLeader || client.Entity.GuildRank == GuildRank.GuildLeader)
{
if (Handle.LeftGate.Type == SOBMesh.LeftGateOpen)
Handle.LeftGate.Type = SOBMesh.LeftGate;
else if (Handle.LeftGate.Type == SOBMesh.LeftGate)
Handle.LeftGate.Type = SOBMesh.LeftGateOpen;

if (Handle.LeftGate.HitPoints == 0)
Handle.LeftGate.HitPoints = Handle.LeftGate.MaxHitpoints;

foreach (Receivers.ClientState c in Program.SafeReturn().Values)
if (c.Entity.MapID == 1038)
Handle.LeftGate.SendSpawn(c);
}
else
{
dialog.Text("You're not the leader or the guild leader to do that!");
dialog.Link("I see.", 255);
dialog.Send();
}
break;
}
case 3://ask to heal
break;
}
break;
}
#endregion