Not a member yet? Register for your free account!


Go Back   elitepvpers > Conquer Online 2 > CO2 PServer - Discussions / Questions > CO2 PServer Guides & Releases
You last visited: Today at 03:12

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

 

[Guide]Remove GM protction-send blackname to jail

This is a discussion on [Guide]Remove GM protction-send blackname to jail within the CO2 PServer Guides & Releases forum part of the CO2 PServer - Discussions / Questions category; # Update 1 Fix dieing into jail again - add message has killed by xx #Update 2 1-Add NPC To ...

Reply
 
Thread Tools
Old 09-07-2008, 16:02   #1
Senior Member
 
Join Date: Oct 2007
Posts: 120
Received Thanks: 24
[Guide]Remove GM protction-send blackname to jail


# Update 1
Fix dieing into jail again - add message has killed by xx

#Update 2
1-Add NPC To jail to let u out for 4kk or 54 Cps
2- Change points from 99 to 29(you must change code again)


hi
it is first help i make here
plz don't flam , i just send for some newbies that don't know(I'm also noob lol)
and I'm don't take from any one i just make it
and Hint for all beginners don't aim to publish source on line quickly ,but try to learn C# and practice for make any thing yourself
it works for me at shadow server
lets go

First : How to remove GM protection on guards :

Go to "entities.cs" go to line 334
u should find some thing like that :
Quote:
if (MType == 1)
if (Target != null)
if (Target.MyClient.Status == 15)
Target = null;
u may delete it or put protection on type u want
(i just know Status ==8 >> GM / 7 >>>PM )
sorry i'm just starter ,so if u have some thing best tell here for all

Second : How to Make Black Name Send to jail on (Now Working on die so u can't revive him with skill or command):

1-go to "character.cs" go to Line 827 or Search for
Quote:
public void Die()
{
try
{

DeathSent = true;
World.UpdateSpawn(this);


int EModel;
if (Model == 1003 || Model == 1004)
EModel = 15099;
else
EModel = 15199;

XpList = false;
SMOn = false;
CycloneOn = false;
XpCircle = 0;

MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
MyClient.SendPacket(General.MyPackets.Status1(UID, EModel));
MyClient.SendPacket(General.MyPackets.Death(this)) ;

}
}
add
Quote:
if (PKPoints >29)
{
World.SendMsgToAll("Player "+Name+" has Killed Too Much And has been but into Jail at Last ", " Kfa2a[GM]", 2011);
Teleport(6000 ,60 ,60);

}
2-go to "Character.cs" go to Line 795 (Press Ctrl+G):
or search for
[quote]if (Tele)
{
foreach (ushort[] revp in DataBase.RevPoints)
{[QUOTE]
after " { "

and before
Quote:
if (revp[0] == LocMap)
{
Teleport(revp[1], revp[2], revp[3]);
break;
}
add
Quote:
if(PKPoints>29)
{
Teleport(6000,60,60);
}
**Adding Jail NPC

go to ur
then go to conquer database >> Table >> Npc
Click Insert and fill fields as follow :
Quote:
UID 1250
Type 1160
Name JailWarden (or name u want but must not have space just one word)
Flags 2
Direction 2
X 60
Y 60
Map 1002
Sobtype 0
then go to Your Source >>> Client.Cs
Go to NPC Section>>
and Search for
Quote:
if (CurrentNPC == 211)
{
SendPacket(General.MyPackets.NPCSay("Do you want to leave the market? I can teleport you for free."));
SendPacket(General.MyPackets.NPCLink("Yeah. Thanks.", 1));
SendPacket(General.MyPackets.NPCLink("No, I shall stay here.", 2));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
after it add this :

Quote:
if (CurrentNPC == 1250)
{
SendPacket(General.MyPackets.NPCSay("Hello,I'm Jail Telporter"));
SendPacket(General.MyPackets.NPCSay("i can telport u ,what u want"));
SendPacket(General.MyPackets.NPCLink("Iwant to go out.", 1));
SendPacket(General.MyPackets.NPCLink("Just passing by.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
then search for
Quote:
if (CurrentNPC == 211 || CurrentNPC == 180)
{
if (Control == 1)
{
ushort XTo = 429;
ushort YTo = 378;

if (MyChar.PrevMap == 1015)
{
XTo = 717;
YTo = 571;
}
if (MyChar.PrevMap == 1000)
{
XTo = 500;
YTo = 650;
}
if (MyChar.PrevMap == 1011)
{
XTo = 188;
YTo = 264;
}
if (MyChar.PrevMap == 1020)
{
XTo = 565;
YTo = 562;
}

MyChar.Teleport(MyChar.PrevMap, XTo, YTo);
}
}
After it add

Quote:
if (CurrentNPC == 1250)
{
if(Control == 1)
{
SendPacket(General.MyPackets.NPCSay("if You Want to Go out,you must be not red name or Black name."));
SendPacket(General.MyPackets.NPCSay("if You Want to Gou out,you must have PK point Less than 30."));
SendPacket(General.MyPackets.NPCLink("Let me out.", 11));
SendPacket(General.MyPackets.NPCLink("What about me??.", 22));
SendPacket(General.MyPackets.NPCLink("just Passing by.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());

}
if (Control == 11)
{
if (MyChar.PKPoints<30)
{
MyChar.Teleport(1002,350,320);
}
else
{
SendPacket(General.MyPackets.NPCSay("Sorry,Your Pk points is more 29 u can't out yet."));
SendPacket(General.MyPackets.NPCLink("How I can get out.", 22));
SendPacket(General.MyPackets.NPCLink("Damn.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());

}

}
if (Control == 22)
{
if (MyChar.PKPoints < 30)
{
SendPacket(General.MyPackets.NPCSay("You are free now ,i will telport you."));
SendPacket(General.MyPackets.NPCLink("Thank you.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
MyChar.Teleport(1002, 429, 378);
}
else if (MyChar.PKPoints > 29 && MyChar.PKPoints < 99)
{
SendPacket(General.MyPackets.NPCSay("Sorry,You are Red name, you can't out until Your pk points Less than 29."));
SendPacket(General.MyPackets.NPCSay("or You Can Pay 4,000,000 Cash,it will award to your Killer."));
SendPacket(General.MyPackets.NPCLink("Ok, i will pay.", 40));
SendPacket(General.MyPackets.NPCLink("Damn.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());

}
else if (MyChar.PKPoints > 100)
{
SendPacket(General.MyPackets.NPCSay("Sorry,You are Black name, you can't out until Your pk points Less than 29."));
SendPacket(General.MyPackets.NPCSay("or You Can Pay 54 Cps Cash,it will award to your Killer."));
SendPacket(General.MyPackets.NPCLink("Ok, i will pay.", 54));
SendPacket(General.MyPackets.NPCLink("Damn.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());

}
}
if (Control == 40)
{
MyChar.Teleport(1002, 427, 378);
MyChar.Silvers -= 4000000;
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));

if (MyChar.Silvers > 3999999)
{
MyChar.Silvers -= 4000000;
MyChar.Teleport(1002, 427, 378);
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
MyChar.Teleport(1002, 350, 320);
World.SendMsgToAll("The Killer " + MyChar.Name + "has pay for his crimes and donate 4,000,000", " Kfa2a[GM]", 2011);
SendPacket(General.MyPackets.NPCSay("i will take 4,000,000 and teleport you."));
SendPacket(General.MyPackets.NPCSay("the money will go to Your Killer."));
SendPacket(General.MyPackets.NPCLink("Thank you.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());


}
else
{
SendPacket(General.MyPackets.NPCSay("Sorry You don't have Enought Silvers"));
SendPacket(General.MyPackets.NPCLink("damn.",255)) ;
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 54)
{
if (MyChar.CPs>53)
{
MyChar.Teleport(1002, 427, 378);
MyChar.CPs -= 54;
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
World.SendMsgToAll("The Killer \"" + MyChar.Name + "has payfor his crimes and donate 54 Cps", " Kfa2a[GM]", 2011);

SendPacket(General.MyPackets.NPCSay("i will take 54 cps and teleport you."));
SendPacket(General.MyPackets.NPCSay("the money will go to Your Killer."));
SendPacket(General.MyPackets.NPCLink("Thank you.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());

}
else
{
SendPacket(General.MyPackets.NPCSay("Sorry You don't have Enought Cps"));
SendPacket(General.MyPackets.NPCLink("damn.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}


}
Wait for update to make money go to killer


Now To Prevent using city Scrolls to use in Jail (ty For @tao4229 for remind me) :
go to Character.cs and search for (Near Line 2808)

Quote:
else if (ItemParts[0] == "1060020")
{
Teleport(1002, 429, 378);
RemoveItem(ItemUID);
}
else if (ItemParts[0] == "1060021")
{
Teleport(1000, 500, 650);
RemoveItem(ItemUID);
}
else if (ItemParts[0] == "1060022")
{
Teleport(1020, 565, 562);
RemoveItem(ItemUID);
}
else if (ItemParts[0] == "1060023")
{
Teleport(1011, 188, 264);
RemoveItem(ItemUID);
}
else if (ItemParts[0] == "1060024")
{
Teleport(1015, 717, 571);
RemoveItem(ItemUID);
}
and exchange with this Code (Make Backup for character.Cs be4 changing it) :

Quote:
else if (ItemParts[0] == "1060020")
{
if(LocMap == 6000 && PKPoints > 29)
return;
Teleport(1002, 429, 378);
RemoveItem(ItemUID);
}
else if (ItemParts[0] == "1060021")
{
if(LocMap == 6000 && PKPoints > 29)
return;
Teleport(1000, 500, 650);
RemoveItem(ItemUID);
}
else if (ItemParts[0] == "1060022")
{
if(LocMap == 6000 && PKPoints > 29)
return;
Teleport(1020, 565, 562);
RemoveItem(ItemUID);
}
else if (ItemParts[0] == "1060023")
{
if(LocMap == 6000 && PKPoints > 29)
return;
Teleport(1011, 188, 264);
RemoveItem(ItemUID);
}
else if (ItemParts[0] == "1060024")
{
if(LocMap == 6000 && PKPoints > 29)
return;
Teleport(1015, 717, 571);
RemoveItem(ItemUID);
}
and now if u want also prevent using "/Scroll " command into jail
go To Client.Cs and Search for
Quote:
if (Splitter[0] == "/scroll")
{
if (Splitter[1] == "pc")
MyChar.Teleport(1011, 188, 264);
if (Splitter[1] == "dc")
MyChar.Teleport(1000, 500, 650);
if (Splitter[1] == "bi")
MyChar.Teleport(1015, 723, 573);
if (Splitter[1] == "ac")
MyChar.Teleport(1020, 565, 562);
if (Splitter[1] == "mk")
MyChar.Teleport(1036, 198, 194);
if (Splitter[1] == "tc")
MyChar.Teleport(1002, 429, 378);
if (Splitter[1] == "jail")
MyChar.Teleport(6000, 50, 50);
if (Splitter[1] == "boss")
MyChar.Teleport(1076, 360, 020);
}
and exchange with :
Quote:
if (Splitter[0] == "/scroll")
{

if (Splitter[1] == "tc")
{

if(MyChar.LocMap == 6000 &&MyChar.PKPoints < 29 || MyChar.LocMap != 6000)
{
MyChar.Teleport(1002, 429, 378);
}
if(MyChar.LocMap == 6000&&MyChar.PKPoints > 29)
{
MyChar.MyClient.SendPacket(General.MyPackets.SendM sg(MyChar.MyClient.MessageId, "SYSTEM", MyChar.MyClient.MyChar.Name , "You can't use /scroll Command here untill your Pk points less than 99 " , 2005));
}
}
if (Splitter[1] == "mk")
{

if(MyChar.LocMap == 6000 &&MyChar.PKPoints < 29 || MyChar.LocMap != 6000)
{
MyChar.Teleport(1036, 198, 194);
}
if(MyChar.LocMap == 6000&&MyChar.PKPoints > 29)
{
MyChar.MyClient.SendPacket(General.MyPackets.SendM sg(MyChar.MyClient.MessageId, "SYSTEM", MyChar.MyClient.MyChar.Name , "You can't use /scroll Command here untill your Pk points less than 29 " , 2005));
}
}



if (Splitter[1] == "dc")
{
if(MyChar.LocMap == 6000 && MyChar.PKPoints < 29 || MyChar.LocMap != 6000)
{
MyChar.Teleport(1000, 500, 650);

}

if(MyChar.LocMap == 6000&&MyChar.PKPoints > 29)
{
MyChar.MyClient.SendPacket(General.MyPackets.SendM sg(MyChar.MyClient.MessageId, "SYSTEM", MyChar.MyClient.MyChar.Name , "You can't use /scrolls Command here untill your Pk points less than 29 " , 2005));
}

}
if (Splitter[1] == "ac")
{
if(MyChar.LocMap == 6000 && MyChar.PKPoints < 29 || MyChar.LocMap != 6000)
{
MyChar.Teleport(1020, 565, 562);

}

if(MyChar.LocMap == 6000&&MyChar.PKPoints > 29)
{
MyChar.MyClient.SendPacket(General.MyPackets.SendM sg(MyChar.MyClient.MessageId, "SYSTEM", MyChar.MyClient.MyChar.Name , "You can't use /scrolls Command here untill your Pk points less than 29 " , 2005));
}

}
if (Splitter[1] == "pc")
{
if(MyChar.LocMap == 6000 && MyChar.PKPoints < 29 || MyChar.LocMap != 6000)
{
MyChar.Teleport(1011, 188, 264);

}

if(MyChar.LocMap == 6000&&MyChar.PKPoints > 29)
{
MyChar.MyClient.SendPacket(General.MyPackets.SendM sg(MyChar.MyClient.MessageId, "SYSTEM", MyChar.MyClient.MyChar.Name , "You can't use /scrolls Command here untill your Pk points less than 29 " , 2005));
}

}
if (Splitter[1] == "bi")
{
if(MyChar.LocMap == 6000 && MyChar.PKPoints < 29 || MyChar.LocMap != 6000)
{
MyChar.Teleport(1015, 717, 571);

}

if(MyChar.LocMap == 6000&&MyChar.PKPoints > 29)
{
MyChar.MyClient.SendPacket(General.MyPackets.SendM sg(MyChar.MyClient.MessageId, "SYSTEM", MyChar.MyClient.MyChar.Name , "You can't use /scrolls Command here untill your Pk points less than 29 " , 2005));
}

}
}
sorry I'm just starter ,so if u have some thing best tell here for all
i hope it work for all ,and i will give more soon as i make new
press thanks if u see it is good

__________________


Last edited by elragal_30; 09-18-2008 at 20:15. Reason: fix die in jail agian&& ADD NPC Jail
elragal_30 is offline  
Thanks
14 Users
Beta Limit (12-13-2008), Bottingpunk (09-07-2008), Calabaza1 (10-19-2008), Danutzhaha (11-19-2008), Eternal46 (10-30-2008), imported_spitt_fire911 (11-21-2008), Kratos59 (04-19-2009), Mouse>Pro (09-09-2008), plasma-hand (09-07-2008), pytong (12-06-2008), QQpenguin (10-27-2011), TheMasterPiece (09-26-2008), unluckyunknown45654554 (05-03-2009), XxArcherMasterxX (10-22-2008)
Old 09-07-2008, 18:41   #2
Banned
 
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 153
TBH, I got like the latest version of LOTF out there, so the jail thing was already in mine, but if you do it this way, you can scroll out of jail... so... You may want to look in the scroll Item usage and add some if statements =]
tao4229 is offline  
Old 09-07-2008, 19:07   #3
Senior Member
 
Join Date: Jun 2005
Posts: 659
Received Thanks: 285
What about protection against XP Revive and Pray - reviving the dead blackname, thus not using revive points..?
nTL3fTy is online now  
Old 09-07-2008, 19:42   #4
Senior Member
 
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
[quote=elragal_30;1416754]hi
it is first help i make here
plz don't flam , i just send for some newbies that don't know(I'm also noob lol)
and I'm don't take from any one i just make it
and Hint for all beginners don't aim to publish source on line quickly ,but try to learn C# and practice for make any thing yourself
it works for me at shadow server
lets go

First : How to remove GM protection on guards :

Go to "entities.cs" go to line 334
u should find some thing like that :

u may delete it or put protection on type u want
(i just know Status ==8 >> GM / 7 >>>PM )
sorry i'm just starter ,so if u have some thing best tell here for all

Second : How to Make Blue Name Send to jail on (revive not on die):

go to "Character.cs" go to Line 795 (Press Ctrl+G):
or search for
[QUOTE]if (Tele)
{
foreach (ushort[] revp in DataBase.RevPoints)
{
Quote:
after " { "

and before
add

sorry I'm just starter ,so if u have some thing best tell here for all
i hope it work for all ,and i will give more soon as i make new
press thanks if u see it is good
Just make the Jail System when you Die, Very easy to code, ...
YukiXian is offline  
Old 09-07-2008, 22:06   #5
Senior Member
 
Join Date: Oct 2007
Posts: 120
Received Thanks: 24
@nTL3fTy
u mean u want black name don't revive
idk because i don't have revive work on my source yet
but i think that solve that u but this on Die Void not at Revive , i'll try when i get Revive Skill work
##EDIT##Fixed now when u die u sent to jail immediately and when revive also sent to jail
so u'll not be able to revive him
@YukiXian
yes i will be already more useful ,but i can't code it yet ,if u know post it
##Edit##i aready Fix it Now and update Topic

Last edited by elragal_30; 09-07-2008 at 22:35. Reason: #Update topic Fix it work on die now
elragal_30 is offline  
Old 09-07-2008, 23:55   #6
Senior Member
 
Join Date: Jun 2005
Posts: 659
Received Thanks: 285
Quote:
Originally Posted by elragal_30 View Post
sorry I'm just starter ,so if u have some thing best tell here for all
i hope it work for all ,and i will give more soon as i make new
press thanks if u see it is good
For checking if the character is in jail with more than 99 PK Points:
Code:
                if (LocMap == 6000 && PKPoints > 99)
                    return;
That goes before anything happens of course:
Code:
            else if (ItemParts[0] == "1060020")
            {
                if (LocMap == 6000 && PKPoints > 99)
                    return;
                Teleport(1002, 429, 378);
                RemoveItem(ItemUID);
            }
nTL3fTy is online now  
Thanks
2 Users
elragal_30 (09-08-2008), QQpenguin (10-27-2011)
Old 09-08-2008, 03:20   #7
Senior Member
 
Join Date: Oct 2007
Posts: 120
Received Thanks: 24
Quote:
Originally Posted by nTL3fTy View Post
For checking if the character is in jail with more than 99 PK Points:
Code:
                if (LocMap == 6000 && PKPoints > 99)
                    return;
That goes before anything happens of course:
Code:
            else if (ItemParts[0] == "1060020")
            {
                if (LocMap == 6000 && PKPoints > 99)
                    return;
                Teleport(1002, 429, 378);
                RemoveItem(ItemUID);
            }
mm yes
it is more better i think it save memory
r u good at c# coding ??
can u help me in some things ???
elragal_30 is offline  
Old 09-08-2008, 03:38   #8
Conqueman
 
Join Date: Mar 2008
Posts: 62
Received Thanks: 6
the players leaves the NPC how i fix it?...
if (CurrentNPC == 104801)
{

if (Control == 1)
{
if (MyChar.LocMap == 6000 && MyChar.PKPoints > 99)
{
MyChar.Teleport(1002, 514, 355);
}
}
}
and, the players die in jail when they are taken again get jail ..
pegaeu is offline  
Thanks
1 User
culo01 (11-30-2008)
Old 09-08-2008, 04:32   #9
Senior Member
 
Join Date: Oct 2007
Posts: 120
Received Thanks: 24
Quote:
Originally Posted by pegaeu View Post
the players leaves the NPC how i fix it?...
if (CurrentNPC == 104801)
{

if (Control == 1)
{
if (MyChar.LocMap == 6000 && MyChar.PKPoints > 99)
{
MyChar.Teleport(1002, 514, 355);
}
}
}
and, the players die in jail when they are taken again get jail ..
sorry idk what u mean ??
u want make Jail Npc let pepople to leave jail when the lost them pk points ??
and what u mean by
Quote:
and, the players die in jail when they are taken again get jail
elragal_30 is offline  
Old 09-08-2008, 04:57   #10
Conqueman
 
Join Date: Mar 2008
Posts: 62
Received Thanks: 6
1 Yes, the players leaving the jail blackname
2 when a player die inside the jail he sends dagain to prison*
pegaeu is offline  
Reply

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to ban/send to bot jail with gm commands Sohaib[GM] CO2 PServer - Discussions / Questions 4 07-13-2010 18:40
Question on blackname and jail WHITELIONX CO2 PServer - Discussions / Questions 9 12-14-2009 21:10
[HELP]PK Points in jail and arena remove? How? Fish* CO2 PServer - Discussions / Questions 7 10-18-2009 07:08
Guide to help [New Server Owners] fix bot jail! mama020153 Zero 3 08-22-2009 08:47
[Help]Send To Jail On Death DragonStar CO2 PServer - Discussions / Questions 7 09-07-2008 22:11



All times are GMT +2. The time now is 03:12.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.