Okay, this is my first release for a LOTF PK event, so i hope you enjoy it! Any questions reply here or message me on msn at . Also Credits to EmmeTheCoder for his Start/stop npc codes used for this.
Remember to hit Thanks!
First:
Go to General.cs and add this somewhere:
Code:
public static bool PKEvent = false;
Second:
Go to Character.cs and search for:
Code:
public void TimerElapsed(object source, ElapsedEventArgs e)
{
Right below that {, add:
Code:
foreach (DictionaryEntry DE in World.AllChars)
{
Character Charr = (Character)DE.Value;
if (Charr.LocMap == 1082)
{
if (DateTime.Now > Charr.Death.AddSeconds(2))
{
if (!Charr.Alive)
{
Charr.Revive(true);
World.SpawnMeToOthers(Charr, true);
World.SpawnOthersToMe(Charr, true);
World.UpdateSpawn(Charr);
Charr.Teleport(1002, 438, 377);
Charr.MyClient.SendPacket(General.MyPackets.Vital( UID, 26, Charr.GetStat()));
Charr.MyClient.SendPacket(General.MyPackets.SendMsg(Charr.MyClient.MessageId, "Eliminator", Charr.Name, "You Were Eliminated!", 2011));
System.Threading.Thread.Sleep(100);
}
}
}
}
Third:
In client.cs find the commands all players can use: (usually /save or /coords)
and add this above one of them:
Code:
if (Message == "/joinpk")//coded by RapidBlade
{
if (General.PKEvent == true)
{
MyChar.Teleport(1082, 224, 224);
}
else
{
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "The PK Event has started is already over, you cannot use the command anymore!", 2005));
}
}
Fourth:
Add the command to start and end it:
Code:
if (Splitter[0] == "/announcepk")//Coded by RapidBlade
{
World.SendMsgToAll("PK Event is about to start! Type /joinpk to join!", "[SYSTEM]", 2011);
General.PKEvent = true;
}
if (Splitter[0] == "/joinpkend")//Coded by RapidBlade
{
World.SendMsgToAll("You are too late! You cannot join the PK Event anymore!", "[SYSTEM]", 2011);
General.PKEvent = false;
}
Fifth:
Add the NPC to leave the area:
Code:
if (CurrentNPC == 61)//PK Event Exiter:By RapidBlade
{
SendPacket(General.MyPackets.NPCSay("Hi there! Would you like to leave the PK Event area?"));
SendPacket(General.MyPackets.NPCLink("Hell Yeah, getting owned is tiring!", 1));
SendPacket(General.MyPackets.NPCLink("Just passing by.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
Sixth:
The prize NPC- Credits to Emme for making the start and stop npc codes.
Search in General.cs:
Code:
public static System.Timers.Timer Thetimer;
and UNDER that add:
Code:
public static bool CanTalkToNPC = false;//credits to Emme
Add the commands (client.cs):
Code:
if (Splitter[0] == "/stopnpc")
if (!General.CanTalkToNPC)
{
string K = "Disabled!";
General.CanTalkToNPC = true;
{
World.SendMsgToAll("The Prize Npc For Find/PK Event Has Been Disabled." + K, "NPCHandeler", 2005);
}
}
if (Splitter[0] == "/startnpc")//credits to EmmeTheCoder
{
string K = "Activated!";
if (General.CanTalkToNPC)
{
K = "Activated!";
General.CanTalkToNPC = false;
}
World.SendMsgToAll("The Prize Npc For Find/PK Event Has Been Activated." + K, "NPCHandeler", 2005);
}
And Next add the NPC:
Code:
if (CurrentNPC == 63)
{
if (!General.CanTalkToNPC)
{
SendPacket(General.MyPackets.NPCSay("Hello PK Master! You win 2 DragonBalls for dominating the tournament!"));
SendPacket(General.MyPackets.NPCLink("Awesome! Give Me My Prize!", 1));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("The prize has been taken."));
SendPacket(General.MyPackets.NPCLink("Okay.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
and the control part-
Code:
if (CurrentNPC == 63)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("Here is your Prize."));
SendPacket(General.MyPackets.NPCLink("Thank You.", 5));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 5)
{
MyChar.AddItem("720028-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));//ConquestArmor
MyChar.AddItem("720028-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));//ConquestArmor
}
}
How to use these things:
Type /announcepk to start the tourny, and it also activates the /joinpk command for normal players. after like 2-3 mins use /joinpkend so after someone dies they can't come bak. use /stopnpc BEFORE the tourny so no prize can randomly b claimed.
I believe thats it, if i left out something post her and ill add it. And please no Flaming, this is only my first release as a noob coder lol.
Okay, this is my first release for a LOTF PK event, so i hope you enjoy it! Any questions reply here. Also Credits to EmmeTheCoder for his Start/stop npc codes used for this.
Remember to hit Thanks!
First:
Go to General.cs and add this somewhere:
Code:
public static bool PKEvent = false;
Second:
Go to Character.cs and search for:
Code:
public void TimerElapsed(object source, ElapsedEventArgs e)
{
Right below that {, add:
Code:
foreach (DictionaryEntry DE in World.AllChars)
{
Character Charr = (Character)DE.Value;
if (Charr.LocMap == 1082)
{
if (DateTime.Now > Charr.Death.AddSeconds(2))
{
if (!Charr.Alive)
{
Charr.Revive(true);
World.SpawnMeToOthers(Charr, true);
World.SpawnOthersToMe(Charr, true);
World.UpdateSpawn(Charr);
Charr.Teleport(1002, 438, 377);
Charr.MyClient.SendPacket(General.MyPackets.Vital( UID, 26, Charr.GetStat()));
Charr.MyClient.SendPacket(General.MyPackets.SendMsg(Charr.MyClient.MessageId, "Eliminator", Charr.Name, "You Were Eliminated!", 2011));
System.Threading.Thread.Sleep(100);
}
}
}
}
Third:
In client.cs find the commands all players can use: (usually /save or /coords)
and add this above one of them:
Code:
if (Message == "/joinpk")//coded by RapidBlade
{
if (General.PKEvent == true)
{
MyChar.Teleport(1082, 224, 224);
}
else
{
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "The PK Event has started is already over, you cannot use the command anymore!", 2005));
}
}
Fourth:
Add the command to start and end it:
Code:
if (Splitter[0] == "/announcepk")//Coded by RapidBlade
{
World.SendMsgToAll("PK Event is about to start! Type /joinpk to join!", "[SYSTEM]", 2011);
General.PKEvent = true;
}
if (Splitter[0] == "/joinpkend")//Coded by RapidBlade
{
World.SendMsgToAll("You are too late! You cannot join the PK Event anymore!", "[SYSTEM]", 2011);
General.PKEvent = false;
}
Fifth:
Add the NPC to leave the area:
Code:
if (CurrentNPC == 61)//PK Event Exiter:By RapidBlade
{
SendPacket(General.MyPackets.NPCSay("Hi there! Would you like to leave the PK Event area?"));
SendPacket(General.MyPackets.NPCLink("Hell Yeah, getting owned is tiring!", 1));
SendPacket(General.MyPackets.NPCLink("Just passing by.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
Sixth:
The prize NPC- Credits to Emme for making the start and stop npc codes.
Search in General.cs:
Code:
public static System.Timers.Timer Thetimer;
and UNDER that add:
Code:
public static bool CanTalkToNPC = false;//credits to Emme
Add the commands (client.cs):
Code:
if (Splitter[0] == "/stopnpc")
if (!General.CanTalkToNPC)
{
string K = "Disabled!";
General.CanTalkToNPC = true;
{
World.SendMsgToAll("The Prize Npc For Find/PK Event Has Been Disabled." + K, "NPCHandeler", 2005);
}
}
if (Splitter[0] == "/startnpc")//credits to EmmeTheCoder
{
string K = "Activated!";
if (General.CanTalkToNPC)
{
K = "Activated!";
General.CanTalkToNPC = false;
}
World.SendMsgToAll("The Prize Npc For Find/PK Event Has Been Activated." + K, "NPCHandeler", 2005);
}
And Next add the NPC:
Code:
if (CurrentNPC == 63)
{
if (!General.CanTalkToNPC)
{
SendPacket(General.MyPackets.NPCSay("Hello PK Master! You win 2 DragonBalls for dominating the tournament!"));
SendPacket(General.MyPackets.NPCLink("Awesome! Give Me My Prize!", 1));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("The prize has been taken."));
SendPacket(General.MyPackets.NPCLink("Okay.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
and the control part-
Code:
if (CurrentNPC == 63)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("Here is your Prize."));
SendPacket(General.MyPackets.NPCLink("Thank You.", 5));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 5)
{
MyChar.AddItem("720028-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));//ConquestArmor
MyChar.AddItem("720028-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));//ConquestArmor
}
}
I believe thats it, if i left out something post her and ill add it. You have to make sure you type /joinpkend when every1 who wants to enter is there or else they can keep coming back to the tourny. When they die they rev in TC. Also remember to hit /stopnpc before starting the event to make sure the prize npc is turned off. And please no Flaming, this is only my first release as a noob coder lol.
I haven't been able to figure out the flags for capture the flag yet, sorry. If i find it out i probably won't release it anyway tho, gotta keep some stuff for myself =)
Vortex nice Sig lol, and I released it cause i'm starting trying to make a better version of this event, so this one was just a basic so people who want a PK event could have a fully working one.
[Release] Daily Event 10/24/2012 - EO PServer Guides & Releases - 46 Replies Today i want to release my daily event.Hope u guys like it .. any problem.. just ask ;)
Event Style
Daily event for 1 hour
Event map are non-pk , non revive
Auto boot player out from map after 1 hour
Screenshot
[Release] Flame Lit Event 03/30/2010 - CO2 PServer Guides & Releases - 23 Replies hello ppl iam go post the quest Flame Lit Event for source 5165 loft... is quest GW the reward is expballexp
this is my simple code any ppl can do this code :)
lets start...
First you need put this two npc's in npcdialog.cs
Flame Toist
[RELEASE] NPC PK-Event Daily 01/28/2010 - CO2 PServer Guides & Releases - 20 Replies Updated! Number2 NPC Bins
Released Not Tested Finished
Credits to My Self and Understanding my Mistake with help of friends. lol!
#NPC-Text
REPLACE cq_action VALUES (661777,661771,0000,101,0, 'Hello~%user_name,~this~is~the~Daily~Tournament~Fo r~FireTao.~Would~you~care~to~Enter?!.');
REPLACE cq_action VALUES (661771,661772,0000,102,0,"Yes,~Please~let~me ~Enter. 661773");
REPLACE cq_action VALUES (661772,15003,0000,102,0,"Just~passing~by. 0");
REPLACE cq_action VALUES...
[Release] How to make your own PK event 10/12/2009 - CO2 PServer Guides & Releases - 32 Replies Sup sup. Sherwin was intrested of how this would look like, so yeah here it is, worked on it for about 3 minutes.. So, all it does it check if the day is thursday and if the time is 11.55. If it is, it will announce that the PK event is on, and everyone can use the /join command to get teleported to the PK Event map ( PK Arena, MapID 1005 ).
After 12.00 the PKEvent is over and you cannot join anymore. Its not fully done yet ( rewards and such ) , you'll have to do that. Anyways here you go,...
[Release]Updated PK Event 07/30/2009 - CO2 PServer Guides & Releases - 18 Replies Hey guys, a long time ago i released a very basic pk event, now ima release a much better one.this is for a LOTF SOURCE ONLY!!!
Put this in WORLD.CS definitions (some of them mite b there already, just make sure you only have one definition of it.)
public static bool CanEnterPK = true;
public static bool StartPK = true;
public static bool PKTournament = false;
public static ushort PKCity = 0;
public static ushort PKX = 0;