Super Botters
Hey Botter register with us! Dont be unregistered!



 
HomeHomeCalendarGamesFAQSearchUsergroupsRegisterLog in

Share | 
 

 [Release]TDM 5165!

View previous topic View next topic Go down 
AuthorMessage
FrontBoy
Head-Admin
Head-Admin
avatar

Posts : 45
Points : 203
Received Thanks : 24
Join date : 2010-05-24
Location : Super Botter`s Forum

PostSubject: [Release]TDM 5165!   Wed Jun 23, 2010 4:53 am

This is my fully workingtdm.
i released this on epvp also.
but here is it here also.
goodluck

Hello, i will show you how to create a team deathmatch tournament for your 5165server (tanels).
What do you need?
-The source
-How to copy + paste Razz

Features:
[php]
-First blood (Give +5points)Razz
-4Teams (Red, Blue, Black, White)
-Random choose team
-Point system (Based on playerkills) (1Kill = 2Points)
-If teammember die, 2Points goes down
-Autostart at XX:00
-Autoend at XX:10
[/php]


First create a new class (rightclick on your solution)
Name it TDM

Now replace the entire Team DeathMatch with this:
Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using NewestCOServer.Game;

namespace NewestCOServer
{
public class TDM
{
public static bool TDMT = false;
public static bool FirstBlood = false;
public Game.Character ThChar;

private static void BbCast(string msg)
{
foreach (Character Char in World.H_Chars.Values)
{


Char.MyClient.AddSend(Packets.ChatMessage(0, "[TDM]", "All", msg, 2011,
0));
Char.MyClient.EndSend();
}
}
public static void TDMStart()
{
BbCast("Team DeathMatch have started, please sign up you have 1Minute.");
TDMT = true;
}
public static void TDMGO()
{
TDMT = false;
BbCast("KILL!!!!!!!!!!!!!.");
foreach (Character Char in World.H_Chars.Values)
{
if (Char.RedSignUp == true)
{
Char.CurHP = 1;
Char.Teleport(2022, 343, 205);
}
if (Char.BlueSignUp == true)
{
Char.CurHP = 1;
Char.Teleport(2022, 70, 193);
}
if (Char.WhiteSignUp == true)
{
Char.CurHP = 1;
Char.Teleport(2022, 188, 82);
}
if (Char.BlackSignUp == true)
{
Char.CurHP = 1;
Char.Teleport(2022, 231, 329);
}
}
}
public static void TDMEnd()
{
foreach (Character Char in World.H_Chars.Values)
{

BbCast("Team
DeathMatch have ended and all players have been teleported to Twin
City. All Players have recieved an Ugly Ducky Garment, for being in
TDM.");
if
(Char.RedSignUp == true || Char.BlueSignUp == true || Char.BlackSignUp
== true || Char.WhiteSignUp == true)
{

if
(Char.TDMP <= 10 && Char.Signed == true)//Under 10Points
{
Char.Garment = false;
FirstBlood = false;
Char.CPs += 0;
Char.Teleport(1002, 400, 400);
Char.RedSignUp = false;
Char.BlueSignUp = false;
Char.WhiteSignUp = false;
Char.BlackSignUp = false;
Char.Signed = false;
Char.TDMP = 0;
}

if
(Char.TDMP <= 25 && Char.Signed == true)//10+
{
Char.Garment = false;
FirstBlood = false;
Char.CPs += 50;
Char.Teleport(1002, 400, 400);
Char.RedSignUp = false;
Char.BlueSignUp = false;
Char.WhiteSignUp = false;
Char.BlackSignUp = false;
Char.Signed = false;
Char.TDMP = 0;
}

if
(Char.TDMP <= 50 && Char.Signed == true)//25+
{
Char.Garment = false;
FirstBlood = false;
Char.CPs += 100;
Char.Teleport(1002, 400, 400);
Char.RedSignUp = false;
Char.BlueSignUp = false;
Char.WhiteSignUp = false;
Char.BlackSignUp = false;
Char.Signed = false;
Char.TDMP = 0;
}

if
(Char.TDMP <= 100 && Char.Signed == true)//50+
{
Char.Garment = false;
FirstBlood = false;
Char.CPs += 200;
Char.Teleport(1002, 400, 400);
Char.RedSignUp = false;
Char.BlueSignUp = false;
Char.WhiteSignUp = false;
Char.BlackSignUp = false;
Char.Signed = false;
Char.TDMP = 0;
}

if
(Char.TDMP <= 200 && Char.Signed == true)//100+
{
Char.Garment = false;
FirstBlood = false;
Char.CPs += 400;
Char.Teleport(1002, 400, 400);
Char.RedSignUp = false;
Char.BlueSignUp = false;
Char.WhiteSignUp = false;
Char.BlackSignUp = false;
Char.Signed = false;
Char.TDMP = 0;
}

if
(Char.TDMP <= 250 && Char.Signed == true)//200+
{
Char.Garment = false;
FirstBlood = false;
Char.CPs += 1000;
Char.Teleport(1002, 400, 400);
Char.RedSignUp = false;
Char.BlueSignUp = false;
Char.WhiteSignUp = false;
Char.BlackSignUp = false;
Char.Signed = false;
Char.TDMP = 0;
}

if
(Char.TDMP >= 250 && Char.Signed == true)//250+
{
Char.Garment = false;
FirstBlood = false;
Char.CPs += 2500;
Char.Teleport(1002, 400, 400);
Char.RedSignUp = false;
Char.BlueSignUp = false;
Char.WhiteSignUp = false;
Char.BlackSignUp = false;
Char.Signed = false;
Char.TDMP = 0;
}
}
}
}
public static void BeginTournament()//For sending npc auto, thought is not added
{
new Thread(delegate()
{
foreach (Character Char in World.H_Chars.Values)
{
Char.MyClient.DialogNPC = 300444;


PacketHandling.NPCDialog.Handle(Char.MyClient, null, 300444, 0);
Char.MyClient.EndSend();
}
}).Start();
}
}
}


Now go to character.cs and search for: public ulong VP;
under it add
Code:

public bool RedSignUp = false;
public bool BlueSignUp = false;
public bool BlackSignUp = false;
public bool WhiteSignUp = false;
public int TDMP = 0;
public bool Signed = false;
public bool Garment = false;
public bool FirstBlood = false;


now search for: if (!World.FreePKMaps.Contains(Loc.Map))
Right under the first { paste this:
Code:



if (Attacker.Signed == true &&
TDM.FirstBlood == false && Loc.Map == 2022)
{


TDM.FirstBlood = true;


Attacker.TDMP += 5;


World.SendMsgToAll("SYSTEM", Attacker.Name
+ " FRISTBLOOD!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", 2011, 0);
}


if (Attacker.Signed == true &&
TDM.FirstBlood == true && Loc.Map == 2022)
{


Attacker.TDMP += 2;


World.SendMsgToAll("SYSTEM", Attacker.Name
+ " HAS MADE A KILL, WTF!!!!", 2011, 0);
}


Now for adding no pkpoints, search for: Attacker.Enemies.Contains(EntityID)
then replace if (Attacker.Enemies.Contains(EntityID))
with this:
Code:

if (Attacker.Enemies.Contains(EntityID) && Signed == false)

and then the else with:
Code:

else if (Signed == false)

Now in revive.cs find:
Code:

if (DateTime.Now > GC.MyChar.DeathHit.AddSeconds(20))
{
GC.MyChar.Ghost = false;
GC.MyChar.BlueName = false;
GC.MyChar.CurHP = 1;


GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);


GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
GC.MyChar.Body = GC.MyChar.Body;
GC.MyChar.Hair = GC.MyChar.Hair;
GC.MyChar.Equips.Send(GC, false);

remove GC.MyChar.Alive = true; from it
under that code paste:
Code:


if
(GC.MyChar.Loc.Map == 2022 && GC.MyChar.RedSignUp == true
&& GC.MyChar.Alive == false)
{


foreach (Character Char in World.H_Chars.Values)
{


World.SendMsgToAll("SYSTEM", GC.MyChar.Name + "
has died and all on RedTeam have lost 2TDMPoints", 2011, 0);


GC.MyChar.Teleport(2022, 343, 205);
GC.MyChar.Alive = true;
if (Char.RedSignUp == true)
{
Char.TDMP -= 2;
}
}
}

if
(GC.MyChar.Loc.Map == 2022 && GC.MyChar.BlueSignUp == true
&& GC.MyChar.Alive == false)
{


foreach (Character Char in World.H_Chars.Values)
{


World.SendMsgToAll("SYSTEM", GC.MyChar.Name + "
has died and all on BlueTeam have lost 2TDMPoints", 2011, 0);


GC.MyChar.Teleport(2022, 70, 193);
GC.MyChar.Alive = true;
if (Char.BlueSignUp == true)
{
Char.TDMP -= 2;
}
}
}

if
(GC.MyChar.Loc.Map == 2022 && GC.MyChar.BlackSignUp == true
&& GC.MyChar.Alive == false)
{


foreach (Character Char in World.H_Chars.Values)
{


World.SendMsgToAll("SYSTEM", GC.MyChar.Name + "
has died and all on BlackTeam have lost 2TDMPoints", 2011, 0);


GC.MyChar.Teleport(2022, 231, 329);
GC.MyChar.Alive = true;
if (Char.BlackSignUp == true)
{
Char.TDMP -= 2;
}
}
}

if
(GC.MyChar.Loc.Map == 2022 && GC.MyChar.WhiteSignUp == true
&& GC.MyChar.Alive == false)
{


foreach (Character Char in World.H_Chars.Values)
{


World.SendMsgToAll("SYSTEM", GC.MyChar.Name + "
has died and all on WhiteTeam have lost 2TDMPoints", 2011, 0);


GC.MyChar.Teleport(2022, 188, 82);
GC.MyChar.Alive = true;
if (Char.WhiteSignUp == true)
{
Char.TDMP -= 2;
}
}
}

now find in revive.cs also: if (GC.MyChar.Loc.Map == 1038 && Features.GuildWars.War)
Right above paste:
Code:

GC.MyChar.Alive = true;


Now open MyThread.cs and find:
Code:

interval = Interval;
T = new Thread(new ThreadStart(Run));
T.Start();


under it paste:
Code:

System.Timers.Timer ATDMTimer = new System.Timers.Timer(1000.0);
ATDMTimer.Start();
ATDMTimer.Elapsed += delegate { TDMSign(); };
System.Timers.Timer BTDMTimer = new System.Timers.Timer(1000.0);
BTDMTimer.Start();
BTDMTimer.Elapsed += delegate { TDMStart(); };
System.Timers.Timer CTDMTimer = new System.Timers.Timer(1000.0);
CTDMTimer.Start();
CTDMTimer.Elapsed += delegate { ThreeMinTDMEnd(); };
System.Timers.Timer DTDMTimer = new System.Timers.Timer(1000.0);
DTDMTimer.Start();
DTDMTimer.Elapsed += delegate { TwoMinTDMEnd(); };
System.Timers.Timer ETDMTimer = new System.Timers.Timer(1000.0);
ETDMTimer.Start();
ETDMTimer.Elapsed += delegate { OneMinTDMEnd(); };
System.Timers.Timer FTDMTimer = new System.Timers.Timer(1000.0);
FTDMTimer.Start();
FTDMTimer.Elapsed += delegate { TDMEnd(); };

Then find: bool closed = false;
under it paste:
Code:

public static bool TDMSignSend = false;
public static bool TDMStartSend = false;
public static bool TDMOneMinSend = false;
public static bool TDMTwoMinSend = false;
public static bool TDMThreeMinSend = false;
public static bool TDMEndSend = false;

now make a space
and paste this:
Code:

#region TDMTime
private static void TDMBCast(string msg)
{
foreach (Character Char in World.H_Chars.Values)
{


Char.MyClient.AddSend(Packets.ChatMessage(0, "[TDM]", "All", msg, 2011,
0));
Char.MyClient.EndSend();
}
}
public static void TDMSign()
{
if (DateTime.Now.Minute == 00 && TDMSignSend == false)
{
TDMEndSend = false;
TDMSignSend = true;
TDM.TDMStart();
}
}
public static void TDMStart()
{
if (DateTime.Now.Minute == 01 && TDMStartSend == false)
{
TDMStartSend = true;
TDM.TDMGO();
}
}
public static void ThreeMinTDMEnd()
{
if (DateTime.Now.Minute == 07 && TDMThreeMinSend == false)
{
TDMThreeMinSend = true;
TDMBCast("Team DeathMatch will end in 3Minutes.");
}
}
public static void TwoMinTDMEnd()
{
if (DateTime.Now.Minute == 08 && TDMTwoMinSend == false)
{
TDMTwoMinSend = true;
TDMBCast("Team DeathMatch will end in 2Minutes.");
}
}
public static void OneMinTDMEnd()
{
if (DateTime.Now.Minute == 09 && TDMOneMinSend == false)
{
TDMOneMinSend = true;
TDMBCast("Team DeathMatch will end in 1Minute.");
}
}
public static void TDMEnd()
{
if (DateTime.Now.Minute == 10 && TDMEndSend == false)
{
TDM.TDMEnd();
TDMSignSend = false;
TDMTwoMinSend = false;
TDMOneMinSend = false;
TDMThreeMinSend = false;
TDMStartSend = false;
TDMEndSend = true;

}
}
#endregion

now the npc for it.
in npcdialog paste:
Code:

#region TDM


case 300444:
{


if (Control == 0)
{


if
(GC.MyChar.Job == 40 || GC.MyChar.Job == 41 || GC.MyChar.Job == 42 ||
GC.MyChar.Job == 43 || GC.MyChar.Job == 44 || GC.MyChar.Job == 45 ||
GC.MyChar.Job >= 100 || GC.MyChar.Job == 50 || GC.MyChar.Job == 51
|| GC.MyChar.Job == 52 || GC.MyChar.Job == 53 || GC.MyChar.Job == 54 ||
GC.MyChar.Job == 55)


{



GC.AddSend(Packets.NPCSay("You can't sign up, if you are archer, ninja
or taoist."));


GC.AddSend(Packets.NPCLink("Okay i
see.", 255));



GC.AddSend(Packets.NPCSetFace(N.Avatar));



GC.AddSend(Packets.NPCFinish());


}


else if (TDM.TDMT == true)


{



GC.AddSend(Packets.NPCSay(("Welcome to the Team DeathMatch. Do
you want to sign up?")));



GC.AddSend(Packets.NPCLink("What is that?", 1));



GC.AddSend(Packets.NPCLink("Yes please sign me up.", 4));



GC.AddSend(Packets.NPCSetFace(N.Avatar));



GC.AddSend(Packets.NPCFinish());


}


else


{



GC.AddSend(Packets.NPCSay(("Welcome to the Team DeathMatch. There is
currently no TDM running for sign up.")));



GC.AddSend(Packets.NPCLink("What is that?", 1));



GC.AddSend(Packets.NPCLink("Damn it.", 255));



GC.AddSend(Packets.NPCSetFace(N.Avatar));



GC.AddSend(Packets.NPCFinish());


}
}


if (Control == 1)
{



GC.AddSend(Packets.NPCSay("You will be transfered in to a team (Red,
Blue, Black or White)."));


GC.AddSend(Packets.NPCLink("What points?",
2));


GC.AddSend(Packets.NPCSetFace(N.Avatar));



GC.AddSend(Packets.NPCFinish());
}


if (Control == 2)
{



GC.AddSend(Packets.NPCSay("Every kill will earn you +2Points and for
killing a captain you will gain +10Points."));



GC.AddSend(Packets.NPCSay("Your points will be exchanged to CPs, when
TDM ends.."));


GC.AddSend(Packets.NPCLink("How do i join?", 3));



GC.AddSend(Packets.NPCSetFace(N.Avatar));



GC.AddSend(Packets.NPCFinish());
}


if (Control == 3)
{



GC.AddSend(Packets.NPCSay("When the tournament is up for signing, just
talk to me and i will sign you up."));



GC.AddSend(Packets.NPCLink("Thanks", 255));



GC.AddSend(Packets.NPCSetFace(N.Avatar));



GC.AddSend(Packets.NPCFinish());
}


if (Control == 4)
{



if (GC.MyChar.Signed == false)


{



Random TDMM = new Random();



int Nr = TDMM.Next(1, 4);



if (Nr == 1)//Sign up for red team


{



if (GC.MyChar.RedSignUp == false ||
GC.MyChar.BlueSignUp == false || GC.MyChar.BlackSignUp == false ||
GC.MyChar.WhiteSignUp == false)



{



if (GC.MyChar.Signed == false)



{



Item I = GC.MyChar.Equips.Get(9);



//Item I
= new Item();



I.ID = 181625;



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);



}



if (GC.MyChar.Garment == false)



{




GC.MyChar.MyClient.AddSend(Packets.AddItem(I, 9));





[You must be registered and logged in to see this link.] celestial




GC.MyChar.RedSignUp = true;



GC.MyChar.Signed =
true;



GC.MyChar.Garment = true;




GC.AddSend(Packets.NPCSay("You have been signed up for Red Team."));




GC.AddSend(Packets.NPCLink("Okay, lets rock.", 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("Okay, lets rock.", 255));




GC.AddSend(Packets.NPCSetFace(N.Avatar));




GC.AddSend(Packets.NPCFinish());



}



}



}


}



if (Nr == 2)//Sign up for black team



{


if
(GC.MyChar.RedSignUp == false || GC.MyChar.BlueSignUp == false ||
GC.MyChar.BlackSignUp == false || GC.MyChar.WhiteSignUp == false)



{



if (GC.MyChar.Signed == false)



{



Item I =
GC.MyChar.Equips.Get(9);



//Item I = new Item();



I.ID = 181525;



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);



}



if (GC.MyChar.Garment == false)



{




GC.MyChar.MyClient.AddSend(Packets.AddItem(I, 9));





[You must be registered and logged in to see this link.] celestial




GC.MyChar.BlackSignUp = true;



GC.MyChar.Signed =
true;



GC.MyChar.Garment = true;




GC.AddSend(Packets.NPCSay("You have been signed up for Black Team."));




GC.AddSend(Packets.NPCLink("Okay, lets rock.", 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("Okay, lets rock.", 255));




GC.AddSend(Packets.NPCSetFace(N.Avatar));




GC.AddSend(Packets.NPCFinish());



}



}



}


}



if (Nr == 3)//Sign up for blue team



{


if
(GC.MyChar.RedSignUp == false || GC.MyChar.BlueSignUp == false ||
GC.MyChar.BlackSignUp == false || GC.MyChar.WhiteSignUp == false)



{



if (GC.MyChar.Signed == false)



{



//Item I = new
Item();



Item I = GC.MyChar.Equips.Get(9);



I.ID = 181825;



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);



}



if (GC.MyChar.Garment == false)



{




GC.MyChar.MyClient.AddSend(Packets.AddItem(I, 9));





[You must be registered and logged in to see this link.] celestial




GC.MyChar.BlueSignUp = true;



GC.MyChar.Signed =
true;



GC.MyChar.Garment = true;




GC.AddSend(Packets.NPCSay("You have been signed up for Blue Team."));




GC.AddSend(Packets.NPCLink("Okay, lets rock.", 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("Okay, lets rock.", 255));




GC.AddSend(Packets.NPCSetFace(N.Avatar));




GC.AddSend(Packets.NPCFinish());



}



}



}


}



if (Nr == 4)//Sign up for white team



{


if
(GC.MyChar.RedSignUp == false || GC.MyChar.BlueSignUp == false ||
GC.MyChar.BlackSignUp == false || GC.MyChar.WhiteSignUp == false)



{



if (GC.MyChar.Signed == false)



{



//Item I = new
Item();



Item I = GC.MyChar.Equips.Get(9);



I.ID = 181325;



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);



}



if (GC.MyChar.Garment == false)



{




GC.MyChar.MyClient.AddSend(Packets.AddItem(I, 9));





[You must be registered and logged in to see this link.] celestial




GC.MyChar.WhiteSignUp = true;



GC.MyChar.Signed =
true;



GC.MyChar.Garment = true;




GC.AddSend(Packets.NPCSay("You have been signed up for White Team."));




GC.AddSend(Packets.NPCLink("Okay, lets rock.", 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("Okay, lets rock.", 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("Okay, lets rock.", 255));




GC.AddSend(Packets.NPCSetFace(N.Avatar));




GC.AddSend(Packets.NPCFinish());



}



}



}


}


}
}


break;
}
#endregion
#region CantEquip and UnEquip
case 300555:
{


if (Control == 0)
{



GC.AddSend(Packets.NPCSay("LOL, so you want to cheat with gear in a
tournament, NOOB!!!"));


GC.AddSend(Packets.NPCLink("Sorry, won't
happen again.", 255));


GC.AddSend(Packets.NPCSetFace(N.Avatar));



GC.AddSend(Packets.NPCFinish());
}


break;
}
#endregion

Now you will need, so they can't switch equipments while they are signed up or are in the tournament.
Also they can't use any other items, pots, scrolls etc.
Open Equip.cs and find:
Code:

public static void HandleUnEquip(Main.GameClient GC, byte[] Data)
{

replace the whole methode with:
Code:

public static void HandleUnEquip(Main.GameClient GC, byte[] Data)
{
if (GC.MyChar.Signed == true)
{
GC.MyChar.MyClient.DialogNPC = 300001;
PacketHandling.NPCDialog.Handle(GC.MyChar.MyClient, null, 300001, 0);
GC.MyChar.MyClient.EndSend();
}
else
{
uint ItemUID = BitConverter.ToUInt32(Data, 4);

if (GC.MyChar.Inventory.Count < 40)
{
byte Slot = GC.MyChar.Equips.GetSlot(ItemUID);
if (Slot != 0)
{


GC.MyChar.Inventory.Add(GC.MyChar.Equips.Get(Slot));
GC.MyChar.EquipStats(Slot, false);
GC.MyChar.Equips.UnEquip(Slot, GC.MyChar);
Game.World.Spawn(GC.MyChar, false);
}
}
}
}

then find:
Code:

public static void HandleEquip(Main.GameClient GC, byte[] Data)
{

replace the whole methode with:
Code:

public static void HandleEquip(Main.GameClient GC, byte[] Data)
{
if (GC.MyChar.Signed == true)
{
GC.MyChar.MyClient.DialogNPC = 300001;
PacketHandling.NPCDialog.Handle(GC.MyChar.MyClient, null, 300001, 0);
GC.MyChar.MyClient.EndSend();
}
else
{
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;
}
bool Arrow = false;
if (I.ID == 1050000 || I.ID == 1050001 || I.ID == 1050002)
{ Pos = 5; Arrow = true; }
if (Arrow)
{
if (GC.MyChar.Equips.Get(4).ID == 0)
return;
else if (GC.MyChar.Equips.Get(4).ID / 10000 != 50)
return;
}
if (Pos == 0)
GC.MyChar.UseItem(I);
else
if (I.CanEquip(GC.MyChar))
{


Game.Item Current = GC.MyChar.Equips.Get(Pos);


if (Current.UID == 0 && (Pos != 4 ||
GC.MyChar.Equips.Get(5).UID == 0 || Game.ItemIDManipulation.Digit(I.ID,
1) != 5))
{
GC.MyChar.RemoveItem(I);


GC.MyChar.Equips.Replace(Pos, I, GC.MyChar);


GC.MyChar.EquipStats(Pos, true);
}


else if (Current.UID != 0 && (Pos != 4 ||
GC.MyChar.Equips.Get(5).UID == 0 || Game.ItemIDManipulation.Digit(I.ID,
1) != 5))
{


GC.MyChar.EquipStats(Pos, false);
GC.MyChar.RemoveItem(I);
GC.MyChar.AddItem(Current);


GC.MyChar.Equips.Replace(Pos, I, GC.MyChar);


GC.MyChar.EquipStats(Pos, true);
}
else if (GC.MyChar.Inventory.Count < 40)
{


if (GC.MyChar.Equips.Get(4).UID != 0)
{


GC.MyChar.EquipStats(4, false);


GC.MyChar.RemoveItem(I);



GC.MyChar.AddItem(GC.MyChar.Equips.Get(4));


GC.MyChar.Equips.Replace(4, I, GC.MyChar);


GC.MyChar.EquipStats(4, true);
}


GC.MyChar.EquipStats(5, false);


GC.MyChar.Inventory.Add(GC.MyChar.Equips.Get(5));


GC.MyChar.Equips.UnEquip(5, GC.MyChar);
}
Game.World.Spawn(GC.MyChar, false);
}
}
}

now open your DB and find your npc table.
in the buttom paste:
Code:

300444 6520 2 63 1002 429 388
300555 6520 2 63 5000 90 90


Now you have a team deathmatch Smile
Congratulations.

This tdm, works perfect & is not buggy etc.
if you still find a bug, notice me.
and yes i know it could be done better, but this is diffently better, then the other tdm script Smile
if you got problems at setting it up, then make a reply or pm me Smile
Thats all, if you find it useful, then you can thank me, i would appriciate that.
Thanks Smile

_________________
Did i help you?-Press mine + at the right corner up and i will press your + !
Back to top Go down
http://super-botters.forumotion.com
ZoomLander
Global Mod
Global Mod
avatar

Posts : 185
Points : 628
Received Thanks : 110
Join date : 2010-06-23
Location : Super Botters Forum

PostSubject: Re: [Release]TDM 5165!   Thu Jun 24, 2010 7:13 am

i love this...TDM rocks
Back to top Go down
http://super-botters.forumotion.com/
kardasman
Newbie
Newbie
avatar

Posts : 1
Points : 1
Received Thanks : 0
Join date : 2010-11-04

PostSubject: Re: [Release]TDM 5165!   Thu Nov 04, 2010 3:42 pm

well to ask u i made it all things and dont work pls help me...
Back to top Go down
Sponsored content




PostSubject: Re: [Release]TDM 5165!   

Back to top Go down
 
[Release]TDM 5165!
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Rumored Release schedule for 2010 40k/WFB
» new videogame release u look forward to
» Cataclysme possible release date?
» Why do games always release on Tuesdays?
» New gw book release :P

Permissions in this forum:You cannot reply to topics in this forum
Super Botters :: Conquer Online :: CO2 Pserver Guides Releases-
Jump to: