|
You last visited: Today at 00:22
Advertisement
pkcity world msg
Discussion on pkcity world msg within the CO2 Private Server forum part of the Conquer Online 2 category.
10/03/2010, 15:15
|
#1
|
elite*gold: 0
Join Date: Aug 2010
Posts: 77
Received Thanks: 1
|
pkcity world msg
hey guys what im trying to achieve is to get the server to send a sendmsgtoall
when characters enter the pkcity map displaying there name and guild, which i achieved but then found that if a char isnt in a guild the msg doesnt activate.
Quote:
#region PKCity NPC
case 1616:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you wish to enter the PKCity?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
}
else
{
if (GC.MyChar.MyGuild != null)
{
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
}
}
break;
}
#endregion
|
i tried to change what the msg said if a char wasnt in a guild but it doesnt work. can some1 please tell me what im missing or doing wrong?
thanks...
|
|
|
10/03/2010, 16:24
|
#2
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by FadMucker
hey guys what im trying to achieve is to get the server to send a sendmsgtoall
when characters enter the pkcity map displaying there name and guild, which i achieved but then found that if a char isnt in a guild the msg doesnt activate.
i tried to change what the msg said if a char wasnt in a guild but it doesnt work. can some1 please tell me what im missing or doing wrong?
thanks...
|
Code:
#region PKCity NPC
case 1616:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you wish to enter the PKCity?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1 && GC.MyChar.Guild != null)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
}
else
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
}
break;
}
#endregion
Try this, I have NOT tested it.
|
|
|
10/03/2010, 16:50
|
#3
|
elite*gold: 0
Join Date: Aug 2010
Posts: 77
Received Thanks: 1
|
Quote:
Originally Posted by .Beatz
Code:
#region PKCity NPC
case 1616:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you wish to enter the PKCity?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1 && GC.MyChar.Guild != null)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
}
else
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
}
break;
}
#endregion
Try this, I have NOT tested it.
|
nah dont work any other ideas?
|
|
|
10/03/2010, 17:00
|
#4
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Quote:
Originally Posted by FadMucker
nah dont work any other ideas?
|
Code:
#region PKCity NPC
case 1616:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you wish to enter the PKCity?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
}
else if (Control == 1 && GC.MyChar.Guild == null)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
}
break;
}
#endregion
If that does not work add me on msn and I will try and help you some more.
|
|
|
10/03/2010, 17:06
|
#5
|
elite*gold: 0
Join Date: Oct 2010
Posts: 148
Received Thanks: 57
|
@beatz, u didnt need to do it that, u could have done it simpler, like this
Code:
#region PKCity NPC
case 1616:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you wish to enter the PKCity?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.MyChar.Teleport(1507, 080, 111);
if (GC.MyChar.Guild != null)
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
else
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
}
break;
}
#endregion
|
|
|
10/03/2010, 17:15
|
#6
|
elite*gold: 0
Join Date: Aug 2010
Posts: 77
Received Thanks: 1
|
Quote:
Originally Posted by _Vodka
@beatz, u didnt need to do it that, u could have done it simpler, like this
Code:
#region PKCity NPC
case 1616:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you wish to enter the PKCity?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.MyChar.Teleport(1507, 080, 111);
if (GC.MyChar.Guild != null)
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
else
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
}
break;
}
#endregion
|
thx dude works perfectly +rep
|
|
|
10/03/2010, 17:43
|
#7
|
elite*gold: 0
Join Date: Jun 2010
Posts: 50
Received Thanks: 10
|
Like .Beatz not tested it but is how i would of done it.
Code:
#region PKCity NPC
case 1616:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you wish to enter the PKCity?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
if (GC.MyChar.MyGuild.GuildName != null)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
}
}
break;
}
#endregion
|
|
|
10/03/2010, 18:13
|
#8
|
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
|
Shurrup im tired rofl. Ah well at least it got done xD
|
|
|
10/03/2010, 19:14
|
#9
|
elite*gold: 0
Join Date: Oct 2010
Posts: 148
Received Thanks: 57
|
Quote:
Originally Posted by Macnoo
Like .Beatz not tested it but is how i would of done it.
Code:
#region PKCity NPC
case 1616:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Do you wish to enter the PKCity?"));
GC.AddSend(Packets.NPCLink("Yes.", 1));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
if (GC.MyChar.MyGuild.GuildName != null)
{
GC.MyChar.Teleport(1507, 080, 111);
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
}
}
break;
}
#endregion
|
why do u keep use data not needed.
this one works pefect and got less useage.
Code:
GC.MyChar.Teleport(1507, 080, 111);
if (GC.MyChar.Guild != null)
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " from " + GC.MyChar.MyGuild.GuildName + " has entered the PKCity!", 2011, 0);
else
Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + " has entered the PKCity!", 2011, 0);
|
|
|
 |
Similar Threads
|
〖Perfect World 〗Chaos World Private Server
07/01/2009 - Private Server Advertising - 2 Replies
http://www.chaos2world.com/en/1.jpg
http://www.chaos2world.com/en/2.jpg
http://www.chaos2world.com/en/3.jpg
http://www.chaos2world.com/en/4.jpg
http://www.chaos2world.com/en/5.jpg
http://www.chaos2world.com/en/6.jpg
http://www.chaos2world.com/en/7.jpg
〖Perfect World 〗Chaos World Private Server
Chaos World a long time open, permanent free!!!
1.Free 10Million Skill Point,1Million Gold,Free Manufacture(Level 1 can Manufacture),Free New Player Equipment With Weapon 1Set,Free Reveal All...
|
〖Perfect World 〗Chaos World Private Server
05/24/2009 - Private Server Advertising - 2 Replies
Chaos World a long time open, permanent free!!!
1.Free 10Million Skill Point,1Million Gold,Free Manufacture(Level 1 can Manufacture),Free New Player Equipment With Weapon 1Set,Free Reveal All Teleportation Point in Perfect World,Free All Skill,Free Expand All Slot of Inventory,Free Expand All Slot of Bank Storage,Free Expand All Slot of Pet's,Free Cultivation To Nirvana(Please Don't Take Any Cultivation And Mission,Direct Take Demon or Sage Mission Start From Level 89).
2.Experience Set to...
|
All times are GMT +1. The time now is 00:22.
|
|