Register for your free account! | Forgot your password?

You last visited: Today at 23:02

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Map problem.

Discussion on Map problem. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 04/09/2010, 04:38   #16
 
elite*gold: 0
Join Date: May 2006
Posts: 127
Received Thanks: 91
Quote:
Originally Posted by teroareboss1 View Post
in World.cs

replace
public static void Spawns(Character C, bool Check)

with
fail!, this is just the same with the original one...
kamote is offline  
Old 04/09/2010, 09:26   #17
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by kamote View Post
fail!, this is just the same with the original one...
W R O N G.

It has one '(' and one ')' more than the original and they are set exactly where they need to make it work perfectly fine.

You don't have eyes to see what's good/bad... Terroare didn't say what he added to it to make it work fine...

This is copied from Terroare's post:

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))
Look at the last check.
(!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, CC.Loc.X, CC.Loc.Y, 17) || !Check)

That's the fix. Just the original one doesn't have one '(' and one ')'.

I hope you got it now.
-impulse- is offline  
Thanks
4 Users
Old 04/09/2010, 09:57   #18
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by -impulse- View Post
W R O N G.

It has one '(' and one ')' more than the original and they are set exactly where they need to make it work perfectly fine.

You don't have eyes to see what's good/bad... Terroare didn't say what he added to it to make it work fine...

This is copied from Terroare's post:

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))
Look at the last check.
(!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, CC.Loc.X, CC.Loc.Y, 17) || !Check)

That's the fix. Just the original one doesn't have one '(' and one ')'.

I hope you got it now.
Typos are amazing aren't they? Lol.
Something so small resulting in something so big.
-NewDawn- is offline  
Old 04/09/2010, 12:07   #19
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by -NewDawn- View Post
Typos are amazing aren't they? Lol.
Something so small resulting in something so big.
True...true.
-impulse- is offline  
Thanks
1 User
Old 04/09/2010, 14:24   #20
 
elite*gold: 0
Join Date: May 2006
Posts: 127
Received Thanks: 91
Quote:
Originally Posted by -impulse- View Post
W R O N G.

It has one '(' and one ')' more than the original and they are set exactly where they need to make it work perfectly fine.

You don't have eyes to see what's good/bad... Terroare didn't say what he added to it to make it work fine...

This is copied from Terroare's post:

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))
Look at the last check.
(!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, CC.Loc.X, CC.Loc.Y, 17) || !Check)

That's the fix. Just the original one doesn't have one '(' and one ')'.

I hope you got it now.
geeez! ...my mistake! kinda blind here... heheheh
kamote is offline  
Old 04/19/2011, 11:24   #21
 
elite*gold: 0
Join Date: Apr 2009
Posts: 82
Received Thanks: 5
Code:
public static void Spawns(Character C, bool Check)
{
try
{
COPacket CSpawn = Packets.SpawnEntity(C);
foreach (Character CC in H_Chars.Values)
{
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));
}
}
Hashtable MapMobs = (Hashtable)H_Mobs[C.Loc.Map];
if (MapMobs != null)
{
foreach (Mob M in MapMobs.Values)
if (M.Alive && MyMath.InBox(C.Loc.X, C.Loc.Y, M.Loc.X, M.Loc.Y, 16) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, M.Loc.X, M.Loc.Y, 16) || !Check))
C.MyClient.AddSend(Packets.SpawnEntity(M));
}
Hashtable MapItems = (Hashtable)H_Items[C.Loc.Map];
if (MapItems != null)
{
foreach (DroppedItem DI in MapItems.Values)
if (MyMath.InBox(C.Loc.X, C.Loc.Y, DI.Loc.X, DI.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, DI.Loc.X, DI.Loc.Y, 14) || !Check))
C.MyClient.AddSend(Packets.ItemDrop(DI));
}
foreach (NPC N in H_NPCs.Values)
if (N.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, N.Loc.X, N.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, N.Loc.X, N.Loc.Y, 14) || !Check))
{
if (N.MaxHP == 0)
C.MyClient.AddSend(Packets.SpawnNPC(N));
else
C.MyClient.AddSend(Packets.SpawnNPCWithHP(N));
}

foreach (Features.PersonalShops.Shop S in H_PShops.Values)
if (S.NPCInfo.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, S.NPCInfo.Loc.X, S.NPCInfo.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, S.NPCInfo.Loc.X, S.NPCInfo.Loc.Y, 14) || !Check))
{
C.MyClient.AddSend(Packets.SpawnNamedNPC(S.NPCInfo , S.Name));
if (S.Hawk != "")
C.MyClient.AddSend(Packets.ChatMessage(26514, S.Owner.Name, "ALL", S.Hawk, 2104, 0));
}
foreach (Companion Cmp in H_Companions.Values)
if (Cmp.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, Cmp.Loc.X, Cmp.Loc.Y, 16) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, Cmp.Loc.X, Cmp.Loc.Y, 16) || !Check))
C.MyClient.AddSend(Packets.SpawnEntity(Cmp));
Features.GuildWars.ThePole.Spawn(C, Check);
Features.GuildWars.TheLeftGate.Spawn(C, Check);
Features.GuildWars.TheRightGate.Spawn(C, Check);
}
catch { }
}
snow118 is offline  
Old 04/19/2011, 12:56   #22
 
elite*gold: 0
Join Date: Apr 2011
Posts: 73
Received Thanks: 12
Quote:
Originally Posted by snow118 View Post
Code:
public static void Spawns(Character C, bool Check)
{
try
{
COPacket CSpawn = Packets.SpawnEntity(C);
foreach (Character CC in H_Chars.Values)
{
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));
}
}
Hashtable MapMobs = (Hashtable)H_Mobs[C.Loc.Map];
if (MapMobs != null)
{
foreach (Mob M in MapMobs.Values)
if (M.Alive && MyMath.InBox(C.Loc.X, C.Loc.Y, M.Loc.X, M.Loc.Y, 16) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, M.Loc.X, M.Loc.Y, 16) || !Check))
C.MyClient.AddSend(Packets.SpawnEntity(M));
}
Hashtable MapItems = (Hashtable)H_Items[C.Loc.Map];
if (MapItems != null)
{
foreach (DroppedItem DI in MapItems.Values)
if (MyMath.InBox(C.Loc.X, C.Loc.Y, DI.Loc.X, DI.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, DI.Loc.X, DI.Loc.Y, 14) || !Check))
C.MyClient.AddSend(Packets.ItemDrop(DI));
}
foreach (NPC N in H_NPCs.Values)
if (N.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, N.Loc.X, N.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, N.Loc.X, N.Loc.Y, 14) || !Check))
{
if (N.MaxHP == 0)
C.MyClient.AddSend(Packets.SpawnNPC(N));
else
C.MyClient.AddSend(Packets.SpawnNPCWithHP(N));
}

foreach (Features.PersonalShops.Shop S in H_PShops.Values)
if (S.NPCInfo.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, S.NPCInfo.Loc.X, S.NPCInfo.Loc.Y, 14) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, S.NPCInfo.Loc.X, S.NPCInfo.Loc.Y, 14) || !Check))
{
C.MyClient.AddSend(Packets.SpawnNamedNPC(S.NPCInfo , S.Name));
if (S.Hawk != "")
C.MyClient.AddSend(Packets.ChatMessage(26514, S.Owner.Name, "ALL", S.Hawk, 2104, 0));
}
foreach (Companion Cmp in H_Companions.Values)
if (Cmp.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, Cmp.Loc.X, Cmp.Loc.Y, 16) && (!MyMath.InBox(C.Loc.PreviousX, C.Loc.PreviousY, Cmp.Loc.X, Cmp.Loc.Y, 16) || !Check))
C.MyClient.AddSend(Packets.SpawnEntity(Cmp));
Features.GuildWars.ThePole.Spawn(C, Check);
Features.GuildWars.TheLeftGate.Spawn(C, Check);
Features.GuildWars.TheRightGate.Spawn(C, Check);
}
catch { }
}
You failed so hard.
Secured is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +2. The time now is 23:02.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.