If he coded it or not he released it anyway . won't make any difference to that .
but yea good work :)
but yea good work :)
Quote:
ya thats right nobody can see them this problem also with Cool Effects etc.
#region Firwork EndlessLove
case 720031:
{
RemoveItem(I);
{
foreach (Game.Character Player in Game.World.H_Chars.Values)
{
Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, "firework-1love"));
}
}
}
break;
#endregion
#region Firwork
case 720030:
{
RemoveItem(I);
{
foreach (Game.Character Player in Game.World.H_Chars.Values)
{
Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, "firework-like"));
}
}
}
break;
#endregion
#region Firwork MyWish
case 720032:
{
RemoveItem(I);
{
foreach (Game.Character Player in Game.World.H_Chars.Values)
{
Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, "firework-2love"));
}
}
}
break;
#endregion
Quote:
World.Action(this, Packets.String(EntityID, 10, "firework-2love").Get);
#region Firwork EndlessLove
case 720031:
{
RemoveItem(I);
{
foreach (Character CC in H_Chars.Values)
{
if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-1love"));
}
}
}
break;
#endregion
#region Firwork
case 720030:
{
RemoveItem(I);
{
foreach (Character CC in H_Chars.Values)
{
if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-like"));
}
}
}
break;
#endregion
#region Firwork MyWish
case 720032:
{
RemoveItem(I);
{
foreach (Character CC in H_Chars.Values)
{
if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-2love"));
}
}
}
break;
#endregion
Well that could work but how would one define "C".Quote:
Hows this?Code:#region Firwork EndlessLove case 720031: { RemoveItem(I); { foreach (Character CC in H_Chars.Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-1love")); } } } break; #endregion #region Firwork case 720030: { RemoveItem(I); { foreach (Character CC in H_Chars.Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-like")); } } } break; #endregion #region Firwork MyWish case 720032: { RemoveItem(I); { foreach (Character CC in H_Chars.Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-2love")); } } } break; #endregion
#region Firwork
case 720030:
{
RemoveItem(I);
{
foreach (Game.Character CC in Game.World.H_Chars.Values)
{
if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-like"));
}
}
}
break;
#endregion
#region Firwork EndlessLove
case 720031:
{
RemoveItem(I);
{
Game.Character C = MyClient.MyChar;
foreach (Game.Character CC in Game.World.H_Chars.Values)
{
if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-1love"));
}
}
}
break;
#endregion
#region Firwork
case 720030:
{
RemoveItem(I);
{
Game.Character C = MyClient.MyChar;
foreach (Game.Character CC in Game.World.H_Chars.Values)
{
if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-like"));
}
}
}
break;
#endregion
#region Firwork MyWish
case 720032:
{
RemoveItem(I);
{
Game.Character C = MyClient.MyChar;
foreach (Game.Character CC in Game.World.H_Chars.Values)
{
if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-2love"));
}
}
}
break;
#endregion
Since its already under Character you can just take out C and it will work.Quote:
Well that could work but how would one define "C".
When your code is rewritten to make sense with the server it looks like this:
with "CC" defined in the "foreach" statement; however that leaves "C" undefined. So... this is how I defined it:Code:#region Firwork case 720030: { RemoveItem(I); { foreach (Game.Character CC in Game.World.H_Chars.Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-like")); } } } break; #endregion
Game.Character C = MyClient.MyChar;
This worked perfectly =P
The new code that works perfectly should appear as followed with the help of Korvacs:
Code:#region Firwork EndlessLove case 720031: { RemoveItem(I); { Game.Character C = MyClient.MyChar; foreach (Game.Character CC in Game.World.H_Chars.Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-1love")); } } } break; #endregion #region Firwork case 720030: { RemoveItem(I); { Game.Character C = MyClient.MyChar; foreach (Game.Character CC in Game.World.H_Chars.Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-like")); } } } break; #endregion #region Firwork MyWish case 720032: { RemoveItem(I); { Game.Character C = MyClient.MyChar; foreach (Game.Character CC in Game.World.H_Chars.Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-2love")); } } } break; #endregion
red is my errorQuote:
Hows this?Code:#region Firwork EndlessLove case 720031: { RemoveItem(I); { foreach (Character CC in [COLOR="red"]H_Chars[/COLOR].Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-1love")); } } } break; #endregion #region Firwork case 720030: { RemoveItem(I); { foreach (Character CC in [COLOR="red"]H_Chars[/COLOR].Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-like")); } } } break; #endregion #region Firwork MyWish case 720032: { RemoveItem(I); { foreach (Character CC in [COLOR="Red"]H_Chars[/COLOR].Values) { if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20)) CC.MyClient.AddSend(Packets.String(CC.EntityID, 10, "firework-2love")); } } } break; #endregion