Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 09:58

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help] coding for dummies :P

Discussion on [Help] coding for dummies :P within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
w.maatman's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 28
Received Thanks: 0
[Help] coding for dummies :P

hello,

im trying to set up my own private server and i could use some help :P

i got a few questions u might could help me with.

I got a 5165 server with korolos3 source.

so my questions are :

1. How to edit the chat of a npc with C# ? i tried to edit the cpadmin by getting rid of the trade of 500k money for 5k cps but i failed :P
Quote:
#region korolos cpadmin
case 1524230:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Hallow i am CPS Admin here to exchang Dragonsball and dbscroll for cps and exchang silvers for cps say thanks to korolos he make me."));
GC.AddSend(Packets.NPCLink("Dragonball for (215 cps)", 4));
GC.AddSend(Packets.NPCLink("Dragonball scroll for (2150 cps) ", 5));
GC.AddSend(Packets.NPCLink("Me doesnt have DBs, gimme plx", 255));
GC.AddSend(Packets.NPCSetFace(50));
GC.AddSend(Packets.NPCFinish());
}
else if (GC.MyChar.Inventory.Count < 40)
{

if (Control == 4)
{
if (GC.MyChar.InventoryContains(1088000, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088000));
GC.MyChar.CPs += 215;
GC.AddSend(Packets.NPCSay("You have have got 215 cps"));
GC.AddSend(Packets.NPCLink("Thanks.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You don't have enough Dragonball."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
else if (Control == 5)
{
if (GC.MyChar.InventoryContains(720028, 1))
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(720028));
GC.MyChar.CPs += 2150;
GC.AddSend(Packets.NPCSay("You have got 2150 cps"));
GC.AddSend(Packets.NPCLink("Thanks.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You don't dbscroll."));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
break;
this is what i got now..

2. how to create an extra map wich i can put special monsters in with a npc.

if im getting more questions ill post them here.

peace,
W.Maatman
w.maatman is offline  
Old 01/13/2010, 18:26   #2
 
xScott's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
Code:
GC.AddSend(Packets.NPCSay("Hallow i am CPS Admin here to exchang Dragonsball and dbscroll for cps and exchang silvers for cps say thanks to korolos he make me."));
See where it says Packets.NPCSay?
Thats what the NPC says, change the text in the qoutes to change the text

Code:
GC.AddSend(Packets.NPCSay("Your Text Here"));
xScott is offline  
Old 01/14/2010, 13:38   #3
 
w.maatman's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 28
Received Thanks: 0
okey, but it if i change the dialog it seems like it doesnt change in my client :S

how comes :S

Code:
#region korolos cpadmin
case 1524230:
{
    if (Control == 0)
    {
        GC.AddSend(Packets.NPCSay("Hallow i am   CPS  Admin  here to exchang Dragonsball and dbscroll for cps and exchang silvers for cps say thanks to korolos he make me."));
        GC.AddSend(Packets.NPCLink("Dragonball for (215 cps)", 4));
        GC.AddSend(Packets.NPCLink("Dragonball scroll for (2150 cps) ", 5));
        GC.AddSend(Packets.NPCLink("500k silver for (5k cps) ", 6));
        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
        GC.AddSend(Packets.NPCSetFace(50));
        GC.AddSend(Packets.NPCFinish());
    }
    else if (GC.MyChar.Inventory.Count < 40)
    {

        if (Control == 4)
        {
            if (GC.MyChar.InventoryContains(1088000, 1))
            {
                GC.MyChar.RemoveItem(GC.MyChar.NextItem(1088000));
                GC.MyChar.CPs += 215;
                GC.AddSend(Packets.NPCSay("You have have got 215 cps"));
                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
            else
            {
                GC.AddSend(Packets.NPCSay("You don't have enough Dragonball."));
                GC.AddSend(Packets.NPCLink("I see.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
        }
        else if (Control == 5)
        {
            if (GC.MyChar.InventoryContains(720028, 1))
            {
                GC.MyChar.RemoveItem(GC.MyChar.NextItem(720028));
                GC.MyChar.CPs += 2150;
                GC.AddSend(Packets.NPCSay("You have got 2150 cps"));
                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
            else
            {
                GC.AddSend(Packets.NPCSay("You don't dbscroll."));
                GC.AddSend(Packets.NPCLink("I see.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
        }
        else if (Control == 6)
        {
            if (GC.MyChar.Silvers >= 500000)
            {
                GC.MyChar.Silvers -= 500000;
                GC.MyChar.CPs += 5000;
                GC.AddSend(Packets.NPCSay("You have got 5k cps say thanks to korolos"));
                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
            else
            {
                GC.AddSend(Packets.NPCSay("You don't have enough silvers."));
                GC.AddSend(Packets.NPCLink("I see.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
        }
    }

    else
    {
        GC.AddSend(Packets.NPCSay("Im sorry you  dont  have nothing"));
        GC.AddSend(Packets.NPCLink("I see.", 255));
        GC.AddSend(Packets.NPCSetFace(N.Avatar));
        GC.AddSend(Packets.NPCFinish());
    }
    break;

i want this to be editted to the normal cpadmin...
w.maatman is offline  
Old 01/14/2010, 14:22   #4
 
elite*gold: 0
Join Date: Sep 2008
Posts: 178
Received Thanks: 62
You need press f5 for compile <.<'
.Kob is offline  
Old 01/14/2010, 15:22   #5
 
w.maatman's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 28
Received Thanks: 0
so if i want to get rid off:

Code:
     else if (Control == 6)
        {
            if (GC.MyChar.Silvers >= 500000)
            {
                GC.MyChar.Silvers -= 500000;
                GC.MyChar.CPs += 5000;
                GC.AddSend(Packets.NPCSay("You have got 5k cps say thanks to korolos"));
                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
            else
            {
                GC.AddSend(Packets.NPCSay("You don't have enough silvers."));
                GC.AddSend(Packets.NPCLink("I see.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
        }
    }
i just have to press f6 to build, then press delete to delete it then f5 to debug and compile ?
w.maatman is offline  
Old 01/14/2010, 15:30   #6
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
You shouldn't need to build (assuming you are running your debug copy anyways)

Change the script around to how you want it to be ingame, close the server (if it is running), debug (f5), restart server, login with your client and the npc should be updated.
pro4never is offline  
Old 01/14/2010, 21:44   #7
 
w.maatman's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 28
Received Thanks: 0
allright, i got that working now

but how can i create a new map like dis city with special level monsters ??
w.maatman is offline  
Old 01/15/2010, 19:44   #8
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
Quote:
Originally Posted by w.maatman View Post
allright, i got that working now

but how can i create a new map like dis city with special level monsters ??
I would pick a random map which your not using and with enough space, than in the database add the monsters and or spawns. Not that hard is it?
Basser is offline  
Old 01/15/2010, 19:46   #9
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
I think he is talking about adding a new/clone of a map. I know clone maps are possible by re-using the .dmaps or something but I have no idea in practice how to go about it so can't really help there.

As said though, there are ALOT of un-used maps and quite a few copies. Find one that suits your quest and add some spawns there, then worry about drops, npcs, quest functions and all that good stuff later.
pro4never is offline  
Old 01/15/2010, 19:48   #10
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
Quote:
Originally Posted by pro4never View Post
I think he is talking about adding a new/clone of a map. I know clone maps are possible by re-using the .dmaps or something but I have no idea in practice how to go about it so can't really help there.

As said though, there are ALOT of un-used maps and quite a few copies. Find one that suits your quest and add some spawns there, then worry about drops, npcs, quest functions and all that good stuff later.
Seriously, creating a new map is probably just a matter of copying, editing and renaming files.
Basser is offline  
Reply


Similar Threads Similar Threads
Dummies
03/14/2008 - Cabal Online - 7 Replies
is there any skill spammer bot that spams skills at the dummies? i have search but all the ones i see r for monsters.thanx in advance..



All times are GMT +1. The time now is 10:00.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.