|
You last visited: Today at 20:17
Advertisement
Can Someone Guide Me how to edit NPC dialog for once only for CoEmu v2 Source
Discussion on Can Someone Guide Me how to edit NPC dialog for once only for CoEmu v2 Source within the CO2 Private Server forum part of the Conquer Online 2 category.
05/27/2009, 23:41
|
#1
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
Can Someone Guide Me how to edit NPC dialog for once only for CoEmu v2 Source
Hai guys I need help here.Can someone guide me on how to add or edit NPC dialog and also to add thing like examples CPAdmin Guy dialog.
Question: Which .cs i should go and wat NPC id do i have to find.
and how to send money and remove item form MYChar.
Just guide me or post here for 1 NPC dialog only.
|
|
|
05/28/2009, 00:00
|
#2
|
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
|
Common sense tells me to ctrl and f some of the CP guys dialog and see where it resides..
What does it tell you?
|
|
|
05/28/2009, 00:03
|
#3
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
I doubt there will be any dialog for the CP NPC in the market, he's not coded in. Go to Handlers/NpcTalk.cs and add a CASE for his ID.
|
|
|
05/28/2009, 01:30
|
#4
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
Now I need the guide on how the deduction of money and then send the CPs packets to character in dialog. COz i try do it but when i relog the CPs gone and the money when back the same amount.
|
|
|
05/28/2009, 01:32
|
#5
|
elite*gold: 0
Join Date: Mar 2009
Posts: 510
Received Thanks: 104
|
what i am doing to learn how its coded in is i am reading all the npc dialogs, then if you understand c# you will understand what each thing does.
|
|
|
05/28/2009, 01:50
|
#6
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Quote:
Originally Posted by xXVamXx
Now I need the guide on how the deduction of money and then send the CPs packets to character in dialog. COz i try do it but when i relog the CPs gone and the money when back the same amount.
|
That's normal, you have to manually update the database with the amount.
i.e.:
Code:
UPDATE characters SET Money=999999 WHERE Name="TestChar";
EDIT: What? There are functions for that built into the server xD
|
|
|
05/28/2009, 02:46
|
#7
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by scottdavey
Common sense tells me to ctrl and f some of the CP guys dialog and see where it resides..
What does it tell you?
|
System.NullReferenceException
-Parameter name: 'Common sense'
|
|
|
05/28/2009, 02:46
|
#8
|
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
|
Quote:
Originally Posted by Zeroxelli
That's normal, you have to manually update the database with the amount.
i.e.:
Code:
UPDATE characters SET Money=999999 WHERE Name="TestChar";
EDIT: What? There are functions for that built into the server xD
|
Will cause too much lag, best just to call mysql querys when the player disconnects saving the clientside values.
|
|
|
05/28/2009, 04:35
|
#9
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
|
scottdavey released saving CPs just a while ago.. check it out
|
|
|
05/28/2009, 08:12
|
#10
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
Pete ninja Dun mind can u gave me the link that scottdavey release the CPs saving.
**** I still got the same problem after relog CPs goes back to the same amount and only money will be stay as it if examples like
Before exchange cash with CPAdmin = money 500000 CPs 0
After exchange = money 50000 CPs 100000
Then after relog its goes back to i.e 1 but cash is 450000 CPs 0. How guys can u all just help me this once bout the saving of CPs.
|
|
|
05/28/2009, 08:37
|
#11
|
elite*gold: 0
Join Date: Aug 2008
Posts: 91
Received Thanks: 31
|
Yeah Done thanks man
|
|
|
05/28/2009, 08:41
|
#12
|
elite*gold: 0
Join Date: Dec 2008
Posts: 76
Received Thanks: 3
|
Quote:
Originally Posted by xXVamXx
Pete ninja Dun mind can u gave me the link that scottdavey release the CPs saving.
Damn I still got the same problem after relog CPs goes back to the same amount and only money will be stay as it if examples like
Before exchange cash with CPAdmin = money 500000 CPs 0
After exchange = money 50000 CPs 100000
Then after relog its goes back to i.e 1 but cash is 450000 CPs 0. How guys can u all just help me this once bout the saving of CPs.
|
here is way to fix your problem Credit go to scottdavey & BrokeN^WinG
go to Database folder and then open Database.cs edit this part :
Code:
public static void SaveCharacter(Character Client)
{
MySqlCommand Cmd = new MySqlCommand("UPDATE `characters` SET `Level` = " + Client.Level + ", `WHMoney` = " + Client.WHMoney + ", `PkPoints` = " + Client.PkPoints + ", `xCord` = " + Client.X + ", `yCord` = " + Client.Y + ", `Map` = " + (int)Client.Map + ", `HairStyle` = " + Client.Hair + ", `Class` = " + (int)Client.Class + ", `Exp` = " + Client.Exp + ", `Money` = " + Client.Money + ", `CPoints` = " + Client.CPs + ", `Str` = " + Client.Strength + ",`Vit` = " + Client.Vitality + ", `Spi` = " + Client.Spirit + ", `Dex` = " + Client.Dexterity + ", `StatPoints` = " + Client.StatPoints + ", `FirstLog` = " + 1 + ", `Reborn` = " + Client.Reborn + ", `HP` = " + Client.CurrentHP + ", `MP` = " + Client.CurrentMP + " WHERE `CharID` = " + Client.ID, DatabaseConnection.NewConnection());
Cmd.ExecuteNonQuery();
Cmd.Connection.Close();
Cmd.Connection.Dispose();
Cmd.Dispose();
}
and it's will save your CPS fine
btw try to search in official post before you make Thread about your problem
|
|
|
07/23/2009, 08:00
|
#13
|
elite*gold: 0
Join Date: Jun 2009
Posts: 16
Received Thanks: 1
|
Which file you're editing? I want understand
|
|
|
09/04/2009, 01:45
|
#14
|
elite*gold: 0
Join Date: Aug 2009
Posts: 22
Received Thanks: 4
|
Quote:
Originally Posted by Night Angel
Which file you're editing? I want understand
|
NPCText.cs or NPCDialog.cs;
But if they're going into databases etc.
ExternalDatabase.cs / Database.cs
I think. i havent seen in a while...
|
|
|
09/04/2009, 04:54
|
#15
|
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
|
Code:
#region CP Admin
case 2071: // CP ADMIN
{
if (LinkBack == 0)
{
Text("HELLO , i can help you changing your DragonBalls to CPs,so how many u wanna change", CSocket);
Link("DragonBall", 1, CSocket);
Link("DragonBall Scroll", 2, CSocket);
Link("Just passing by", 255, CSocket);
Face(6, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (HasItem(1088000,1,CSocket))
{
if (CSocket.Client.CPs + 215 > 999999999)
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You can not hold more then 999,999,999 CPs", Struct.ChatType.Top));
else
{
DeleteItem(1088000, 1, CSocket);
CSocket.Client.CPs += 215;
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
}
else
{
Text("You don't have any DragonBalls.", CSocket);
Link("I see.", 255, CSocket);
Face(6, CSocket);
End(CSocket);
}
}
else if (LinkBack == 2)
{
if (HasItem(720028, 1, CSocket))
{
if (CSocket.Client.CPs + 2150 > 999999999)
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You can not hold more then 999,999,999 CPs", Struct.ChatType.Top));
else
{
DeleteItem(720028, 1, CSocket);
CSocket.Client.CPs += 2150;
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.CPs, Struct.StatusTypes.InvCPoints));
}
}
else
{
Text("You don't have any DragonBall scrolls.", CSocket);
Link("I see.", 255, CSocket);
Face(6, CSocket);
End(CSocket);
}
}
break;
}
#endregion
|
|
|
 |
Similar Threads
|
[Guide]CoEmu v2 Source Setup
03/09/2012 - CO2 PServer Guides & Releases - 245 Replies
ALRIGHT. I was bored and in the mood to help (rare...I know D=)
First things first, you NEED a C# compiler. If you're the classic nooby, then go get Microsoft Visual C# 2008 Express Edition.
Second, download the source located in this crazy topic: http://www.elitepvpers.com/forum/co2-pserver-discus sions-questions/254190-awesome-release-coemuv2-nan o-5095-source-code.html.
Third - extract it with WinRAR (if you don't have it, get it here: WinRAR archiver, a powerful tool to process RAR...
|
[Guide]Video+All Files+Source oF CoEmu v2
05/22/2010 - CO2 PServer Guides & Releases - 130 Replies
I Had finished the video and all the files and tried all the files I will be able to work now, the server 5095 Now download links.
* To download the video click here
* To download Source Click
#Removed
* Server.dat+Conquer.exe klick here
* To download the 5095 Client from here
|
[Guide]How to edit 5165 source!
12/19/2009 - CO2 PServer Guides & Releases - 6 Replies
Well here is a simple thread on using the functions in the 5165 source that everyone has, Basicly will be talking bout functions about the source
Ok first lets start with adding a item and what it does
Lets start by going to Character.cs in Game/Character.cs
Search for
MoneyBag
|
NPC Dialog Edit?
12/24/2007 - Conquer Online 2 - 12 Replies
How would i go about editing the NPC's Dialog(e.g "Thank you, Santa)? +1 Thanks to whoever answers with detail x.x
@Edit: Also, I made it so I can jump with the Trojan Robot but when I get mid-air I D/C.
How would I got about making it not D/C me?
|
All times are GMT +1. The time now is 20:17.
|
|