Register for your free account! | Forgot your password?

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

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

Advertisement



Define some things in Character.cs

Discussion on Define some things in Character.cs within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
Post Define some things in Character.cs

So I am trying to add a use for an item. It's for donators so it when you click on it it opens up like an npc box thingy and asks u if u want level 255 or 500 stat points. It uses 'System.GC', 'MyChar', 'AddSend', and 'N' (in N.Avatar) which says its not defined (in Character.cs) how do I define it here?

#Solved



copz1337 is offline  
Old 10/13/2010, 01:58   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,276
Cause you're not supposed to be using System.GC
GC is a variable name for Main.GameClient, which is a different type entirely from System.GC so use GC as Main.GameClient. Don't ask me to describe more, cause thats as simple as it gets. And if you can't get it from that, then you should go take some C# Tuts off the web.


Arcо is offline  
Thanks
1 User
Old 10/13/2010, 02:00   #3
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
sigh here we go with the "go learn C#" again. and btw I am using GC but the error says System.GC - look at the code facepalm
copz1337 is offline  
Old 10/13/2010, 02:18   #4
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,276
Quote:
Originally Posted by copz1337 View Post
sigh here we go with the "go learn C#" again. and btw I am using GC but the error says System.GC - look at the code facepalm
Exactly, facepalm. You're not doing what I said. You're using garbage collection, not GameClient.


Arcо is offline  
Old 10/13/2010, 02:20   #5
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
Quote:
Originally Posted by Аrco View Post
Exactly, facepalm. You're not doing what I said. You're using garbage collection, not GameClient.
Yes I am. I modified the codes a bit (friend 'helped') now I'm getting the error
Quote:
Error Control cannot fall through from one case label ('case 723020:') to another.
It's treating it like an npc lol?
copz1337 is offline  
Old 10/13/2010, 02:22   #6
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,276
break the case.
Arcо is offline  
Old 10/13/2010, 02:24   #7
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
Quote:
Originally Posted by Аrco View Post
break the case.
Done.. but now when I use the item it just says the first lines asking what they want to claim but when I click any it doesnt do anything
copz1337 is offline  
Old 10/13/2010, 02:26   #8
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,276
Because you're making an npc out of the item. Not what you should be doing, you should be calling the npc out of NPCDialog.cs ,on USE of the item.
Arcо is offline  
Old 10/13/2010, 02:29   #9
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
Quote:
Originally Posted by Аrco View Post
Because you're making an npc out of the item. Not what you should be doing, you should be calling the npc out of NPCDialog.cs ,on USE of the item.
great. hows that
copz1337 is offline  
Old 10/13/2010, 02:32   #10
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,276
public static void Handle(Main.GameClient GC, byte[] Data, uint NPC, byte Control)
Arcо is offline  
Old 10/13/2010, 02:48   #11
 
elite*gold: 0
Join Date: Oct 2010
Posts: 21
Received Thanks: 16
Try this, don't know if it will work though.

Go to NPCDialog.cs and add this:
Code:
#region Star
                            case 8474834:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Choose the reward you want for donating. Make sure you don't already have the one you choose!"));
                                        GC.AddSend(Packets.NPCLink("Claim Level 255.", 1));
                                        GC.AddSend(Packets.NPCLink("Claim 500 stats points.", 2));
                                        GC.AddSend(Packets.NPCLink("Let me think about it.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        GC.MyChar.Level = 255;
                                        Game.World.SendMsgToAll("SYSTEM", "Congratulations, donater " + GC.MyChar.Name + " just became level 255! [You can donate at our site LostConquer.com]", 2011, 0);
                                    }
                                    if (Control == 2)
                                    {
                                        GC.MyChar.Str = 500;
                                        GC.MyChar.Agi = 500;
                                        GC.MyChar.Spi = 500;
                                        GC.MyChar.Vit = 500;
                                        GC.MyChar.CurHP = GC.MyChar.MaxHP;
                                        GC.MyChar.CurMP = GC.MyChar.MaxMP;
                                        Game.World.SendMsgToAll("SYSTEM", "Congratulations, donater " + GC.MyChar.Name + " just claimed 500 Stat Points! [You can donate at our site LostConquer.com]", 2011, 0);
                                    }
                                    break;
                                }
                            #endregion
Then in Character.cs, for the item add this:
Code:
#region Star (For Donators)
                    case 723038:
                        {
                            MyClient.DialogNPC = 8474834;
                            PacketHandling.NPCDialog.Handle(MyClient, null, 8474834, 0);
                            MyClient.EndSend();
                            break;
                        }
                    #endregion
-diRt is offline  
Old 10/13/2010, 02:53   #12
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,276
And the spoonfeeding begins.
Arcо is offline  
Old 10/13/2010, 02:57   #13
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
Quote:
Originally Posted by Аrco View Post
And the spoonfeeding begins.
And the bsing ends.
copz1337 is offline  
Old 10/13/2010, 03:59   #14
 
elite*gold: 0
Join Date: Mar 2010
Posts: 91
Received Thanks: 5
Just wondering but the remove item code for the agi,vit, etc. does it remove the chracters old stuff or does it just add because he could take too much?
biohazardous is offline  
Old 10/13/2010, 04:08   #15
 
elite*gold: 0
Join Date: Oct 2010
Posts: 21
Received Thanks: 16
Quote:
Originally Posted by biohazardous View Post
Just wondering but the remove item code for the agi,vit, etc. does it remove the chracters old stuff or does it just add because he could take too much?
+= adds

-= lessens.

= makes it even


-diRt is offline  
Reply



« [HELP] PLz Random Disconnection | [5165] StaminaBug »

Similar Threads
Looking for some help on define eud star
09/21/2010 - EO PServer Hosting - 11 Replies
hey all..can some one show where did i can define my eudemon star in cq_eudemon_rbn_rqr ? example for reborn rate.. on my server eudemon below 100* eudemon will require 30* per compose(this is normal on cq_eudemon_rbn_rqr sacrifice_starlev) so what im not understand here.. where the point for 100*? coz i make the new line on it that will require 40* eudemon for compose..but my 100* eudemon change the require star to 40* and not 30* anymore..where should i define this? its really make...
define.item.h items fragen
05/23/2010 - Flyff Private Server - 0 Replies
ich wollte fragen wie die define item von spross Gspross Sspross Level Box
Define Skills
08/17/2009 - CO2 Private Server - 6 Replies
SkillAttributes = new ushort { 2, 0, 0, 505, 0, 0 }; what do each numbers represent ive never really messed with skills beofre and it would be great if someone could help me out on this
how to modify the eud star rank limit define in MSG
03/10/2009 - EO PServer Hosting - 8 Replies
today i will show you how to modify the edu star rank limit in MSG,you can make this via the MSG and the OD tool i had uploaded on another thread click here to read it pic first! http://content.imagesocket.com/images/11111af9.jp g find this address: OO5BF668 3a98 is just the star cllout requie define ,i had modify it to 150 star number as my another thread! but when the edu star over the 85 star ,we still cant see the edu's rank , how to...
[Tutorial] Define your chams
10/27/2008 - WarRock - 4 Replies
Credits to LilCrazed Sorry if it has been posted i searched and didn't find it In d3d8dev.cpp under the includes put #define Player (m_Stride == 44) #define Walls (m_Stride == blah) #define Flags (NumVertices == blah)



All times are GMT +2. The time now is 03:24.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

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