[Request] Interactions

09/26/2010 10:24 BitzIn#1
#closed
09/26/2010 11:33 .Beatz#2
No one will give them away.
09/26/2010 16:21 pro4never#3
they are released (not full system...) It's just attack subtypes
09/26/2010 16:40 killersub#4
Quote:
Originally Posted by .Beatz View Post
No one will give them away.
I have them but you(ppl dat give it away) are really full of shit when wasting a thread about that...and you(ppl dat ask for it) are sersly full of shit if u think ur gonna get even a #region of da code :rolleyes:
09/26/2010 18:15 Arcо#5
Just for those of you who say shit..
Quote:
Originally Posted by gtfo
Go to Character.cs and search for:
Code:
public bool Ghost = false;
Above that add:

Code:
public uint InteractionType = 0;
public uint InteractionWith = 0;
public bool InteractionInProgress = false;
public ushort InteractionX = 0;
public ushort InteractionY = 0;
public bool InteractionSet = false;

Go to world.cs and search for:
Code:
if (CC != C && CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 17) && !MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, CC.Loc.X, CC.Loc.Y, 17) || !Check)
{
C.MyClient.AddSend(Packets.SpawnEntity(CC));
if (CC.MyGuild != null)
C.MyClient.AddSend(Packets.String(CC.MyGuild.Guild ID, (byte)StringType.GuildName, CC.MyGuild.GuildName));

CC.MyClient.AddSend(CSpawn);
if (C.MyGuild != null)
CC.MyClient.AddSend(Packets.String(C.MyGuild.Guild ID, (byte)StringType.GuildName, C.MyGuild.GuildName));
}
Under that add:
Code:
if (CC.InteractionInProgress && CC.InteractionWith != C.EntityID && CC.InteractionSet)
{
if (CC.Body == 1003 || CC.Body == 1004)
{
if (CC.InteractionX == CC.Loc.X && CC.Loc.Y == CC.InteractionY)
{
C.MyClient.AddSend(Packets.AttackPacket(CC.EntityI D, CC.InteractionWith, CC.Loc.X, CC.Loc.Y, CC.InteractionType, 49));
}
}
else
{
if (Game.World.H_Chars.ContainsKey(CC.InteractionWith ))
{
Character Cs = Game.World.H_Chars[CC.InteractionWith] as Character;
if (Cs.Loc.X == CC.InteractionX && Cs.Loc.Y == CC.InteractionY)
{
C.MyClient.AddSend(Packets.AttackPacket(CC.EntityI D, CC.InteractionWith, CC.Loc.X, CC.Loc.Y, CC.InteractionType, 49));
}
}
}
}
Go to PacketHandler.cs and search for:
Code:
case 41:
GC.AddSend(Packets.Status(GC.MyChar.EntityID, NewestCOServer.Game.Status.Merchant, 0));
GC.MyChar.Merchant = NewestCOServer.Game.MerchantTypes.Not;
GC.AddSend(Data);
break;
Under that add:
Code:
#region Interact
case 46:
{
uint TargetUID = BitConverter.ToUInt32(Data, 12);
GC.MyChar.InteractionInProgress = false;
GC.MyChar.InteractionWith = TargetUID;
GC.MyChar.InteractionType = 0;
if (Game.World.H_Chars.ContainsKey(TargetUID))
{
Game.Character d = Game.World.H_Chars[TargetUID] as Character;
d.InteractionInProgress = false;
d.InteractionWith = GC.MyChar.EntityID;
d.InteractionType = 0;
d.MyClient.AddSend(Packets.AttackPacket(GC.MyChar. EntityID, TargetUID, d.Loc.X, d.Loc.Y, dmg, 46));
}
break;
}
case 47:
{
GC.MyChar.StatEff.Remove(StatusEffectEn.Ride);
uint TargetUID = BitConverter.ToUInt32(Data, 12);
if (GC.MyChar.InteractionWith != TargetUID)
return;
GC.MyChar.InteractionSet = false;
if (Game.World.H_Chars.ContainsKey(TargetUID))
{
Game.Character d = Game.World.H_Chars[TargetUID] as Character;
d.StatEff.Remove(StatusEffectEn.Ride);
d.InteractionSet = false;
if (d.InteractionWith != GC.MyChar.EntityID)
return;
if (d.Body == 1003 || d.Body == 1004)
{
d.MyClient.AddSend(Packets.AttackPacket(GC.MyChar. EntityID, TargetUID, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, dmg, 47));
d.InteractionInProgress = true;
GC.MyChar.InteractionInProgress = true;
d.InteractionType = dmg;
d.InteractionX = GC.MyChar.Loc.X;//Almost done kk
d.InteractionY = GC.MyChar.Loc.Y;
GC.MyChar.InteractionType = dmg;
GC.MyChar.InteractionX = GC.MyChar.Loc.X;
GC.MyChar.InteractionY = GC.MyChar.Loc.Y;
if (d.Loc.X == GC.MyChar.Loc.X && d.Loc.Y == GC.MyChar.Loc.Y)
{
d.InteractionSet = true;
GC.MyChar.InteractionSet = true;
d.MyClient.AddSend(Packets.AttackPacket(d.EntityID , GC.MyChar.EntityID, d.Loc.X, d.Loc.Y, GC.MyChar.InteractionType, 47));
GC.MyChar.SendScreen(Packets.AttackPacket(GC.MyCha r.EntityID, d.EntityID, d.Loc.X, d.Loc.Y, GC.MyChar.InteractionType, 49));
GC.MyChar.SendScreen(Packets.AttackPacket(d.Entity ID, GC.MyChar.EntityID, d.Loc.X, d.Loc.Y, GC.MyChar.InteractionType, 49));
}
}
else
{
GC.AddSend(Packets.AttackPacket(TargetUID, GC.MyChar.EntityID, d.Loc.X, d.Loc.Y, dmg, 47));
d.InteractionInProgress = true;
GC.MyChar.InteractionInProgress = true;
d.InteractionType = dmg;
d.InteractionX = d.Loc.X;
d.InteractionY = d.Loc.Y;
GC.MyChar.InteractionType = dmg;
GC.MyChar.InteractionX = d.Loc.X;
GC.MyChar.InteractionY = d.Loc.Y;
if (d.Loc.X == GC.MyChar.Loc.X && d.Loc.Y == GC.MyChar.Loc.Y)
{
d.InteractionSet = true;
GC.MyChar.InteractionSet = true;
d.MyClient.AddSend(Packets.AttackPacket(d.EntityID , GC.MyChar.EntityID, d.Loc.X, d.Loc.Y, GC.MyChar.InteractionType, 47));
GC.MyChar.SendScreen(Packets.AttackPacket(GC.MyCha r.EntityID, d.EntityID, d.Loc.X, d.Loc.Y, GC.MyChar.InteractionType, 49));
GC.MyChar.SendScreen(Packets.AttackPacket(d.Entity ID, GC.MyChar.EntityID, d.Loc.X, d.Loc.Y, GC.MyChar.InteractionType, 49));
}
}
}
break;
}
case 48:
{
uint TargetUID = BitConverter.ToUInt32(Data, 12);
GC.MyChar.InteractionType = 0;
GC.MyChar.InteractionWith = 0;
GC.MyChar.InteractionInProgress = false;
if (Game.World.H_Chars.ContainsKey(TargetUID))
{
Character d = Game.World.H_Chars[TargetUID] as Character;
d.InteractionType = 0;
d.InteractionWith = 0;
d.InteractionInProgress = false;
}
break;
}
case 50:
{
uint TargetUID = BitConverter.ToUInt32(Data, 12);
uint Attacker = BitConverter.ToUInt32(Data, 8);
GC.MyChar.InteractionType = 0;
GC.MyChar.InteractionWith = 0;
GC.MyChar.InteractionInProgress = false;
if (Game.World.H_Chars.ContainsKey(TargetUID))
{
Game.Character d = Game.World.H_Chars[TargetUID] as Character;
d.InteractionType = 0;
d.InteractionWith = 0;
d.InteractionInProgress = false;
}
GC.MyChar.SendScreen(Packets.AttackPacket(GC.MyCha r.EntityID, TargetUID, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0, 50));
GC.MyChar.SendScreen(Packets.AttackPacket(TargetUI D, GC.MyChar.EntityID, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 0, 50));
break;
}
#endregion
Go to Jump.cs and search for:
Code:
if (GC.MyChar.StatEff.Contains(NewestCOServer.Game.St atusEffectEn.Ride))
{
if (GC.MyChar.Vigor >= 5)
GC.MyChar.Vigor -= 5;
else return;
}
Under that add:
Code:
if (GC.MyChar.InteractionInProgress && GC.MyChar.InteractionSet)
{
if (GC.MyChar.Body == 1003 || GC.MyChar.Body == 1004)
{
if (Game.World.H_Chars.ContainsKey(GC.MyChar.Interact ionWith))
{
Game.Character character = Game.World.H_Chars[GC.MyChar.InteractionWith] as Character;
character.MyClient.AddSend(Packets.GeneralData(cha racter.EntityID, 0, BitConverter.ToUInt16(Data, 8), BitConverter.ToUInt16(Data, 10), 0x9c));
character.Loc.Jump(BitConverter.ToUInt16(Data, 8), BitConverter.ToUInt16(Data, 10));
Game.World.Spawns(character, true);
}
}
}
Go to WalkRun.cs and search for:
Code:
Game.World.Spawns(GC.MyChar, true);
Under it add:
Code:
#region Hold Hands Check
if (GC.MyChar.InteractionInProgress)
{
if (!GC.MyChar.InteractionSet)
{
if (Game.World.H_Chars.ContainsKey(GC.MyChar.Interact ionWith))
{
Game.Character ch = Game.World.H_Chars[GC.MyChar.InteractionWith] as Character;
if (ch.InteractionInProgress && ch.InteractionWith == GC.MyChar.EntityID)
{
if (GC.MyChar.InteractionX == GC.MyChar.Loc.X && GC.MyChar.Loc.Y == GC.MyChar.InteractionY)
{
if (GC.MyChar.Loc.X == ch.Loc.X && GC.MyChar.Loc.Y == ch.Loc.Y)
{
ch.MyClient.AddSend(Packets.AttackPacket(ch.Entity ID, GC.MyChar.EntityID, ch.Loc.X, ch.Loc.Y, GC.MyChar.InteractionType, 47));
GC.MyChar.SendScreen(Packets.AttackPacket(GC.MyCha r.EntityID, ch.EntityID, ch.Loc.X, ch.Loc.Y, GC.MyChar.InteractionType, 49));
GC.MyChar.SendScreen(Packets.AttackPacket(ch.Entit yID, GC.MyChar.EntityID, ch.Loc.X, ch.Loc.Y, GC.MyChar.InteractionType, 49));
GC.MyChar.InteractionSet = true;
ch.InteractionSet = true;
}
}
}
}
}
else
{
if (GC.MyChar.Body == 1003 || GC.MyChar.Body == 1004)
{
if (Game.World.H_Chars.ContainsKey(GC.MyChar.Interact ionWith))
{
Character ch = Game.World.H_Chars[GC.MyChar.InteractionWith] as Character;
ch.Direction = (byte)(Data[4] % 8);
ch.Loc.Walk((byte)(Data[4] % 8));
ch.MyClient.AddSend(Packets.GeneralData(ch.EntityI D, 0, ch.Loc.X, ch.Loc.Y, 0x9c));
World.Spawns(ch, true);
}
}
}
}
#endregion
09/28/2010 11:05 BitzIn#6
Doesnt work D: and som errors come with it
09/28/2010 12:15 Fish*#7
Quote:
Originally Posted by Аrco View Post
Just for those of you who say shit..
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH.


@blitz
Im sure it works, make sure u put it the right places.
09/29/2010 03:22 killersub#8
Quote:
Originally Posted by BitzIn View Post
Doesnt work D: and som errors come with it
don't know how to set it up? having problems? code not working properly?

then the best thing to do is to GTFO and try a different code newblet...:rtfm:
09/29/2010 03:59 Arcо#9
Quote:
Originally Posted by killersub View Post
don't know how to set it up? having problems? code not working properly?

then the best thing to do is to GTFO and try a different code newblet...:rtfm:
Before you start calling people 'newblets' and telling them to 'GTFO', you should know I accidentally left a piece of information out that's causing the error.
I'll post the fix right away.

#Edit
Inside the packethandler for case 1022, under
uint AttackType = BitConverter.ToUInt32(Data, 20);
put
uint dmg = BitConverter.ToUInt32(Data, 8);
09/29/2010 08:19 Fish*#10
Quote:
Originally Posted by Аrco View Post
Before you start calling people 'newblets' and telling them to 'GTFO', you should know I accidentally left a piece of information out that's causing the error.
I'll post the fix right away.

#Edit
Inside the packethandler for case 1022, under
uint AttackType = BitConverter.ToUInt32(Data, 20);
put
uint dmg = BitConverter.ToUInt32(Data, 8);
Double hhhh

@OP
I think u have got ur interactions.
09/29/2010 16:20 xSynthesis#11
Quote:
Originally Posted by killersub View Post
don't know how to set it up? having problems? code not working properly?

then the best thing to do is to GTFO and try a different code newblet...:rtfm:
You're acting so hard compared to old you. I remember when you were a newbie at coding. You were always wanted to help about something that you can't code. Also you used to said that you were a noob or newbie in your every single threads. Whenever someone posts negative threads about you, you were NerdRaging about it.

Now shut the hell up and 'think' before you post something.
09/29/2010 16:32 Fish*#12
Quote:
Originally Posted by xSynthesis View Post
You're acting so hard compared to old you. I remember when you were a newbie at coding. You were always wanted to help about something that you can't code. Also you used to said that you were a noob or newbie in your every single threads. Whenever someone posts negative threads about you, you were NerdRaging about it.

Now shut the hell up and 'think' before you post something.
I love the way you post ^_^
09/29/2010 17:14 Fish*#13
Quote:
Originally Posted by †he Knight §olari§ View Post
Hey .Arco Pwnzor , I tried the code also , doesnt work .. I'm Waiting for your fix !
He already wrote the fix
09/29/2010 21:46 KraHen#14
I lol at this whole interaction stuff.
09/29/2010 21:51 -impulse-#15
Quote:
Originally Posted by KraHen View Post
I lol at this whole interaction stuff.
mainly because it's not complete?

I agree, I did not complete it. But most of it is there.

it's not even good looking?

I didn't even try to make it look clean.

Next time I'm going to write the interaction stuff, will be complete with the right packets(attack + a new one)...

else?

Quote:
Originally Posted by rwj
Post in comment section below
:D