|
You last visited: Today at 10:22
Advertisement
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.
07/09/2008, 22:17
|
#1636
|
elite*gold: 0
Join Date: Jun 2007
Posts: 390
Received Thanks: 92
|
Quote:
Originally Posted by Light200
i'd like to ask if theres a way to make a GM item like..weapon ^^
and galdik, i meant lolmaster ^^
lol, lemme test it on my server, i wanna see if it works, if you wanna try, heres my server dat and hamachi
make sure to back up your server dat, and my hamachi is
maverickonline
147896325
[Header]
GroupAmount=1
Group1=GroupPic9
[Group1]
ServerAmount=4
Server1=Qonquer
Ip1=69.41.179.99
Port1=9958
ServerName1=Qonquer
HintWord1=
Pic1=servericon33
Server2=Dragon
Ip2=5.11.4.76
Port2=9958
ServerName2=Maverick
HintWord2= Welcome to MaverickOnline
Pic2=servericon78
Server3=Chris
Ip3=208.104.139.200
Port3=9958
ServerName3=Test
HintWord3=
Pic3=servericon78
Server4=Dragon
Ip4=5.215.184.255
Port4=9958
ServerName4=Dragon
HintWord4=Test Server
Pic1=servericon33
|
How much puters u use?
|
|
|
07/09/2008, 22:23
|
#1637
|
elite*gold: 0
Join Date: Mar 2008
Posts: 213
Received Thanks: 85
|
why?
|
|
|
07/09/2008, 22:27
|
#1638
|
elite*gold: 0
Join Date: Jun 2007
Posts: 390
Received Thanks: 92
|
Quote:
Originally Posted by Light200
why?
|
just to know.. if u use only 1 puter ,how can u use a few ip... just curious. I'm trying to put 2 server but 2nd won't connect
|
|
|
07/09/2008, 22:29
|
#1639
|
elite*gold: 0
Join Date: Mar 2008
Posts: 213
Received Thanks: 85
|
uhh i use 1
and how do you use the /gm command? 0.o
btw adz, i tested your drop items, it works like a charm
except 1 prob
it all lands in 1 spot instead of dif areas
last probelm, can you explain the drops please? me and lolmaster intend on finishing it
1002-111329-0-0-0-0-0-30
like the numbers ?-?-?-?-?-?-?-?
|
|
|
07/09/2008, 22:36
|
#1640
|
elite*gold: 0
Join Date: Aug 2007
Posts: 180
Received Thanks: 158
|
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
will post on urs site
|
|
|
07/09/2008, 22:42
|
#1641
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by Light200
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.
Adz, great job on the drops =o
|
|
|
07/09/2008, 22:53
|
#1642
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
Quote:
Originally Posted by tao4229
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.
|
|
|
07/09/2008, 22:55
|
#1643
|
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
|
Quote:
Originally Posted by tao4229
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);
MyClient.SendPacket(Pack);
}
}
}
else
{
while (en.MoveNext())
{
ItemHandler.DroppedItem TheItem = (ItemHandler.DroppedItem)en.Value;
if (MyClient.Online)
if (TheItem.Map == MyClient.MyChar.PosMap)
{
byte[] Pack = ThePackets.DropMoney(TheItem.PosX, TheItem.PosY, TheItem.UID, TheItem.IID);
MyClient.SendPacket(Pack);
}
}
}
}
catch (Exception j) { Console.WriteLine(j); }
}
|
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
|
|
|
07/09/2008, 22:59
|
#1644
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
>___> 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
|
|
|
07/09/2008, 23:07
|
#1645
|
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
|
Quote:
Originally Posted by InfamousNoone
>___> 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;
}
}
}
|
Has that but im still not sure.
|
|
|
07/09/2008, 23:15
|
#1646
|
elite*gold: 0
Join Date: Mar 2006
Posts: 12
Received Thanks: 16
|
Adz it doesn't save the ItemID of the Gold in the ItemDrops hashtable, it figures it out as its dropping via
Code:
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; }
What noob did that? oh wait, that was me, ****
my guess is if you put 1090000 in your gold drop as the IID, it would work, showing silver on the ground.
|
|
|
07/09/2008, 23:20
|
#1647
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by InfamousNoone
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.
|
|
|
07/09/2008, 23:35
|
#1648
|
elite*gold: 0
Join Date: Mar 2008
Posts: 213
Received Thanks: 85
|
Quote:
Originally Posted by adz06676
Has that but im still not sure.
|
so uhh....about the drops...can you explain what orders they are in so me and lolmaster can make more?
|
|
|
07/09/2008, 23:42
|
#1649
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
I fixed it, I win
@My lessons things:
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.
|
|
|
07/09/2008, 23:54
|
#1650
|
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
|
Quote:
Originally Posted by InfamousNoone
I fixed it, I win
@My lessons things:
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.
|
|
|
Similar Threads
|
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...
|
All times are GMT +1. The time now is 10:22.
|
|