Register for your free account! | Forgot your password?

You last visited: Today at 19:07

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

Advertisement



[5165] NPC help

Discussion on [5165] NPC help within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2009
Posts: 159
Received Thanks: 9
[5165] NPC help

I've tried following a guide
The NPC shows up on the map but doesn't say anything that im trying to get it to say, can someone help me out?

Trying to get it to sell MoonBoxs so i can stop haveing to changeing the Jobs for those testing stuff out for me on my server.

NPCDialog
Quote:
case 302030://Promotion
{
if (GC.MyChar.Inventory.Count <= 39)
{
GC.AddSend(Packets.NPCSay("Would you like to buy a MoonBox for 215 CP?"));
GC.AddSend(Packets.NPCLink("Yes.", 2));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
GC.MyChar.CPs -= 215;
GC.MyChar.AddSend(Packets.NPCSay("Heres your MoonBox"));
GC.MyChar.AddItem(721080);
GC.AddSend(Packets.NPCLink("Thank you.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
break;
}
#endregion
NPCs.txt
Quote:
302030 8099 2 28 1004 052 067
greasontim is offline  
Old 04/23/2010, 17:17   #2
 
xScott's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
Code:
case 302030://Promotion
{
[B][U]if (GC.MyChar.Inventory.Count <= 39)[/U][/B]
{
GC.AddSend(Packets.NPCSay("Would you like to buy a MoonBox for 215 CP?"));
GC.AddSend(Packets.NPCLink("Yes.", 2));
GC.AddSend(Packets.NPCLink("No.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
GC.MyChar.CPs -= 215;
GC.MyChar.AddSend(Packets.NPCSay("Heres your MoonBox"));
GC.MyChar.AddItem(721080);
GC.AddSend(Packets.NPCLink("Thank you.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
break;
}
#endregion
NPCs should start with

Code:
If(Control == 0)
to check for inventory space i would do like
Code:
if (Control == 2 && GC.MyChar.Inventory.Count <= 39 )
{
}
You might also want to put a check on if the player has 215 or more CPs
xScott is offline  
Old 04/23/2010, 18:22   #3
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
Here it is fixed

Code:
#region MoonBox seller
     case 302030://Promotion
      {
        if (Control == 0)
        {
            if (GC.MyChar.Inventory.Count <= 39)
            {
                GC.AddSend(Packets.NPCSay("Would you like to buy a MoonBox for 215 CP?"));
                GC.AddSend(Packets.NPCLink("Yes.", 1));
                GC.AddSend(Packets.NPCLink("No.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
            else
            {
                GC.AddSend(Packets.NPCSay("Please make some space in your inv"));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
            if (Control == 1)
            {
                GC.MyChar.CPs -= 215;
                GC.MyChar.AddItem(721080, 1);
                GC.AddSend(Packets.NPCSay("Heres your MoonBox"));
                GC.AddSend(Packets.NPCLink("Thank you.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
            else
            {
                GC.AddSend(Packets.NPCSay("You do not have enough CPs, You need 215CPs"));
                GC.AddSend(Packets.NPCLink("Ok.", 255));
                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                GC.AddSend(Packets.NPCFinish());
            }
        }
          break;
      }
#endregion
Paralyzer[GM] is offline  
Thanks
1 User
Old 04/23/2010, 18:23   #4
 
elite*gold: 0
Join Date: Sep 2009
Posts: 159
Received Thanks: 9
still new to messing around with C# so yeah
so more the inventory count down to control 2
and change the first thing to control one
i'll change it once i get back on the other desktop
thank you
greasontim is offline  
Old 04/23/2010, 19:24   #5
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
A +Thanks would be nice
Paralyzer[GM] is offline  
Old 04/24/2010, 06:31   #6
 
elite*gold: 0
Join Date: Sep 2009
Posts: 159
Received Thanks: 9
Only thing left now to make it possible for people to play now is figure out why players lose all their skills and profs when they Reborn as well as why you don't get the reborn skills.

BTW is it even possible to setup a NPC to check your past classes?
greasontim is offline  
Old 04/24/2010, 10:08   #7
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
erm I think it is becuase I was reading some code and there is atually a PreviousJob code but idk
Paralyzer[GM] is offline  
Old 04/24/2010, 21:27   #8
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by greasontim View Post
Only thing left now to make it possible for people to play now is figure out why players lose all their skills and profs when they Reborn as well as why you don't get the reborn skills.

BTW is it even possible to setup a NPC to check your past classes?
if (gc.mychar.previousjob == )
Arcо is offline  
Old 04/24/2010, 21:56   #9
 
elite*gold: 0
Join Date: Sep 2009
Posts: 159
Received Thanks: 9
can that check both previous jobs?
greasontim is offline  
Reply


Similar Threads Similar Threads
Hi I need 5165 source act like Real Co 5165
09/15/2010 - CO2 Private Server - 4 Replies
I need a A source 5165 that all skills is available specially rb char like nin-nin-nin counterKill and nin-war-nin reflect and more, and also the attack rates should be fair not like +8 set can 1 hit +12 set, and also maybe the client, I need to study to make it in 5200+ source. I love to trade it with my cofarmer account VIP i have use it for 5 days only. PM or contact me in skype :marlyandedsel
[5165]Help With npc
08/06/2010 - CO2 Private Server - 4 Replies
Hello good day. Good I need to know as being able to know go of a npc " pack chief " for that it gives cps and I pray to all and then the servant would be very easy I need help. thanks you elitepvpers And other problem HOW I CAN EDIT THE STATS OF MY PM?
A little help need 5165
06/10/2010 - CO2 Private Server - 1 Replies
Hi this is all new to me just wanted to know how cant i add a effect, say to a garment. I have search but what i did find was removed or links not work not asking for ppl to do it just tell me what files i need to look at and play around with ...
HELP 5165
01/20/2010 - CO2 Private Server - 1 Replies
I have found a source 5165 from this wounderfull forum i have 1 problem with it. When i have killed mobs or monsters they are adding cps in to my bag also sliver. just wounding what .cs file to find and edit it in or what to look for ? This has had me puzzled now for some time and ive turned for help.
[Help] 5165
12/15/2009 - CO2 Private Server - 5 Replies
Fixed



All times are GMT +1. The time now is 19:08.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.