I feel so darn` to found out this late... in Character.cs there is a pre-made void/method called SendScreen() which has a code that would send packets to any nearby players from the executor player.
With this we may able now to use SendScreen instead of using AddSend method to any Effect code that we want... example in my previous CoolEffect UPDATE I used to have this code:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NewestCOServer.PacketHandling
{
class CoolEffect
{
public static void ActiveCool(Main.GameClient MyClient)
{
byte counter = 0;
for (byte i = 1; i < 9; i++)
{
if (i == 7) i++;
Game.Item I = MyClient.MyChar.Equips.Get(i);
if (I.ID != 0)
{
Game.ItemIDManipulation Q = new CoPinoy.Game.ItemIDManipulation(I.ID);
if (Q.Quality == Game.Item.ItemQuality.Super)
counter += 1;
}
}
if (MyClient.MyChar.Job >= 100)
if (counter == 6)
counter = 7;
if (MyClient.MyChar.Job >= 40 && MyClient.MyChar.Job <= 45)
if (counter == 6)
{
Game.Item I = MyClient.MyChar.Equips.Get(5);
I.ID = MyClient.MyChar.Equips.LeftHand.ID;
if (I.ID == 0)
counter = 7;
}
new Thread(delegate()
{
[COLOR="Blue"]foreach (Game.Character CC in Game.World.H_Chars.Values)[/COLOR]
{
[COLOR="Lime"] if (CC.Loc.Map == MyClient.MyChar.Loc.Map && MyMath.InBox(MyClient.MyChar.Loc.X, MyClient.MyChar.Loc.Y, CC.Loc.X, CC.Loc.Y, 100))[/COLOR]
{
if (counter == 7)
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "warrior"));
else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "fighter"));
else if (MyClient.MyChar.Job >= 100)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "taoist"));
else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "archer"));
else if (MyClient.MyChar.Job >= 50 && MyClient.MyChar.Job <= 55)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "Ninja120"));
}
else
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "warrior-s"));
else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "fighter-s"));
else if (MyClient.MyChar.Job >= 100)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "taoist-s"));
else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "archer-s"));
else if (MyClient.MyChar.Job >= 50 && MyClient.MyChar.Job <= 55)
CC.MyClient.[COLOR="Red"]AddSend[/COLOR](Packets.String(MyClient.MyChar.EntityID, 10, "Ninja120"));
}
}
MyClient.MyChar.Action = 100;
}
}).Start();
}
}
}
obviously in this code I uses a for each loop(in color blue) that would map/iterate the number of players in the game and in side the loop i have a conditional statement(in color green) that would check either a particular player that has been mapped from the game is a nearby player, If so the latter effect will be executed. this algorithm is likely similar to the algorithm in SendScreen() method found in Character.cs, so therefore we may able to change the code above and make it look simpler like this.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NewestCOServer.PacketHandling
{
class CoolEffect
{
public static void ActiveCool(Main.GameClient MyClient)
{
byte counter = 0;
for (byte i = 1; i < 9; i++)
{
if (i == 7) i++;
Game.Item I = MyClient.MyChar.Equips.Get(i);
if (I.ID != 0)
{
Game.ItemIDManipulation Q = new CoPinoy.Game.ItemIDManipulation(I.ID);
if (Q.Quality == Game.Item.ItemQuality.Super)
counter += 1;
}
}
if (MyClient.MyChar.Job >= 100)
if (counter == 6)
counter = 7;
if (MyClient.MyChar.Job >= 40 && MyClient.MyChar.Job <= 45)
if (counter == 6)
{
Game.Item I = MyClient.MyChar.Equips.Get(5);
I.ID = MyClient.MyChar.Equips.LeftHand.ID;
if (I.ID == 0)
counter = 7;
}
if (counter == 7)
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "warrior"));
else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "fighter"));
else if (MyClient.MyChar.Job >= 100)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "taoist"));
else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "archer"));
else if (MyClient.MyChar.Job >= 50 && MyClient.MyChar.Job <= 55)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "Ninja120"));
}
else
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "warrior-s"));
else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "fighter-s"));
else if (MyClient.MyChar.Job >= 100)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "taoist-s"));
else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "archer-s"));
else if (MyClient.MyChar.Job >= 50 && MyClient.MyChar.Job <= 55)
MyClient.MyChar.SendScreen(Packets.String(MyClient.MyChar.EntityID, 10, "Ninja120"));
}
}
MyClient.MyChar.Action = 100;
}
}).Start();
}
}
}
Can you tell me how to do it? im a super noob please.?
No offense, but if you can't trouble-shoot simple errors like that by yourself, you shouldn't have a private server of ANY KIND. You've been around here for over a month, you should at least know how some of the things in your server run.
No offense, but if you can't trouble-shoot simple errors like that by yourself, you shouldn't have a private server of ANY KIND. You've been around here for over a month, you should at least know how some of the things in your server run.
****... what crawled up your ***? Help the community- don't criticize it.
****... what crawled up your ***? Help the community- don't criticize it.
It comes to a point (rather often on epvp) where people just need the truth. If you've read any of her threads he/she doesn't really understand English and doesn't even try half the time. People have tried to help and offered a number of times but it turns into them being expected to do it line by line 100 pct themselves with him/her not even trying.
When it gets to that point, a little criticism is deserved imo. He wasn't being overly harsh.
</offtopic>
Looks to be a good release... shocking that lotf doesn't have something like this built in but I suppose it shouldn't be.
yeh i agree she was here when i first started on the forums and it looked like she was here quite sometime when i started making my own p server and ive basicly debugged mine 100% and shes still getting stuck on stuff like that... shes not even trying tbh, she needs to start meeting us half way at some point.
How to make effects show again? 09/20/2008 - CO2 Private Server - 0 Replies hi, can soemone please tell me how to make my effects in CO show again? my ss skills and cyclone skills and phoenix, dragon gem effect etc
can u make the king,prince,duke effects go away 03/31/2008 - Conquer Online 2 - 2 Replies tittle says all I run dial up :D so i was wondering is i can take it out somehow cause it really is laggy in GW when alot of them are dukes and others, and also sdg effect pretty much everything cept for the fb/ss effect and the dmg number