|
You last visited: Today at 14:42
Advertisement
[Release] Simple CPAdmin NPC
Discussion on [Release] Simple CPAdmin NPC within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
05/28/2009, 08:43
|
#1
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
[Release] Simple CPAdmin NPC
Hi Guys those who are too lazy to edit CPAdmin NPC here u are a simple CPAdmin NPC using money to exchange for CPs
go to Handler.cs then click on NPCTalk.cs
HTML Code:
case 2071://CPAdmin Guy
{
if (LinkBack == 0)
{
Text("Would like to exchange for Cps with ur money? It will only cost u 50k for 5k Cps.", CSocket);
Link("Well yea I want it.", 1, CSocket);
Link("Nah No thanks!!", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.Money >= 50000)
{
Money(-50000, CSocket);
CPs (+5000, CSocket);
}
else
{
Text("How dare you try to rip me off! Get lost, Or get my money!", CSocket);
Link("I'm sorry, I didn't realize.", 255, CSocket);
End(CSocket);
}
}
break;
}
I guess these will help you all and comment pls reply me. Thanks Guys for those who are helping me out.
|
|
|
05/28/2009, 12:44
|
#2
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
|
this is the cp admin guy cp admin guy gives cps for dbs not money for cps
|
|
|
05/28/2009, 14:22
|
#3
|
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
|
This sucks, no offense.
|
|
|
05/28/2009, 15:06
|
#4
|
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
|
How can you say "no offence" if you're saying it sucks? I don't see the point posting that last part. Only thing you could really correct is the grammar.
|
|
|
05/28/2009, 15:30
|
#5
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
lol Its ok watever u wanna to say but I did say in the first place right
Hi Guys those who are too lazy to edit CPAdmin NPC here u are a simple CPAdmin NPC using money to exchange for CPs
Thats wat i say in the begining b4 i post
|
|
|
05/28/2009, 17:36
|
#6
|
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
|
Quote:
Originally Posted by tanelipe
How can you say "no offence" if you're saying it sucks? I don't see the point posting that last part. Only thing you could really correct is the grammar.
|
Because perhaps it was his first work? He can't agree that his first work sucks and that he can improve?
And offence is spelt differently where i live.
|
|
|
06/03/2009, 20:37
|
#7
|
elite*gold: 0
Join Date: Nov 2006
Posts: 65
Received Thanks: 2
|
nice job. how do you change it so you can exchange dbs for cps.
|
|
|
06/05/2009, 05:12
|
#8
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
Here are the exchange DB for CPs
paste it in ur Handler/NPCTalks
Look for case 923: // LadyLuck
On top it add
HTML Code:
case 2071://Market CPAdmin
{
if (LinkBack == 0)
{
Text("I guess you have extra DragonBalls in your inventory. \nI can give you 2000 CPs per dragonball and 20000 per DB Scroll.", CSocket);
Link("Yes, i want 2000 CPs for my dragonball.", 1, CSocket);
Link("Yes, i want 20000 CPs for my DBScroll.", 2, CSocket);
Link("Just passing by.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (InventoryContains(1088000, 1, CSocket))
{
CSocket.Client.CPs += 2000;
int uid = ReturnUID(1088000, CSocket);
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You now have " + CSocket.Client.CPs + " CPs.", Struct.ChatType.Top));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
CSocket.Client.Inventory.Remove(uid);
CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(uid);
}
else
{
Text("You don't have a dragonball.", CSocket);
Link("Ok.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
}
else if (LinkBack == 2)
{
if (InventoryContains(720028, 1, CSocket))
{
CSocket.Client.CPs += 20000;
int uid = ReturnUID(720028, CSocket);
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You now have " + CSocket.Client.CPs + " CPs.", Struct.ChatType.Top));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
CSocket.Client.Inventory.Remove(uid);
CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(uid);
}
else
{
Text("You don't have a dragonball scroll.", CSocket);
Link("Ok.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
}
break;
Then look for
default:
{
Text("NPC " + ID + "'s dialog is not coded.", CSocket);
Link("Aw! That's too bad!", 255, CSocket);
Face(30, CSocket);
End(CSocket);
break;
}
Below it add :
HTML Code:
public static void AddItem(int itemid, int bless, int dura, int enchant, int plus, int position, int soc1, int soc2, int color, ClientSocket CSocket)
{
Struct.ItemInfo Item = new Struct.ItemInfo();
if (dura == 255)
{
Item.Dura = Item.MaxDura;
}
else
{
Item.Dura = dura;
}
Item.Bless = bless;
Item.Enchant = enchant;
Item.ItemID = itemid;
Item.Plus = plus;
Item.Position = position;
Item.Soc1 = soc1;
Item.Soc2 = soc2;
Item.Color = color;
Item.UID = Nano.Rand.Next(1, 9999999);
bool created = Database.Database.NewItem(Item, CSocket);
while (!created)
{
Item.UID = Nano.Rand.Next(1, 9999999);
created = Database.Database.NewItem(Item, CSocket);
}
I hope you enjoy it Wha La
|
|
|
06/05/2009, 05:47
|
#9
|
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
|
Quote:
int uid = ReturnUID(1088000, CSocket);
|
If im correct i believe that is the id for a db not a db scroll
|
|
|
06/05/2009, 06:10
|
#10
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
yup for the DBScroll u can search it or change it by searching at the ItemID in ur CoEmuV2 files
|
|
|
06/12/2009, 10:36
|
#11
|
elite*gold: 0
Join Date: Apr 2006
Posts: 532
Received Thanks: 66
|
7 Errors >.< I just got the LadyLuck but I still have 7 errors Face being one ReturnUID being another and InventoryContains being the other problem any suggestions? Ok I brought it down to 4 errors by deleting the Face line completly. But I am still with the InventoryContain problem not existing and also ReturnUID not existing.
|
|
|
07/04/2009, 06:37
|
#12
|
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
|
K, well I read the FIRST post in this thread and followed the instructions. It all worked. I now have a CPAdmin giving 5000 CPs for 50000 silvers. Thanks VAM
|
|
|
07/04/2009, 18:29
|
#13
|
elite*gold: 0
Join Date: Feb 2007
Posts: 28
Received Thanks: 0
|
I still have 2 errors
int uid = ReturnUID(1088000, CSocket);
Face(30, CSocket);
|
|
|
07/04/2009, 18:30
|
#14
|
elite*gold: 0
Join Date: Feb 2007
Posts: 28
Received Thanks: 0
|
I still have 2 errors
int uid = ReturnUID(1088000, CSocket);
Face(30, CSocket);
|
|
|
07/05/2009, 16:58
|
#15
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
Delete the :
Face(30, CSocket);
Then There u go
|
|
|
|
Similar Threads
|
[Release]CpAdmin for 5165
04/06/2010 - CO2 PServer Guides & Releases - 4 Replies
Yo.
Well I made this 100% myself. enjoy
First off open NPCDialog and search for
#region Conductresses
case 45:
Under that region paste this;
|
[Release] CPAdmin for CoEmuV2
03/06/2010 - CO2 PServer Guides & Releases - 0 Replies
Go to Handlers/NpcTalk.cs
Add this somewhere at other NPC`s:
#region CPAdmin
case 2071:
{
if (LinkBack == 0)
{
Text("U can exchance here Dragonballs for cps", CSocket);
|
[Release]CPAdmin chaning CPs for DBs
10/04/2009 - CO2 PServer Guides & Releases - 6 Replies
ok
here is a CPAdmin who change Dragonballs or Dragonballscrolls to CPs
search for case 35500
or go into you NPCTalk.cs
#region CPAdmin
case 2071://CPAdmin Guy Coded by Koio
{
if (LinkBack == 0)
{
|
CPAdmin!!
02/21/2009 - CO2 Private Server - 2 Replies
Tq Binarys !!! i haven't CPAdmin or npc for trading Money for cps?? can anyone learn me how to add npcs in Tq binarys?
|
CPAdmin...
06/08/2008 - Conquer Online 2 - 2 Replies
//
|
All times are GMT +2. The time now is 14:42.
|
|