Addind npcs!!! is it that hard ?

08/25/2010 20:51 m7mdxlife#1
Hello everyone
im looking for someone that can help me to Fix this problem an i hope that im gonna find him here
i want to add an NPC somewhere in my privet server let me know if im doing it the right way and if not plzzzz i need to know right way to do it ......HOW DID I DO IT .
OK here is the thing i went to the file that calld NPCDialog.Cs opened it than scrolling down to the end of the codes and right where it says #endregion i added the following code
Code:
  #region Celestial tao
case 21155:
{
{
GC.AddSend(Packets.NPCSay("Heya do u want to rellot your points!?"));
GC.AddSend(Packets.NPCLink("Yep!.", 200));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 200)
{
GC.AddSend(Packets.NPCSay("Alright I'll need an DragonBall."));
GC.AddSend(Packets.NPCLink("Okay here is it.", 201));
GC.AddSend(Packets.NPCLink("Its too expensive.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (Control == 201)
{
if (GC.MyChar.Reborns > 0)
{
if (GC.MyChar.InventoryContains(1088000, 1))
{
Game.Item DB = null;
foreach (Game.Item I in GC.MyChar.Inventory)
if (I.ID == 1088000)
{ DB = I; break; }
if (DB != null)
{
int AllAtributes = GC.MyChar.Str +
GC.MyChar.Agi +
GC.MyChar.Spi +
GC.MyChar.Vit + GC.MyChar.StatPoints;
GC.MyChar.Str = 0;
GC.MyChar.Agi = 0;
GC.MyChar.Spi = 0;
GC.MyChar.Vit = 1;
GC.MyChar.StatPoints = (ushort)(AllAtributes - 1);
GC.MyChar.CurHP = 1;
GC.MyChar.RemoveItem(DB);
GC.AddSend(Packets.NPCSay("Okay, Done."));
GC.AddSend(Packets.NPCLink("Thank you.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("You dont have the dragonball..."));
GC.AddSend(Packets.NPCLink("Ahh.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else
{
GC.AddSend(Packets.NPCSay("Your not reborn...Come back when you are reborned."));
GC.AddSend(Packets.NPCLink("Alright.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
and than i went to the NPCs.txt file and i added this line

21155 8360 2 67 1002 440 370


and finally its time to test it so i started the server went to where i added the npc and clicked on him it says the WTFF is going on it says I DONT DO ANYTHING USEFUL YET MY ID IS 21155
an i dont know how to Fix it and whenever i try to change any of the things that is in the NPCDialog.Cs like the words that the nps shuold say it dosent change it and I EVEN tryed to delete the NPCDialog.Cs file and still the NPCS that i want to change is still talking and giveing me the same lines when i click on them and the ones that im adding they NEVER WORKS ((((((
so i really need some help down here
WHT IS THE RIGHT WAY TO DO IT !!!!
:handsdown::handsdown::handsdown::handsdown::
08/25/2010 21:00 ~Master#2
Make sure you are opening the project".csproj " file and once you are done with your modifications press F6, F5.
08/25/2010 21:28 µ~Xero~µ#3
You say to open the solution and refer to the project file? :facepalm:

.sln = Solution.
.csproj = C Sharp Project
08/25/2010 21:31 m7mdxlife#4
ok i understand that i need to look for the main file that contain the codes and the stuff that the npcs shuold say when i click on one of them like the welcome message or even the prices for the stuff that the npcs r selling and thats what i found NPCDialog.Cs and btw im working on 2165 source and here is the NPCDialog.Cs file
[Only registered and activated users can see links. Click Here To Register...]
and if you guys take a look at it it has all the commands and the scripts for the npcs but whn i change anything inside it it dosent make any changes to the game or the npcs
and about the ".csproj " and the C# i dont have them and im not useing any Mysql database or anything its just Hamachi :( so any ideas ?
08/25/2010 21:59 .Beatz#5
Quote:
Originally Posted by m7mdxlife View Post
ok i understand that i need to look for the main file that contain the codes and the stuff that the npcs shuold say when i click on one of them like the welcome message or even the prices for the stuff that the npcs r selling and thats what i found NPCDialog.Cs and btw im working on 2165 source and here is the NPCDialog.Cs file
[Only registered and activated users can see links. Click Here To Register...]
and if you guys take a look at it it has all the commands and the scripts for the npcs but whn i change anything inside it it dosent make any changes to the game or the npcs
and about the ".csproj " and the C# i dont have them and im not useing any Mysql database or anything its just Hamachi :( so any ideas ?
So you are not using c#? If you are not there is your problem. There should eb a file called YourSourceName.csproj

You need to open this in C# and then change the things you want to change. Then recompile the source by hitting F6. Debug it using F5.
08/25/2010 22:09 ~Master#6
Quote:
Originally Posted by µ~Xero~µ View Post
You say to open the solution and refer to the project file? :facepalm:

.sln = Solution.
.csproj = C Sharp Project
fixed :o
08/26/2010 15:43 Adziunia#7
lolz..its not hard u just dont know how to do it..... get compiler like microsoft visual c# then open project file.. find npcdialog.cs add ur npc hit F6 then f5 and done, u cant compile ur server with just 1 file and u NEED compiler for it not notepad or whatever