P Server "NPC base code/shops/drop items" for who asked me 2 do it
Discussion on P Server "NPC base code/shops/drop items" for who asked me 2 do it within the CO2 Private Server forum part of the Conquer Online 2 category.
lolz its funny when u pervade birds (template chars from svn) and they die one after another not like in CO all as they r killed and their souls come to ppl who killed them together instead one after another .... be4 50 mobs dies lol
I gonna run server next times with >> log.txt so I can pass error msg + I will add description :-D
the other part is if it will be usefull
another funny part u can attack guards with Inferno and pervade in Capture PK mode
adz, quoting from my last reply "is there a way to make gm items?"
if yes, do i make it in the additems ini?
LOL, first of all, for a scripter, you know nothing about INI files. If you mean ItemAdd.ini, that is the + info for the server, you would have to make a file in there if you wanted + to show on your new item, you would need to add the client side stuff(In Weapon.ini/itemtype.dat and all of the effects if you want it to glow, .dds files for textures and glow,(also ini files controlling glow(forgot)))It's pretty hard to add new items into the server. But knock yourself out.
Yeah, but we're not all as pro as you, so using INI NPCs is an easy way for n00bs like us to get something done.
Actually doing complex NPCs are MUCH easier to use a scripting interface instead of an INI interface. The INI interface is much harder to manage (both for a user to code, and for the server to process) verses normally coding it in C#
Quote:
Nice but I (as nooob) Can handle with MySLQ so i cant understand why not using my MySQL source and make it better .About Java server in java ?!?
Isnt c# better? Or cant i say "Better"?
As im a noob i wanna learn much but (noobs are silly and have Noob questinos) i have everytime problems lolz....
//////////////////////////////////////////////////////////////////////////////////////
SOMEONE CAN GIVE ME A WORKING SATAN CODE???
C# and Java are about in the same range, for instance;
Java is multi-platform, C# Isn't (well not fully)
C# has pointers, Java doesn't support them
So they all have their strong points but C++ > all.
INIs can be faster than MySQL, not the way hadeset did it; I'm being honest when I say as far as I know only I'm the only coder in the Conquer community who knows how to optimize INI's enough to beable to make them run faster than a MySQL connection would.
LOL, first of all, for a scripter, you know nothing about INI files. If you mean ItemAdd.ini, that is the + info for the server, you would have to make a file in there if you wanted + to show on your new item, you would need to add the client side stuff(In Weapon.ini/itemtype.dat and all of the effects if you want it to glow, .dds files for textures and glow,(also ini files controlling glow(forgot)))It's pretty hard to add new items into the server. But knock yourself out.
Adz, great job on the drops =o
Thanks but i'm stuck now when you spawntogold (money instead of an item) The client crashes i swear to god i cant figure out the prob here is the coding:
Quote:
public static void SurroundDroppedItems(Client MyClient, bool Check)
{
try
{
IDictionaryEnumerator en = ItemHandler.ItemDrops.GetEnumerator();
if (Check == true)
{
while (en.MoveNext())
{
ItemHandler.DroppedItem TheItem = (ItemHandler.DroppedItem)en.Value;
if (MyClient.Online)
if (MyMath.PointDistance(MyClient.MyChar.PrevX, MyClient.MyChar.PrevY, TheItem.PosX, TheItem.PosY) > 14)
if (MyMath.PointDistance(MyClient.MyChar.PosX, MyClient.MyChar.PosY, TheItem.PosX, TheItem.PosY) < 14)
if (TheItem.Map == MyClient.MyChar.PosMap)
{
byte[] Pack = ThePackets.DropAnItem(TheItem.UID, TheItem.IID, TheItem.PosX, TheItem.PosY);
as you can see where the drop money part is, where it says TheItem.IID i have also tried TheItem.Silvers i cant figure it out. Should if be else if i dont get this at all x.x
>___> Item's are intresting, they require a field in your dropped item structure with the value of the gold. You decide on the ItemID based by the quantity, take guesses or check a coemu source, I don't have them anymore
>___> Item's are intresting, they require a field in your dropped item structure with the value of the gold. You decide on the ItemID based by the quantity, take guesses or check a coemu source, I don't have them anymore
Quote:
case 2:
{
int icon;
if (silver <= 10) { icon = 1090000; }
else if (silver <= 150) { icon = 1090010; }
else if (silver <= 1000) { icon = 1090020; }
else if (silver <= 3500) { icon = 1091010; }
else { icon = 1091020; }
DroppedItem TheDrop = new DroppedItem(x, y, map, item, silver, 0, plus, bless, enchanct, firstsoc, secsoc, uid);
ItemDrops.Add(uid, TheDrop);
//DropClient.SendPacket(ThePackets.DropMoney(x, y, uid, icon));
IDictionaryEnumerator en = WorldHandler.AllClients.GetEnumerator();
while (en.MoveNext())
{
Client CClient = (Client)en.Value;
if (CClient.Online)
if (MyMath.PointDistance(x, y, CClient.MyChar.PosX, CClient.MyChar.PosY) + 0.01 < 14)
{
byte[] Pack = CClient.ThePackets.DropMoney(x, y, uid, icon);
CClient.SendPacket(Pack);
}
}
DropClient.MyChar.CurHP += 0;
DropClient.SendPacket(ThePackets.Vital2((long)Drop Client.MyChar.UID, DropClient.MyChar.CurHP));
DropClient.MyChar.Silvers -= silver;
DropClient.SendPacket(ThePackets.Vital((long)DropC lient.MyChar.UID, 4, DropClient.MyChar.Silvers));
break;
}
Actually doing complex NPCs are MUCH easier to use a scripting interface instead of an INI interface. The INI interface is much harder to manage (both for a user to code, and for the server to process) verses normally coding it in C#
C# and Java are about in the same range, for instance;
Java is multi-platform, C# Isn't (well not fully)
C# has pointers, Java doesn't support them
So they all have their strong points but C++ > all.
INIs can be faster than MySQL, not the way hadeset did it; I'm being honest when I say as far as I know only I'm the only coder in the Conquer community who knows how to optimize INI's enough to beable to make them run faster than a MySQL connection would.
I believe you are over-estimating the noob population, half of these people don't even know how to recompile a server.(No offense D=) But If I knew how to set up an NPC and just code it in C#, then i probably would. But right now i don't have the correct knowledge to do so. I know what you mean when you say it's easier on complex NPC's, for example: The Guy who creates guilds.
With the Dialog.ini there's no way you can create the text box to make your guild. But, I'm still watching your video tutorials(Hopefully i'll be able to follow them on more complex things)so... If you are going to show how to make a 5016-- Server, My eyes will be open.
I'm getting into pointers next, and will explain why hadeset's next source will fail (LOL, Yes it relates to pointers). Then I'm going to introduce socket programming.
I'm getting into pointers next, and will explain why hadeset's next source will fail (LOL, Yes it relates to pointers). Then I'm going to introduce socket programming.
Yep ^ he fixed it i just noticed 1 small problem, every item that drops on the floor now looks like gold i think i can fix.
Verkaufe: Guild Wars "Platin", "Ectos, "Items" mehr... 09/12/2008 - Guild Wars Trading - 0 Replies Hallo,
ich biete gegen Euro viele schöne dinge für das Spiel Guild Wars an. Bitte meldet euch dann bei mir per PM was genau ihr haben möchtet und wieviel von den jeweiligen Virtuellen Gegenständen. Die Übergabe kann wie folgt ab laufen. Ich erstelle extra für euch die Ebay Auktion mit der gewünschten menge der jeweiligen Virtuellen Guild Wars gegenstände. Wenn ihr kein Ebay habt und euch auch kein Account anlegen möchtet kann die Übergabe auch ausserhalb Ebays statt finden hierzu erhaltet...