|
You last visited: Today at 14:12
Advertisement
[Release] TDM NPC that gives you the garment for your team
Discussion on [Release] TDM NPC that gives you the garment for your team within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
03/02/2010, 02:27
|
#1
|
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
|
[Release] TDM NPC that gives you the garment for your team
Hello.
I fixed this NPC's grammar alot.
And it gives you the colored garment of your team when you join.
Example: If you join the red team, it will give you a red celestial. etc etc
You get it
I hope you like it!
Code:
#region Team Deathmatch
case 8000:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Hello. You wanna join team death match?"));
GC.AddSend(Packets.NPCLink("Yeah.", 1));
GC.AddSend(Packets.NPCLink("My team?.", 4));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 4)
{
if (GC.MyChar.dmred == 1)
{
GC.AddSend(Packets.NPCSay("You are in the red team"));
GC.AddSend(Packets.NPCLink("OK i see", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.dmblack == 1)
{
GC.AddSend(Packets.NPCSay("You are in the black team"));
GC.AddSend(Packets.NPCLink("OK i see", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.dmblue == 1)
{
GC.AddSend(Packets.NPCSay("You are in the blue team"));
GC.AddSend(Packets.NPCLink("OK i see", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You are not in a team"));
GC.AddSend(Packets.NPCLink("OK i see", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
if (Control == 1)
{
if (GC.MyChar.dmjoin == 0)
{
if (World.dm == true)
{
Random teams = new Random();
int team = teams.Next(1, 2);
if (team == 1)
{
GC.MyChar.dmblack = 1;
GC.MyChar.dmjoin = 1;
World.DeathMatch.teamblack += 1;
}
if (team == 2)
{
GC.MyChar.dmblue = 1;
GC.MyChar.dmjoin = 1;
World.DeathMatch.teamblue += 1;
}
if (World.DeathMatch.teamred < World.DeathMatch.teamblue)
{
GC.MyChar.dmred = 1;
GC.MyChar.dmblue = 0;
World.DeathMatch.teamblue -= 1;
World.DeathMatch.teamred += 1;
}
else if (World.DeathMatch.teamred < World.DeathMatch.teamblack)
{
GC.MyChar.dmred = 1;
GC.MyChar.dmblack = 0;
World.DeathMatch.teamblack -= 1;
World.DeathMatch.teamred += 1;
}
if (GC.MyChar.dmred == 1)
{
GC.MyChar.AddItem(181625);
GC.AddSend(Packets.NPCSay("You have joined the red team! Please put on this garment."));
GC.AddSend(Packets.NPCLink("Ok", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.dmblack == 1)
{
GC.MyChar.AddItem(181525);
GC.AddSend(Packets.NPCSay("You have joined the black team! Please put on this garment."));
GC.AddSend(Packets.NPCLink("Ok", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.dmblue == 1)
{
GC.MyChar.AddItem(181825);
GC.AddSend(Packets.NPCSay("You have joined the blue team! Please put on this garment."));
GC.AddSend(Packets.NPCLink("Ok", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("Sorry but the Death Match if off"));
GC.AddSend(Packets.NPCLink("OK i see", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("You are already in a team"));
GC.AddSend(Packets.NPCLink("OK i see", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
|
|
|
03/02/2010, 02:34
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Whenever you do the tournament they get the item over and over.
Why don't you do a equip unequip code?
|
|
|
03/02/2010, 02:36
|
#3
|
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
|
I wish I knew the code.
|
|
|
03/02/2010, 02:36
|
#4
|
elite*gold: 0
Join Date: Aug 2009
Posts: 930
Received Thanks: 448
|
Nice job!
|
|
|
03/02/2010, 02:39
|
#5
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
if (GC.MyChar.Equip.Garment.ID = 0)
{
Gc.MYChar.Equip.Garment == 181625;
}
else
{
Please remove your current garment first.
}
|
|
|
03/02/2010, 03:50
|
#6
|
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
|
Good job actually, glad to see that you're improving! :P
Just one thing that I can see is wrong, since there's 4 teams, make the rand this:
Code:
Random teams = new Random();
int team = teams.Next(1, 4);
|
|
|
03/02/2010, 03:55
|
#7
|
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
|
Quote:
Originally Posted by walmartboi
Good job actually, glad to see that you're improving! :P
Just one thing that I can see is wrong, since there's 4 teams, make the rand this:
Code:
Random teams = new Random();
int team = teams.Next(1, 4);
|
Sorry dude, but there is only 3 teams, xD
Red, Blue, and Black.
|
|
|
03/02/2010, 04:35
|
#8
|
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
|
Oh, I added the 4th on mine. LOL
|
|
|
03/02/2010, 04:47
|
#9
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by walmartboi
Good job actually, glad to see that you're improving! :P
|
All he did was do an additem method which he does for all his npc's.
|
|
|
03/02/2010, 04:53
|
#10
|
elite*gold: 0
Join Date: Dec 2007
Posts: 378
Received Thanks: 163
|
Quote:
Originally Posted by .Arco
All he did was do an additem method which he does for all his npc's.
|
Sarcasm
|
|
|
03/02/2010, 04:54
|
#11
|
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
|
Theres 4 Teams in all if you check the code Red/Blue/Black/White
|
|
|
03/02/2010, 07:12
|
#12
|
elite*gold: 0
Join Date: Jul 2006
Posts: 112
Received Thanks: 26
|
He didn't code this. All it says he did was fix the grammar.
|
|
|
03/02/2010, 12:16
|
#13
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
|
Ha great job correcting the grammer...
Code:
Sorry but the Death Match if off
failure.
|
|
|
03/02/2010, 13:44
|
#14
|
elite*gold: 0
Join Date: Feb 2009
Posts: 259
Received Thanks: 159
|
[Release] TDM NPC that gives you the garment for your team
add in NPCDialog.cs
PHP Code:
#region Dm case 8000: { if (Control == 0) { GC.AddSend(Packets.NPCSay("Hellow you wana join in DeathMatch")); GC.AddSend(Packets.NPCLink("Yeah.", 1)); GC.AddSend(Packets.NPCLink("My team?.", 4)); GC.AddSend(Packets.NPCLink("No.", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } if (Control == 4) { if (GC.MyChar.dmred == 1) { GC.AddSend(Packets.NPCSay("You is in redteam")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } else if (GC.MyChar.dmblack == 1) { GC.AddSend(Packets.NPCSay("You is in blackteam")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } else if (GC.MyChar.dmblue == 1) { GC.AddSend(Packets.NPCSay("You is in blueteam")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } else { GC.AddSend(Packets.NPCSay("You dont is in team")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } } if (Control == 1) { if (GC.MyChar.dmjoin == 0) { if (World.dm == true) { Random teams = new Random(); int team = teams.Next(1, 2); if (team == 1) { GC.MyChar.dmblack = 1; GC.MyChar.dmjoin = 1; World.DeathMatch.teamblack += 1; } if (team == 2) { GC.MyChar.dmblue = 1; GC.MyChar.dmjoin = 1; World.DeathMatch.teamblue += 1; } if (World.DeathMatch.teamred < World.DeathMatch.teamblue) { GC.MyChar.dmred = 1; GC.MyChar.dmblue = 0; World.DeathMatch.teamblue -= 1; World.DeathMatch.teamred += 1; } else if (World.DeathMatch.teamred < World.DeathMatch.teamblack) { GC.MyChar.dmred = 1; GC.MyChar.dmblack = 0; World.DeathMatch.teamblack -= 1; World.DeathMatch.teamred += 1; } if (GC.MyChar.dmred == 1) { GC.AddSend(Packets.NPCSay("You is in redteam")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } else if (GC.MyChar.dmblack == 1) { GC.AddSend(Packets.NPCSay("You is in blackteam")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } else if (GC.MyChar.dmblue == 1) { GC.AddSend(Packets.NPCSay("You is in blueteam")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } } else { GC.AddSend(Packets.NPCSay("Sorry but the DeathMatch if off")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } } else { GC.AddSend(Packets.NPCSay("Sorry but you alerty in team")); GC.AddSend(Packets.NPCLink("OK i see", 255)); GC.AddSend(Packets.NPCSetFace(N.Avatar)); GC.AddSend(Packets.NPCFinish()); } } break; }
in OldCODB/npc.txt
add
Code:
8000 310 2 0 1002 422 361
go world.cs
find for
Code:
public static void NewEmpire(Character C)
up add
PHP Code:
public static bool dm = false; public class DeathMatch { public static int teamred = 0; public static int teamblue = 0; public static int teamblack = 0; public static int teamwhite = 0; } public class Dmscore { public static int redscore = 0; public static int bluescore = 0; public static int blackscore = 0; public static int whitescore = 0; }
go Character.cs
find for
PHP Code:
public byte OnlineTrainingPts = 0;
up add
PHP Code:
public int dmjoin = 0; public int dmred = 0; public int dmblack = 0; public int dmblue = 0; public int dmwhite = 0;
here in character.cs find for
PHP Code:
if (BuffOf(SkillsClass.ExtraEffect.Fly).Eff== SkillsClass.ExtraEffect.Fly) return;
down add
PHP Code:
if (dmblack == 1) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Name != MyClient.MyChar.Name) { if (Chaar.dmblack == 1) { Damage = 0; return; } } } } if (dmblue == 1) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Name != MyClient.MyChar.Name) { if (Chaar.dmblue == 1) { Damage = 0; return; } } } } if (dmred == 1) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Name != MyClient.MyChar.Name) { if (Chaar.dmred == 1) { Damage = 0; return; } } } }
go Features make class whit name DMScore.cs
where put there
PHP Code:
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Text; using NewestCOServer.Game; namespace NewestCOServer.Features { public class DMScore { public static DateTime LastScores; public static void SendScores() { foreach (Character C in World.H_Chars.Values) { if (C.Loc.Map == 1090) { byte c = 0; if (c == 0) { C.MyClient.AddSend(Packets.ChatMessage(0, "SYSTEM", "ALLUSERS", "BlackTeam score -" + World.Dmscore.blackscore + " ", 0x83c, 0)); } else C.MyClient.AddSend(Packets.ChatMessage(0, "SYSTEM", "ALLUSERS", "BlackTeam score -" + World.Dmscore.blackscore + " ", 0x83d, 0)); C.MyClient.AddSend(Packets.ChatMessage(2, "SYSTEM", "ALLUSERS", "BlueTeam score - " + World.Dmscore.bluescore + " ", 0x83d, 0)); C.MyClient.AddSend(Packets.ChatMessage(3, "SYSTEM", "ALLUSERS", "RedTeam score -" + World.Dmscore.redscore + " ", 0x83d, 0)); c++; } } } } }
here go in chat.cs
and add
PHP Code:
if (Cmd[0] == "/dmtrue") { Game.World.dm = true; Game.World.SendMsgToAll("Server", "DeathMatch start in 2 min!go TwinCity at 424 361 for join to tornament!", 2011, 0); new Thread(new ThreadStart(delegate() { Console.WriteLine("DeathMatch Activated (via Console)."); Thread.Sleep(30000); Game.World.SendMsgToAll("Server", "DeathMatch will start in 1 minutes and 30 Seconds! go TwinCity at 424 361 for join to tornament!", 2011, 0); Console.WriteLine("1 Minutes 30 seconds Left"); Thread.Sleep(30000); Game.World.SendMsgToAll("Server", "DeathMatch will start in 1 minutes! go TwinCity at 424 361 for join to tornament!", 2011, 0); Console.WriteLine("1 Minutes Left"); Thread.Sleep(30000); Game.World.SendMsgToAll("Server", "DeathMatch will start in 30 Seconds! go TwinCity at 424 361 for join to tornament!", 2011, 0); Console.WriteLine("30 seconds Left"); Thread.Sleep(30000); Game.World.SendMsgToAll("Server", "DeathMatch will start ", 2011, 0); Console.WriteLine("DeathMatch will start "); foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.dmjoin == 1) { if (Chaar.dmblack == 1) { Chaar.AddItemPos(181525); Chaar.Teleport(1090, 121, 70); } else if (Chaar.dmblue == 1) { Chaar.AddItemPos(181825); Chaar.Teleport(1090, 144, 152); } else if (Chaar.dmred == 1) { Chaar.AddItemPos(181625); Chaar.Teleport(1090, 43, 67); } } } Game.World.dm = false; Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 9 minutes", 2011, 0); Console.WriteLine("9 Minutes Left"); Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 8 minutes", 2011, 0); Console.WriteLine("8 Minutes Left"); Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 7 minutes", 2011, 0); Console.WriteLine("7 Minutes Left"); Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 6 minutes", 2011, 0); Console.WriteLine("6 Minutes Left"); Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 5 minutes", 2011, 0); Console.WriteLine("5 Minutes Left"); Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 4 minutes", 2011, 0); Console.WriteLine("4 Minutes Left"); Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 3 minutes", 2011, 0); Console.WriteLine("3 Minutes Left"); Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 2 minutes", 2011, 0); Console.WriteLine("2 Minutes Left"); Thread.Sleep(60000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 1 minutes", 2011, 0); Console.WriteLine("1 Minutes Left"); Thread.Sleep(30000); Game.World.SendMsgToAll("Server", "DeathMatch will finish in 30 seconds! ", 2011, 0); Console.WriteLine("DeathMatch will finish in 30 seconds!"); Thread.Sleep(30000); Game.World.SendMsgToAll("Server", "DeathMatch will finish! ", 2011, 0); Console.WriteLine("DeathMatch will finish"); #region wins if (Game.World.Dmscore.blackscore > Game.World.Dmscore.bluescore) { if (Game.World.Dmscore.blackscore > Game.World.Dmscore.redscore) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; Chaar.dmred = 0; if (Chaar.dmblack == 1) { Chaar.dmblack = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! black team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } else { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblack = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; if (Chaar.dmred == 1) { Chaar.dmred = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! red team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } } else if (Game.World.Dmscore.blackscore < Game.World.Dmscore.bluescore) { if (Game.World.Dmscore.bluescore > Game.World.Dmscore.redscore) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblack = 0; Chaar.dmjoin = 0; Chaar.dmred = 0; if (Chaar.dmblue == 1) { Chaar.dmblue = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! blue team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } else { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblack = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; if (Chaar.dmred == 1) { Chaar.dmred = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! red team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } } else if (Game.World.Dmscore.blackscore > Game.World.Dmscore.redscore) { if (Game.World.Dmscore.blackscore > Game.World.Dmscore.bluescore) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; Chaar.dmred = 0; if (Chaar.dmblack == 1) { Chaar.dmblack = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! black team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } else { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblack = 0; Chaar.dmjoin = 0; Chaar.dmred = 0; if (Chaar.dmblue == 1) { Chaar.dmblue = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! blue team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } } else if (Game.World.Dmscore.blackscore < Game.World.Dmscore.redscore) { if (Game.World.Dmscore.redscore > Game.World.Dmscore.blackscore) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblack = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; if (Chaar.dmred == 1) { Chaar.dmred = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! red team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } else { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; Chaar.dmred = 0; if (Chaar.dmblack == 1) { Chaar.dmblack = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! black team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } } else if (Game.World.Dmscore.bluescore > Game.World.Dmscore.redscore) { if (Game.World.Dmscore.bluescore > Game.World.Dmscore.blackscore) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblack = 0; Chaar.dmjoin = 0; Chaar.dmred = 0; if (Chaar.dmblue == 1) { Chaar.dmblue = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! blue team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } else { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; Chaar.dmred = 0; if (Chaar.dmblack == 1) { Chaar.dmblack = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! black team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } } else if (Game.World.Dmscore.bluescore < Game.World.Dmscore.redscore) { if (Game.World.Dmscore.redscore > Game.World.Dmscore.blackscore) { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblack = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; if (Chaar.dmred == 1) { Chaar.dmred = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! red team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } else { foreach (DictionaryEntry DE in Game.World.H_Chars) { Game.Character Chaar = (Game.Character)DE.Value; if (Chaar.Loc.Map == 1090) { Chaar.Teleport(1002, 390, 323); Game.World.DeathMatch.teamblack = 0; Game.World.DeathMatch.teamblue = 0; Game.World.DeathMatch.teamred = 0; Game.World.Dmscore.blackscore = 0; Game.World.Dmscore.bluescore = 0; Game.World.Dmscore.redscore = 0; Chaar.dmblue = 0; Chaar.dmjoin = 0; Chaar.dmred = 0; if (Chaar.dmblack == 1) { Chaar.dmblack = 0; Chaar.CPs += 10000; Game.World.SendMsgToAll("Server", "Congration! black team win DeathMatch ,all members win 10.000CPs", 2011, 0); } } } return; } } #endregion } )).Start(); }
here go back in character.cs
find for useitem , and change teleport scrolls whit
PHP Code:
#region Teleport Scrolls case 1060020: { if (Loc.Map != 6000 && Loc.Map != 6001 && Loc.Map != 1090) { Teleport(1002, 429, 378); RemoveItem(I); } else MyClient.LocalMessage(2005, "Cannot use teleport scrolls in jail."); break; } case 1060021: { if (Loc.Map != 6000 && Loc.Map != 6001 && Loc.Map != 1090) { Teleport(1000, 500, 650); RemoveItem(I); } else MyClient.LocalMessage(2005, "Cannot use teleport scrolls in jail."); break; } case 1060022: { if (Loc.Map != 6000 && Loc.Map != 6001 && Loc.Map != 1090) { Teleport(1020, 565, 562); RemoveItem(I); } else MyClient.LocalMessage(2005, "Cannot use teleport scrolls in jail."); break; } case 1060023: { if (Loc.Map != 6000 && Loc.Map != 6001 && Loc.Map != 1090) { Teleport(1011, 188, 264); RemoveItem(I); } else MyClient.LocalMessage(2005, "Cannot use teleport scrolls in jail."); break; } case 1060024: { if (Loc.Map != 6000 && Loc.Map != 6001 && Loc.Map != 1090) { Teleport(1015, 717, 571); RemoveItem(I); } else MyClient.LocalMessage(2005, "Cannot use teleport scrolls in jail."); break; } #endregion
here find for InitAngry(true);
where you see
PHP Code:
InitAngry(true); Attacker.AtkMem.Attacking = false; Attacker.AtkMem.Target = 0; AtkMem.Attacking = false; AtkMem.Target = 0;
change whit
PHP Code:
InitAngry(true); Attacker.AtkMem.Attacking = false; Attacker.AtkMem.Target = 0; AtkMem.Attacking = false; AtkMem.Target = 0; if (Loc.Map == 1090) { if(Attacker.dmblack == 1){ World.Dmscore.blackscore += 1;} else if (Attacker.dmblue == 1){World.Dmscore.bluescore += 1;} else if (Attacker.dmred == 1) {World.Dmscore.redscore += 1;} Attacker.CPs += 5;//on kill }
go word.cs find for
PHP Code:
public static ArrayList FreePKMaps = new ArrayList()
where you add and (ushort)1090,
go PacketHandler.cs find for
PHP Code:
if (!GC.DoneLoading) {
down add
PHP Code:
if (GC.MyChar.Loc.Map == 1090) { GC.MyChar.Teleport(1002, 429, 378); }
in program.cs add down
PHP Code:
try { if (DateTime.Now > Features.DMScore.LastScores.AddSeconds(1)) Features.DMScore.SendScores(); } catch { }
here find for
PHP Code:
public void AddItem(Item I)
and up add
PHP Code:
public void AddItemPos(uint ID) { Item I = Equips.Get(9); //Item I = new Item(); I.ID = ID; I.UID = (uint)Rnd.Next(10000000); I.MaxDur = I.DBInfo.Durability; I.CurDur = I.MaxDur; if (I.UID == 0) { I.UID = (uint)Rnd.Next(10000000); } Inventory.Add(I); MyClient.AddSend(Packets.AddItem(I, 9)); }
Here find in ItemPacket "folder"
in Equip.cs
find for
PHP Code:
uint ItemUID = BitConverter.ToUInt32(Data, 4); if (GC.MyChar.Inventory.Count < 40) { byte Slot = GC.MyChar.Equips.GetSlot(ItemUID); if (Slot != 0)
and change whit
PHP Code:
if (GC.MyChar.Loc.Map == 1090) { return; } uint ItemUID = BitConverter.ToUInt32(Data, 4); if (GC.MyChar.Inventory.Count < 40) { byte Slot = GC.MyChar.Equips.GetSlot(ItemUID); if (Slot != 0)
here for
PHP Code:
uint ItemUID = BitConverter.ToUInt32(Data, 4); byte Pos = Data[8]; Game.Item I = GC.MyChar.FindInvItem(ItemUID); if (I.ID == 0) { GC.AddSend(Packets.ItemPacket(ItemUID, 0, 3)); return; }
and change with
PHP Code:
if (GC.MyChar.Loc.Map == 1090) { return; } uint ItemUID = BitConverter.ToUInt32(Data, 4); byte Pos = Data[8]; Game.Item I = GC.MyChar.FindInvItem(ItemUID); if (I.ID == 0) { GC.AddSend(Packets.ItemPacket(ItemUID, 0, 3)); return; }
and finish
|
|
|
03/02/2010, 14:17
|
#15
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Well you could've just told people what you added instead of posting an entirely new thread, but good work.
|
|
|
|
|
Similar Threads
|
[RELEASE]Garment effects
05/03/2012 - CO2 PServer Guides & Releases - 37 Replies
Okay, i saw post somewere that somebody wanted garment to have effect, so i tought i will find out and release it
soo
1. Go to your ini folder and open Action3Deffect.ini
2. Add one line there
Quote:
999.100.181.890=w-taoist
The 999.100.181.890=w-taoist is what makes ur armor/garment have effect
|
[Release] Garment Giver
02/18/2010 - CO2 PServer Guides & Releases - 17 Replies
Hello!
This NPC gives you male and female garments +12 -7 2soc sdg 255 hp.
Some credits go to Spare2 for helping me fix my code.
I hope you like it.
Place this is NPCDialog.cs:
#region Free Garments
case 544554:
{
if (Control == 0)
|
I want to make an Eudemons Garment as Conquer Garment or weps or anything but..
01/21/2010 - CO2 Weapon, Armor, Effects & Interface edits - 5 Replies
hi..
i just tried to make an Eudemons garment as an conquer gamrnet but its so confusing me becouse Eudemons garments have no head!!! lmao so when i put it as conquer garment it makes so diffrent shapes of course u understand me so if there is anyway that makes the garments look like Eudemons please tell me ... waiting for an answer :)
Thanks
|
[RELEASE] Garment guy
04/19/2009 - CO2 PServer Guides & Releases - 21 Replies
Hello guys... Well I am not so good in coding... But I can create a NPC like that. Please don't flame me, because I am really noob here. I'd like to relase a Garment Guy. What it does? It's simple! He gives you garments for free, of course not all but Dark Wizard, Colorful Dress, Good Luck etc. well. The NPC is created 100% by my job, and it's fully working. Here we go...
NPC Talk code
if (CurrentNPC == 3356) // Garment guy, coded by Doku
{
...
|
All times are GMT +2. The time now is 14:12.
|
|